×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Macro to delete all but active configuration

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?

--------------------
Bring back the HP-15
www.hp15c.org
--------------------

RE: Macro to delete all but active configuration

We use a small program called Departer. I think we got it from the web. I did a Google search and didn't come up with anything. I got scolded yesterday for giving out my email address but let me know of a way to contact you and I'll send you what we have. I do not know if its ok (for this forum) if I put in a "remove" in the email address

RE: Macro to delete all but active configuration

Just write a program that deletes all of the configs.  SW will not allow the active config to be deleted.

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.

Due to illness, the part of The Tick will be played by... The Tick.
http://www.EsoxRepublic.com

RE: Macro to delete all but active configuration

Tick is right on, even if you selected all configs manually and then hit delete Solidworks will bark about the active config not being able to be deleted.  


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

If anybody has a macro that deletes unused configurations in part files I would greatly appreciate it.  I would pay for it if it works as we would like it to.  I would like to open up an assembly that has all my part files open and run it from there.  We have a lot of parts such as shoulder screws, cylinders, clamps, etc... that have multiple configs.  Before shipping the final design we want to get rid of those configs without opening every part and doing it seperately.  Does something like this exist?

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources