If you’ve ever taken SOLIDWORKS Training, then you are definitely familiar with the concept of design intent. Considering how a part may need to change and creating the model with this in mind will make life much easier for you and other users when it comes time to make revisions…  and there are always revisions!  One of my favorite ways to maintain design intent is the use of equations and, until recently, I believed these wonderful constraints were limited to the part in which they were created. Fortunately, I was wrong.

variables

A recent modeling exercise I completed involved using SOLIDWORKS to model a set of plastic toy building blocks manufactured by a Danish toy block company, which will remain unnamed. Once all the parts were modeled, I mated them inside an assembly to build a convertible car (with help of the instructions of course).

Design tables and multi-configuration parts were used to narrow down the 100+ piece set into 29 separate SOLIDWORKS part files. One of the most interesting challenges was maintaining design intent across the series of parts. I knew that, without dimensional consistency, creating the assembly would be a nightmare of grand proportions. In my search for a solution, I discovered that not only could I share global variables and equations among multiple parts, but that I could even control their values from a single text file. So I created variables in my first part, exported them to a text file, linked the values to the file, and then imported the variables into each subsequent part. With this system in place, I could work with a common set of variables in all my parts and any value changed in the text file would automatically update each part. Marvelous! So how is it done? Glad you asked…

Export/Import Linked Equations

variables

First you’ll want to establish which variables and equations you’d like share within your parts. These should be chosen based on common dimensions and how you expect the parts to be changed. This is an important step, but don’t worry, you can always add and/or remove variables or equations later. It’s also important to make sure any dimensions, sketches, or features referenced by an equation have the same name in all parts. Once you’ve determined what to share, open the part file containing the equations, go to the Equations Dialog Box (Tools>Equations) and select “Export”. It’s possible you’ve never noticed the export option, but it’s been there, waiting to be utilized since 2011.

variables

In the Export Equations Dialog Box, you’ll have the option to select which variables and/or equations to export (first column) and which to have linked (second column). Make sure the “Link to file” box is checked.

variables

And there you have it! You now have a text file from which you can change values and add new variables or equations. Any value changes will be automatically updated when the part is re-built, however, any new variables or equations will need to be imported manually.

variables

You’ll notice when you return to the Equation Dialog Box that the linked equations are now grayed out indicating their values are controlled by an external file. The values can be un-linked by clearing the check box associated with each equation.

Now that you’ve created a text file of equations, you can begin importing them to other parts by going to the Equations Dialog Box (Tools>Equations) and selecting “Import”. As with exporting, you’ll have the option in the Import Equations Dialog Box to select which variables and/or equations to import and which to have linked. Once complete, the imported equations will be grayed out in the Equations Dialog Box and the “Link to external file” box will be checked and the text file address shown.

Why Share?

It’s not hard to see how useful sharing equations and variables among models can be. First and foremost, it provides an effective way to control multiple models from one location, while reducing build and revision time. Sharing equations and variables can also promote model consistency among different users by providing a common set of modeling constraints. A less obvious, but important, benefit is that sharing equations facilitates good design intent by encouraging users to think about key geometry and dimensions while modeling. SOLIDWORKS provides a ton of ways to control your models and sharing equations is another valuable tool to have in your modeling tool belt. Now go forth and share!


Tags: , ,