This is the default snippet code example that I use for changing custom properties:
For Each config_name In config_names
swModel.ShowConfiguration2 config_name
Set swCustomPropMgr = swModel.Extension.CustomPropertyManager(config_name)
swCustomPropMgr.Add3 "MyCustomFieldName", swCustomInfoText, "CustomValue", swCustomPropertyDeleteAndAdd
swModel.Extension.EditRebuildAll
Next
That’s the point: the model only updates the custom property if the configuration is activated (ModelDoc2::ShowConfiguration2
). Time consumption is main issue right now.
Is there any faster method (macro running time)?