Welcome

Working with part materials using SOLIDWORKS API

Edit ArticleEdit Article

Material database in SOLIDWORKS is stored within the XML file. SOLIDWORKS API doesn't provide any direct methods of working with materials database (i.e. searching, adding, reading etc.). However as XML is an open format any XML parsing techniques would apply, i.e. using the XmlDocument, XmlSerializer etc.

ISldWorks::GetMaterialDatabases SOLIDWORKS API method returns the paths to material databases.

IPartDoc::GetMaterialPropertyName2 returns the name of the material and the name of the database this material is stored in.

This section contains examples explaining how to work with the materials database in SOLIDWORKS, how to apply and read material information from SOLIDWOKS parts and bodies.

Notifications

Join session by SOLIDWORKS and PDM API expret Artem Taturevych at 3DEXPERIENCE World 2025 on Feb 26 at 08:30 AM CST to explore 10 essential macros for automating drawings, assemblies, custom properties, and more


Product of Xarial Product of Xarial