Thanks for your answer.
I ended up going back and modifying my recorded macro. Everything seems to work now so for the most part my problem is solved
However, I still want to add some code so that can change the current configuration depending on the value of a custom property. The problem I am having is that the design table changes the configuration specific property and my macro only reads the custom property.
Is there a way around this?
Here is a sample of the code I'm using that works with the custom property:
If Part.CustomInfo("Sections") = 3 Then
Part.ShowConfiguration2 ("3 Sections")
This method of design really works well depending how you utilize it. Do you have sub-assemblies? Do you have the "Dimension" sketch part in every assembly?? When you make your parts do you have all the sketches tied in to the "Dimension" part or just some?
Yes, I have several sub-assemblies. They all have a "DIMENSIONS" sketch that links back to sketches in the master assembly.
The parts also all have a "DIMENSIONS" sketch that links back to the one in the sub-assembly.
In the parts I use geometry based relations (or equations if I'm out of options) off of this sketch.
Updating the sketch in the sub-assemblies fixes my problem. I've managed to make the macro by recording the action of going through every "DIMENSIONS" sketch in all the sub-assemblies and adding some minor tweaks to the result. It takes quite a long time to run but seems to get the job done. If there is a better way to do this I would love to know.
Linking Sketches from one assembly to another isn't as clean as we would like it to be. You should have everything open to rebuild correctly. Attached is a draft of my workflow that I have used for a few years. It's everyone to his own and since there are a lot of different approaches with using SW as a tool for design and mostly we all get to our own comfort level. The turning point for me was here at my current job where the designs are fluid always changing, even though I have used the Skeleton Sketch part half hardheartedly over the last years, with mixed results. Primarily it comes down to building everything off of the Skeleton Sketch, including extrude depth etc, that way you can delete any item in my feature tree and have no errors except may be a few mating errors.
Having the Skeleton Sketch as the first part in every sub-assembly and main assembly is key and when you need to edit a part, isolate the part and the Skeleton Sketch, that way you have no connection to another component in the assembly. Modeling done this way can be time consuming up front, but when you go to make changes, additions, or delete parts there are no issues and you can open either the main assembly or any sub-assembly or the Skeleton Sketch itself and make your edits, as soon as you close the sketch all components update and update correctly..
Solidworks Work Flow-A.pdf 1.0 MB