Is there a way to define a global driven variable?
For example, let's say the width of a part is driven to W inches. I would like to define global variable W, then use that W in other parts.
Is there a way to do this?
To accomplish that you don't really need a global variable. Edit the Lid Part within the Assembly. Edit the sketch used to create the lid and link it's dimensions to the Box dimensions with sketch relations.
Are all of these Parts in the same Assembly?
Define the GV in your assembly.
Then select the FEATURE with the dimension you want to drive. Click the dimension you want to drive, type = and set it to your GV (or whatever equation involving the GV)
It doesn't work if you edit the sketch in the part.
What is the best way to define a variable in an assembly?
Also, after selecting the feature, where will I get access to the dimensions?
Michael Gera wrote: Also, after selecting the feature, where will I get access to the dimensions?
Michael Gera wrote:
Expand your tree to the feature and double-click on it. That should show the dimensions in the graphics area. With the Equation Manager open, when you get to the column to enter the value, click on the dimension.
At the top level of the assembly, which then drives parts within the assembly. And if you need to get data from parts within the assembly, be careful not to create a circular reference, as that will simply break your formula.
When in a formula, you can click or double click on any part feature to make associated dimensions become visible. Or if you would like to work just within the formula manager itself, switch to the dimension view and view all dimensions in the part by name. Though the latter technique only shows dimensions in the top level assembly when you are in an assembly.
So in my top level assembly, let's say I have a box and a lid. I want the dimensions of the lid driven by the box, so that when I change the box, I don't have to go in and change the lid.
While in the top level assembly, I go tools, equations. In Global Variables, what do I then enter or click?
Thanks for the additional help!
Agreed, IMHO sketch relations should be your first go-to if you're trying to tie things together.
If they don't offer enough flexibility, you could look at standard equations but I doubt you will need those often.
Global variables are great but I think they work best when you're using the same dimension across multiple features in a part (such as the "thickness" global variable that is automatically created for sheet metal parts) or if you're planning on adjusting a dimension based on configurations.
Ah, yes, that's way more appropriate for my situation.
Did that, worked great!
When you add a dimension you can type ="W" (make sure to include the quotes) instead of the dimension. SW will ask if you want to define the new global variable, click yes, then type the dimension in like normal.
Once the variable is defined and set, you can click the earth symbol next to the dimension and choose your global variable (or type ="W" again) for any other dimensions you set and they will automatically tie to the global variable.
You can also right click the equations folder in the feature tree and select manage equations. In the global variable section, define your global variable name "W" (with quotes) and then define the value. The manage equations window is a pretty quick way to edit the values for all your global variables at once.
Thanks for the details Derek, I'll file this away for next time.
Brand new here, so sorry if this should be its own post rather than a reply to this one, but my question is pretty similar. I have a driven dimension inside a sketch, but I want to use that dimension in an equation in another feature within the same part. The concept of global variables is new to me, but from what I understand I need to make a global variable in order to use it in an equation outside the sketch. My question is, can a driven dimension be made into a global variable? As far as I can tell, I only have that option with driving dimensions.
I don't know if I've ever tried using a driven dimension to drive a global variable, but I know I've used one to drive a custom property and there was no change in workflow. Click on the sketch to show the dimension in the graphics area and them click on the driven dimension when you get to the point in your global variable where you want to link it. It should be inserted. I'm at home today and can't verify, but I'm reasonably sure it will work.
Retrieving data ...