Change custom properties for multiple model configurations

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

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)?

Works OK for me as well. Can you record/share a video showing the issue?

Forgot to mention this issue is about assembly models.

@BigCrazyAl , @Gupta9665

Please retest the code.

Works OK for both part and assembly files.

To debug, kindly share the complete macro and the model files having the issue.