Macro to delete all but active configuration
Macro to delete all but active configuration
(OP)
I'm looking for a macro that will delete from a part file all but the active configuration.
Does anybody have one that they can share with me?
Does anybody have one that they can share with me?
--------------------
Bring back the HP-15
www.hp15c.org
--------------------






RE: Macro to delete all but active configuration
RE: Macro to delete all but active configuration
Also, if a config is in use by another open file (i.e. assembly component or drawing) then that config will not delete.
Use the following calls to get you on your way:
retval = ModelDoc2.GetConfigurationNames( )
retval = ModelDoc2.DeleteConfiguration2 ( configurationName)
Use ModelDoc2.GetConfigurationNames to get the list of configurations, then use ModelDoc2.DeleteConfiguration2 to delete them.
http://www.EsoxRepublic.com
RE: Macro to delete all but active configuration
Side Note: if you use Design Tables with "allow model edits to update the table" turned off you will need to delete the configs in the design table, otherwise they will come back each time you open the table.
If the design table drives the model then the easiest thing to do is delete them in the table.
RE: Macro to delete all but active configuration
RE: Macro to delete all but active configuration
I don't know if it will do exactly what you want, but it should give you a starting point anyway.
Making the best use of this Forum. FAQ559-716
How to get answers to your SW questions. FAQ559-1091
Helpful SW websites every user should be aware of. FAQ559-520