SOLIDWORKS API Code Examples for Macros and Add-ins

Edit ArticleEdit Article


SOLIDWORKS Application Programming Interface (API) is a set of libraries which are exposing the public functions to be used by 3rd party software for invoking the SOLIDWORKS native commands programmatically.

Software developers can emulate the user interaction with SOLIDWORKS to implement the automation routines or compliment the SOLIDWORKS functionality by adding new commands to the application.

SOLIDWORKS API covers almost all functionality of SOLIDWORKS with the minor exceptions (in this case the API implementation is usually planned for future releases). So it is possible to say that everything user can do with SOLIDWORKS from the interface can be emulated in the code.

SOLIDWORKS API is used by SOLIDWORKS partners to develop bespoke solutions (add-ins). Follow SOLIDWORKS Partner Products link for the list of registered solutions.


  • Automation software to reduce repetitive tasks (e.g. batch processing, commands grouping)
  • Specialized software (e.g. rendering, CAM, animation, steel fabrication, wood fabrication, etc.)
  • Additional commands


  • SOLIDWORKS API included in all packages of SOLIDWORKS (i.e. Standard, Professional and Premium).
  • SOLIDWORKS API Help is available online
  • Same as SOLIDWORKS itself its API is backward compatible but not forward compatible. I.e. older versions of macros and add-ins are compatible with future versions of SOLIDWORKS but not vice versa.

Please explore the Table of Content for more detailed guides and examples of SOLIDWORKS API.

Product of Xarial Product of Xarial