Cleaning up projects after the dust has settled

Programming and macros
User avatar
bentlybobcat
Posts: 64
Joined: Tue Sep 21, 2021 8:43 am
Answers: 0
x 3
x 48

Cleaning up projects after the dust has settled

Unread post by bentlybobcat »

We're kinda a custom design shop, where large scale assemblies seldom get reused. Parts, yes, large assembles, virtually never.

Compounding this is we use sub-contractors to do some design for us, whose files get included in the "big mess".

We (me...) have come across a lot of bad practices, natch, and most of them are fairly easily rectified.

The one that is challenging us (me...) at present are suppressed restraints in assemblies.

What we (I) are running into are restraints that are not used anywhere that come back to haunt you... Meaning they are suppressed but flag an error when an assembly is opened.

I've tried the "purge features" command and it kinda, sorta works, but not particularly reliably and certain doesn't parse the assembly removing the ghosts from all the parts and assemblies.

I've put this in API, because methinks this is going to have to be a macro.

I've got some routines in my pocket which will parse the assembly. This is straightforward.

Once I have a file open and activated, any idea how would I go about deleting the ghost restraints?

Thank you
Bent
berg_lauritz
Posts: 423
Joined: Tue Mar 09, 2021 10:11 am
Answers: 6
x 439
x 233

Re: Cleaning up projects after the dust has settled

Unread post by berg_lauritz »

I think this:
https://www.codestack.net/solidworks-ap ... -features/

could help you find those leftovers, I think.
User avatar
bnemec
Posts: 1926
Joined: Tue Mar 09, 2021 9:22 am
Answers: 10
Location: Wisconsin USA
x 2521
x 1390

Re: Cleaning up projects after the dust has settled

Unread post by bnemec »

Do I understand correctly that you want to delete all assembly mates that are suppressed in all configurations? Any other qualifications that would prevent the mate from being deleted?
User avatar
bentlybobcat
Posts: 64
Joined: Tue Sep 21, 2021 8:43 am
Answers: 0
x 3
x 48

Re: Cleaning up projects after the dust has settled

Unread post by bentlybobcat »

bnemec wrote: Fri Feb 25, 2022 11:23 am Do I understand correctly that you want to delete all assembly mates that are suppressed in all configurations? Any other qualifications that would prevent the mate from being deleted?
That's basically correct.

I've got assemblies with mate after mate after mate that has been suppressed, and new mates added. o[

Don't really know how to answer your second question
Bent
Post Reply