AnsweredAssumed Answered

Macro to update subassembly sketches in top down design ?

Question asked by Christopher Elyassi on Aug 12, 2016
Latest reply on Aug 15, 2016 by Deepak Gupta

Hi all,


I am running SW-2015 and I have an assembly that relies heavily on top down design.

So there is a 'master' sketch in my assembly that controls a sketch (called 'DIMENSIONS') in each sub-assembly which changes dimensions in my parts.

Most of the parts and sub-assemblies have different configurations and equations (although I have limited these as much as possible)

I am using a design table to control my 'master' sketch and the sub-assembly configurations.


The problem I am having is that when closing the design table, some parts don't always update. No matter how many CTRL+Qs or superrebuild macros I try, some parts just refuse to update and reflect the changes in the design table. Sometimes changing configurations or saving/closing/opening the master assembly fixes it, but not always.


I understand this is a common problem with SolidWorks and top down designing (mostly due to sloppy modeling, although I am trying to keep it neat).

However, I believe in my case there may be a solution:

Whenever a part in a sub-assembly does not update correctly, I can open and close the 'DIMENSIONS' sketch in the sub-assembly (just opening and closing the sketch editor, not actually changing anything) and all the parts miraculously update correctly. So now my question is... can I macro this?

(followup question, why does this work but the superrebuild macro doesn't?)


I have just started learning how to make macros for SolidWorks and I really need help here. I tried simply recording the macro and going through all the 'DIMENSIONS' sketches in all my sub-assemblies but that didn't work. So would this work as a macro? How could I go about doing that, is there a more generic macro that I could potentially edit to work in my assembly?


final bonus question: could this macro also change the current configuration based on the value of a custom property?



Thanks in advance for any help,