Working with dimensions using SOLIDWORKS API

Edit ArticleEdit Article

Automating dimensions via SOLIDWORKS API
Automating dimensions via SOLIDWORKS API

Dimensions can be added to the selected sketch segments via IModelDocExtension::AddDimension SOLIDWORKS API method.

Each dimension has a unique name which can be assigned by the user. Dimension object can be retrieved by name via IModelDoc2::Parameter method.

Refer the IDimension SOLIDWORKS API interface for the list of available methods for dimensions automation.


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