• This forum is the machine-generated translation of www.cad3d.it/forum1 - the Italian design community. Several terms are not translated correctly.

regenerate all subassembly. is there a macro?

  • Thread starter Thread starter malf
  • Start date Start date

malf

Guest
hi, when designing an assembly in various configurations, I change the configuration, I follow ctrl b or q does not regenerate the sub assemblies. I have solidworks 2021. I have to open every sub and regenerate, close it and move to the next. Is there a macro doing the same thing automatically?
 
I tried to do it from another macro that we had done in the past (that's why there are more variables defined than those that are needed). It seems more or less working. I don't know if it actually makes a reset for every assembly that opens. If someone who understands it makes me a little revision (the macro is very short) gives me a good help. Thank you.
 

Attachments

I looked at the macro that you attached, opens every subset contained in the main axieme and for each verify that there are no others, verify the configuration that matches that of the main axieme and regenerates it.
It works.
the call bees that regenerate the file in question at feature level in your macro is
forcerebuild3 method (imodeldoc2)​
I have created a macro that does the same thing but much simpler, because forcerebuilt3 through your or false you can upgrade even the under assemblies.
I created\copy from the manual bees a second macro, this updates to configuration level, without touching the parts.
try to see if you gain in speed and if they always do the dirty work they have to do.
 

Attachments

Thank you, jenuary, only that's not right. Give me this debug message.
If I wanted to improve my macro, I would like you to open and regenerate the internal level assembly first and then the outer level assembly
the regeneration command is the only one I put new, the rest of the work I did was to delete the other instructions from the old macro. was a macro we had made on the forum to automatically export the developments of all sheet metal parts
 

Attachments

  • 2024-09-09_143657.webp
    2024-09-09_143657.webp
    32.8 KB · Views: 12
Thank you, jenuary, only that's not right. Give me this debug message.
If I wanted to improve my macro, I would like you to open and regenerate the internal level assembly first and then the outer level assembly
the regeneration command is the only one I put new, the rest of the work I did was to delete the other instructions from the old macro. was a macro we had made on the forum to automatically export the developments of all sheet metal parts
It seems strange to me that it gives you the error message when creating the application variable.
try to see in the vba tendon--> tools--> references, if the check on solidworks is active or from some message, maybe it is a version problem. I created it with references in 2023 maybe you're on an older version.
 
Yeah, I got 2021. in references the situation is so. what changes your macro?
 

Attachments

  • 2024-09-12_204335.webp
    2024-09-12_204335.webp
    20.4 KB · Views: 6
Yeah, I got 2021. in references the situation is so. what changes your macro?
Actually, everything seems fine.
to the limit when you have a minute send me a message in private, so we connect remotely and understand what does not turn it.
 

Forum statistics

Threads
44,997
Messages
339,767
Members
4
Latest member
ibt

Members online

No members online now.
Back
Top