There are a lot of pet peeves that my coworkers do that annoy me.
Here is a short list LOL!:
• Saving a model zoomed in so when you open it, you’re looking at the side of a surface.
• Leaving unused features in part trees.
• Display states. We don’t use them but many leave display states linked to configurations and inadvertently make many copies of unused states.
I would like a macro that saves out a “clean” part/assembly.
I would like this macro to:
• Unlink display states
• Set the display state to <default>_Display State 1
• Delete all but <default>_Display State 1
• Delete all unused features/parts( and their children)
• Hide all sketches
• Return the display area to a default ISO view (full screen)
• Save the file (with option to close)
anyone have something or would be willing to write one?
I tried to record a macro to do this, but it stalls at the close. I looked at it and it looked like it was trying to rename the part to whatever the part I was recording that I used while I was recording it.
New or exsisting macro
New or exsisting macro
- Attachments
-
- Macro2.swp
- (24 KiB) Downloaded 158 times
Try the attached macro, does not delete unused features/parts but covers rest others.
Go to full postRe: New or exsisting macro
Try the attached macro, does not delete unused features/parts but covers rest others.
- Attachments
-
- Model Clean Up.swp
- (60.5 KiB) Downloaded 92 times
Deepak Gupta
SOLIDWORKS Consultant/Blogger
SOLIDWORKS Consultant/Blogger
Re: New or exsisting macro
Thanks for the help Deepak.
I downloaded it and ran it but it did nothing.
Is there any restriction on where the file needs to be or anything else that stop it from running?
I downloaded it and ran it but it did nothing.
Is there any restriction on where the file needs to be or anything else that stop it from running?
Re: New or exsisting macro
It should work on active file. Make sure you have set the references correctly to your installed version. Refer this video
If above does not fix the issue, then kindly share some sample files to check.
Deepak Gupta
SOLIDWORKS Consultant/Blogger
SOLIDWORKS Consultant/Blogger
Re: New or exsisting macro
Again, Thanks for the help Deepak.