# SolidWorks Quick Tip - Global Variables and Equations

By Terence Woo

Global variables and equations are a great way to capture design intent and add intelligence to SolidWorks models. If you’re new to global variables and equations in SolidWorks, here’s a quick intro. And if you’re already a pro, check out the NEW items. Both the 2013 and 2014 versions of SolidWorks introduced new functionality for equations. Let’s use a simple example. In this computer monitor model, my first sketch is a rectangle to define the screen and has dimensions for the width and height. However, screens are typically sized by their diagonal length and aspect ratio, not width and height. (Fun fact link if you’re curious about why.) To take care of this, the width and height of my rectangle are controlled by global variables and equations. With two variables for “Diagonal Size” and “Aspect Ratio”, and some help from our buddy Pythagoras, I can create a couple of equations to define a 16:9, 20” screen. Global variables and equations can be created and modified in a few different ways. You can go to Tools > Equations, launch the “Equations, Global Variables, and Dimensions” dialog box, and fill in the table. You can also create global variables and equations directly in the “Modify” box of a dimension. Simply type in a name to define a new global variable, or type the = sign to begin a new equation. NEW: One additional place where you can create global variables and equations, which was added in 2013, is directly in PropertyManager fields. Like the “Modify” box, just type in a name or the = sign. NEW: Also added in 2013, global variables can have units! When working with global variables, units are commonly overlooked. This is the one place in SolidWorks where the document units are not automatically added to the values you input. You have to explicitly type in the units. This gives us flexibility, but can be dangerous. For example, when I change the document units from inches to millimetres… If I remembered to type “in” for inches, I get a 508mm (20”) screen to use as my second monitor: But if I forgot to include my units, I get a somewhat less useful 20mm screen: NEW: Now what if I want different sizes? With SolidWorks 2014, global variables and equations are now configurable! Similar to dimensions, once you have created multiple configurations, a drop-down menu allows you to select which configurations to change. So there’s a quick look at global variables and equations and some of the new options we have available to us. Of course, equations can be used to do a whole lot more in SolidWorks, from controlling the number of pattern instances to conditionally suppressing features with “if” statements. If you’re checking out equations for the first time, a good place to start is the equations tutorial you can access by going to Help > SolidWorks Tutorials. For those of you that have been using equations for a while, leave a comment and let us know what you think of the new enhancements.  Be sure to check out our YouTube channel for more quick tips like this!