Fix All Mate Macro

Library for macros
User avatar
zxys001
Posts: 1078
Joined: Fri Apr 02, 2021 10:08 am
Answers: 5
Location: Scotts Valley, Ca.
x 2320
x 998
Contact:

Fix All Mate Macro

Unread post by zxys001 »

Hello All,

Does anyone have a Macro which will Fix All Components and Sub Assemblies (and their sub components) in an Assembly?

For instance, you import a huge STEP file with 10K components within 1K sub assemblies and they are All Floating and you want them All to be Fixed?

Thanks. UU
"Democracies aren't overthrown; they're given away." -George Lucas
“We only protect what we love, we only love what we understand, and we only understand what we are taught.” - Jacques Cousteau
User avatar
Hansjoerg
Posts: 113
Joined: Thu Apr 01, 2021 4:17 pm
Answers: 3
x 71
x 60

Re: Fix All Mate Macro

Unread post by Hansjoerg »

Fastest way is to save the assembly as a parasolidfile. Reimport this file an all parts and sub parts are fixed.
This way is much faster then do this job with an macro
All the "good" news about SWX makes me feel like I'm driving a truck with two trailers straight into a dead end.
User avatar
gupta9665
Posts: 416
Joined: Thu Mar 11, 2021 10:20 am
Answers: 25
Location: India
x 436
x 455

Re: Fix All Mate Macro

Unread post by gupta9665 »

Deepak Gupta
SOLIDWORKS Consultant/Blogger
User avatar
kawuser
Posts: 46
Joined: Fri Mar 12, 2021 9:29 am
Answers: 0
x 34
x 33

Re: Fix All Mate Macro

Unread post by kawuser »

I am using 2021 SP5 and the macro to suppress all mates and fix top level parts does not seem to work. Any idea why?
User avatar
gupta9665
Posts: 416
Joined: Thu Mar 11, 2021 10:20 am
Answers: 25
Location: India
x 436
x 455

Re: Fix All Mate Macro

Unread post by gupta9665 »

kawuser wrote: Tue Dec 14, 2021 9:56 am I am using 2021 SP5 and the macro to suppress all mates and fix top level parts does not seem to work. Any idea why?
Which particular macro you are trying to use from the both? Are you getting any error? Can you post the macro you are using?
Deepak Gupta
SOLIDWORKS Consultant/Blogger
User avatar
kawuser
Posts: 46
Joined: Fri Mar 12, 2021 9:29 am
Answers: 0
x 34
x 33

Re: Fix All Mate Macro

Unread post by kawuser »

gupta9665 wrote: Fri Dec 17, 2021 5:58 am Which particular macro you are trying to use from the both? Are you getting any error? Can you post the macro you are using?
I tried both and when I run them I get nothing. No error message or function of the macro.
Macro2.swp
(32.5 KiB) Downloaded 192 times
Macro1.swp
(26 KiB) Downloaded 229 times
User avatar
gupta9665
Posts: 416
Joined: Thu Mar 11, 2021 10:20 am
Answers: 25
Location: India
x 436
x 455

Re: Fix All Mate Macro

Unread post by gupta9665 »

Macro1 doesn't have anything.

Macro2, there were some codes issue which I've fixed. Try the attached maco. You may have to update the macro references to 2021 version, refer this video
Attachments
Fix Assy Components.swp
(47.5 KiB) Downloaded 251 times
Deepak Gupta
SOLIDWORKS Consultant/Blogger
User avatar
kawuser
Posts: 46
Joined: Fri Mar 12, 2021 9:29 am
Answers: 0
x 34
x 33

Re: Fix All Mate Macro

Unread post by kawuser »

gupta9665 wrote: Fri Dec 17, 2021 11:52 pm Macro1 doesn't have anything.

Macro2, there were some codes issue which I've fixed. Try the attached maco. You may have to update the macro references to 2021 version, refer this video
It worked great. Thank you for your help. Your the man
Post Reply