- [Instructor] In this video we're going to give
a quick overview of variables and equations in SolidWorks
and show how to link them to dimensions.
The equations window can be found by clicking tools
and selecting equations.
Two-thirds of the way down the list in the equations window
you have three groups of variables.
Global variables, features and equations.
Global variables are named to variables that you define
in this window.
Once defined you can use them to define other variables,
features or dimensions in your part or assembly.
Features let you determine if a feature will be suppressed
based on a condition such as an if statement.
So, for example if we wanted to have this chamfer here
suppress if the outer diameter is below a certain point,
we would enter in that if statement here.
And lastly, equations is a list of all your dimensions
that are linked to equations or variables.
Let's add some equations to our simple cylinder part here.
So it's ID, OD and length can all be driven by one variable
which will be the outer diameter.
So let's set up our outer diameter global variable
by typing it in.
And we will set the value to be equal to 50
and close out the equations window.
Now the first thing we have to do is open up our sketch
for outer diameter
and capture the OD dimension here
and set that to be equal to our global variable.
So, in this box here where it says 50 millimeters,
we're going to hit equal.
And under the global variables drop down
select the outer diameter and hit this green checkbox.
This links the dimension to the variable.
So when the variables updated
the dimension updates along with it.
And hit okay.
You should see a red Sigma in front of your 50 millimeter
dimension here indicating that it is a linked dimension.
For the inner diameter, this 30 millimeter dimension here
we were actually going to set that to be equal
to our outer diameter divided by two.
Be sure to put spaces between
all of the your characters here.
And again, hit the green check box.
And you should have a value of 25 millimeters for your ID.
Now that our OD and ID are fully defined and linked
we can exit the sketch.
And we just have to capture the length
of our boss extruded one here.
To do this we're going to double-click on the boss
extrude one from our feature tree.
And this 280 millimeter dimension.
Now we are going to set this to be equal
to our outer diameter space
times five.
Now we put spaces here to allow us to continue to pick
from different drop-down menus.
For some reason in SolidWorks, if you don't put spaces
between your operators and variables
you lose the ability to pick from dropdown menus.
And hit the green check box here to link the dimension.
You should have a value of 250 millimeters
which is slightly smaller than it is.
So let's rebuild the part by hitting control and Q.
Now, if we go back into our equations under tools,
we can change the outer diameter
and our three captured equations here for the part OD,
ID and length will all automatically update.
So let's change the outer diameter to 200.
And we see that all of these values have changed.
And the part itself has increased dramatically.
The ability to update the design
by only changing a few parameters
such as these variables is a major benefit
to equation based modeling and saves you a lot of time
versus going through to each feature and updating them.
Now let's use this equation based design intent
to model our Spur gear.