Managing System Options And User Preferences using SOLIDWORKS API

Edit ArticleEdit Article

SOLIDWORKS options API automation
SOLIDWORKS options API automation

Most of options in SOLIDWORKS are controlled via SetUserPreference SOLIDWORKS API method. There versions of methods to control text, integer, toggle, numeric properties, etc. properties.

The easies way to find the required identifier of the user preference would be using the following System Options Table or by simply recording the macro and changing the target property. The corresponding SOLIDWORKS API call will be written to the macro.

All system options can be grouped by two categories: application level and document level.

This section contains the code examples and macros for automation user preferences and application settings.


All articles and code at CodeStack are now open-source and hosted on GitHub. If you want to contribute by modifying existing articles and code snippets, submitting new ones, reporting errors and bugs etc. please follow this blog post for more information. We appreciate any contribution.

Product of Xarial Product of Xarial