Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

Global Variables within Assembly / Parts

Status
Not open for further replies.

baniels

Industrial
Jul 16, 2012
13
0
0
US
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.
 
Replies continue below

Recommended for you

Do you have Enterprise PDM at all? If so then you could map variables that are set by default when you create new 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
 
Thanks for the reply. No, we don't use EPDM. I think the design table might be the best route. I will look into it. Do you know if it is possible to move references from an equation.txt to a design table?
 
I don't know about directly moving them as manually creating a design table has a couple caveats. But you should be able to at least copy/paste once your table is properly formatted. In the Solidworks help file there is a list of everything you need to create a design table outside of solidworks and have it work, such as a blank A1 cell and table name.

Tony Greising-Murschel, CSWP
 
Circling back around to this...

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?
 
Nope, you hit the nail right on the head.

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:
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.

iJNcm.png


Tony Greising-Murschel, CSWP
 
Hi Tony. Thanks for taking the time.

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 [ponder]. The wonderful thing about using the txt. files/global variables is that when I go to dimension a line, I simply type '=first few letters' and it finds the variable I'm looking for. That clearly doesn't work in this case, so I've tried exiting the sketch, double clicking on the dimension, then trying to "activate" the RefGeo sketch to do an =*click* on the appropriate dimension, but that doesn't seem to work.

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.
 
I figured it out. I was failing to see that I needed write out the reference completely.

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"
 
Status
Not open for further replies.
Back
Top