Global Variables within Assembly / Parts
Global Variables within Assembly / Parts
(OP)
I like to do my drawing from within an assembly, as most of my dimensions are driven by a few variables.
Here is my question plainly: Is there a way to have the global variables of an assembly automatically populate to the individual parts I draw/create within said assembly?
Further explanation: There are a number of ways I need to reference my global variables. From the overall design/layout, and from dims within parts in the assembly. The problem I'm having is that the global variables set for the assembly are only accessible to me when in assembly-edit mode. ie. I cannot link to the assembly's GV's if I am editing a part/component. So if I want the distance between to lines to be driven by a variable, I must draw it, dimension it, get out of Edit Component mode, then click on the sketch to access/edit the dimension.
There are a few paths of workaround:
The first is to simply recreate the assembly's GV's within each new part I create. This is prohibitively time consuming, as each time I made a change, I'd have to do it for all parts.
The second way is to link the assembly's GV's to a text file. Then link the same file to all parts as I create them. This is close - if I make a change within the text file, it affects all parts, BUT... If I need to add a dimension to the list of GV's, the new variable does not become accessible to any parts unless I unlink, and re-link the text file from within the Equations dialog box. In other words, linking only seems to bring in the variables that are present when it is first linked. It is not updated dynamically.
Is this just the best I can do, or am I overlooking something fundamental?
Thanks for the help.
Here is my question plainly: Is there a way to have the global variables of an assembly automatically populate to the individual parts I draw/create within said assembly?
Further explanation: There are a number of ways I need to reference my global variables. From the overall design/layout, and from dims within parts in the assembly. The problem I'm having is that the global variables set for the assembly are only accessible to me when in assembly-edit mode. ie. I cannot link to the assembly's GV's if I am editing a part/component. So if I want the distance between to lines to be driven by a variable, I must draw it, dimension it, get out of Edit Component mode, then click on the sketch to access/edit the dimension.
There are a few paths of workaround:
The first is to simply recreate the assembly's GV's within each new part I create. This is prohibitively time consuming, as each time I made a change, I'd have to do it for all parts.
The second way is to link the assembly's GV's to a text file. Then link the same file to all parts as I create them. This is close - if I make a change within the text file, it affects all parts, BUT... If I need to add a dimension to the list of GV's, the new variable does not become accessible to any parts unless I unlink, and re-link the text file from within the Equations dialog box. In other words, linking only seems to bring in the variables that are present when it is first linked. It is not updated dynamically.
Is this just the best I can do, or am I overlooking something fundamental?
Thanks for the help.






RE: Global Variables within Assembly / Parts
Another option (if no EPDM) is to use linked Design Tables. By having the design tables linked you get a similar option like you do with export/import of equations but you get the added feature of having those tables update across parts instead of having to re-link as you said.
Tony Greising-Murschel, CSWP
RE: Global Variables within Assembly / Parts
RE: Global Variables within Assembly / Parts
Tony Greising-Murschel, CSWP
RE: Global Variables within Assembly / Parts
mx2street: I am beginning to see the potential with design tables, and for a few reasons I believe it can be more powerful than using the text file method I've been relying on.
Here is a simplified example of my goal:
Have the following dimensions be driven by design a single design table:
1)Height
2)Width
3)Depth
4)Material Thickness 1
5)Material Thickness 2
Each part within my assembly will need to reference some or all of these dimensions. I thought that it would make sense to start with a top level sketch of lines, dimension the space between them, then label and link those dimensions to a design table. I expected I would then be able to call upon those dimensions when drawing sketched within future parts w/in the assembly. But I seem to be unable to reference those root-level dimensions from parts I create. Am I missing something?
RE: Global Variables within Assembly / Parts
The benefit of using a "layout part" vs just using the layout sketch in an assembly is the performance gain and ability to change your file structure very easily.
If you're on the Solidworks forums take a look at this: https://forum.solidworks.com/message/130098
Also anything posted on there by Mauricio Martinez-Saez, the guy is a top-down master.
To recap, you want to insert a "layout part" and make sure and tie your references back to that part.
Tony Greising-Murschel, CSWP
RE: Global Variables within Assembly / Parts
I have come across Mauricio's post numerous times when searching around on this. I've downloaded that model - and an updated one he made as well. And his pallet assembly/configurator. I still must be missing something.
I have created an assembly like that, trying to mimic the layout in his tank assembly.
The steps I took:
1)Create part with a single sketch consisting of lines. Space between lines is dimensioned, named, and linked to DT.xlsx - let's call this part "RefGeo"
2)Create assembly. Insert RefGeo part.
3)Create subassembly. Insert RefGeo here, too.
4)Create new part w/in subassembly. Draw and attempt to call upon dimensions in sketch from RefGeo.
5)Fail
What this could tell me is that his system relies on in-context references to the root sketch -- coincident points, co-linear lines, co-radial circles, etc. But I've read Mauricio and others mention sketches like I describe - arbitrary lines with named dimensions linked to a DT. But clearly I can't figure out how to reference them.
RE: Global Variables within Assembly / Parts
Here's what works. An assembly level sketch called "RefSketch" with arbitrary lines and named dimensions linked to DT.
Create a new part, draw a rectangle - no in-context relations other than positioning. Add dimensions, extrude. Open up the equations dialog box and edit the values to look like this:
D1@Sketch2 = "Depth@RefSketch@assemblyname.SLDASM"
RE: Global Variables within Assembly / Parts
RE: Global Variables within Assembly / Parts