Hey all, I just need something to delete all configuration specific properties. I do not want the fields blanked out, I need them gone.
It might be nice to be able to do the same for custom properties too. Ya never know.
Dim swApp As SldWorks.SldWorks
Dim swModel As SldWorks.ModelDoc2
Dim swConfig As SldWorks.Configuration
Dim swCustPropMgr As SldWorks.CustomPropertyManager
Dim vPropNames As Variant
Dim vPropName As Variant
Dim configNames As Variant
Dim configName As Variant
Set swApp = Application.SldWorks
Set swModel = swApp.ActiveDoc
configNames = swModel.GetConfigurationNames
For Each configName In configNames
Set swConfig = swModel.GetConfigurationByName(configName)
Debug.Print "Name of configuration : " & swConfig.Name
Set swCustPropMgr = swConfig.CustomPropertyManager
' Get the names of the custom properties
vPropNames = swCustPropMgr.GetNames
' Delete each custom property
For Each vPropName In vPropNames
Debug.Print " Delete custom property : " & vPropName
Have you looked into using the program #TASK (created by Central Innovation)? It seems to have that capability without customizing a macro for this specific purpose.
FYI, these arguments appear to give the desired result. Deletes all config custom properties but leaves the main ones.
That's cool, but I just want a quick and dirty click that takes care of everything. I don't even want a dialog box or any questions; "terminate with extreme prejudice".
Beauty! Thank you.
Retrieving data ...