Hi there,
I’ve created a simple macro to create a custom property and change the active configuration name.
Next the config name is in a column on our BOM.
It looks like the config name is not updating correctly when changed by the macro.
When I have a part drawing the config name is up to date when changing.
When I have an assembly drawing where that part is on the config name is not updating until I open the part and give an enter on the config name in the configuration manager.
It looks like for SolidWorks that 'an enter' on the not changed config name is more solid then change and rebuild by the macro...
This is what I used:
swCustPropMgr.Add3 "Description", swCustomInfoText, MyValue, 2
swApp.ActiveDoc.ConfigurationManager.ActiveConfiguration.Name = MyValue
I’ve already tried to rebuild and show again the configuration:
swCustPropMgr.Add3 "Description", swCustomInfoText, MyValue, 2
swApp.ActiveDoc.ConfigurationManager.ActiveConfiguration.Name = MyValue
swModel.ForceRebuild3 True 'ctrl-Q
swApp.ActiveDoc.ShowConfiguration2 "MyValue"
With no effect.
Anyone?
SolidworksApi/macros