Rename configuration using Solidworks PDM API

I have an assembly with two configurations like X, Y. Without opening that assembly in Solidworks, I want to rename the configurations to 123_X, 123_Y using PDM api.

Is there any way to do this ?

Without opening the file, you’ll likely be stuck using the Document Manager API. The other option is to use SolidWorks API and open the file to change the name.

The PDM API mainly interfaces with the SQL Database and not the file contents themselves. You’d be able to get the configuration names, but not change them.

Use ISwDMConfiguration7.Name2 in the Document Manager API to set the configuration name.
http://help.solidworks.com/2017/English/api/swdocmgrapi/SolidWorks.Interop.swdocumentmgr~SolidWorks.Interop.swdocumentmgr.ISwDMConfiguration7_members.html

1 Like