Global variable and equations in SOLIDWORKS link various dimensions to a specific value or to one another. This technique helps manage the size and shape of your model by modifying only a few variables; and also potentially prevents forgetting some relations between various dimensions in the future. In addition, equations and variables could be exploited in a Design Table as a further use of the parametric capabilities of SOLIDWORKS to control your model. These global variables and equations are not limited to one single part or assembly. We can share or link SOLIDWORKS variables or equations between different models.
Export and Import Equations to and from External Files
In SOLIDWORKS, all or a selected number of equations could be exported to a text file. Then, those equations can be imported from that text file. The text file can be shared with other parts and assemblies as well. Note that the part or assembly must be using the same global variables and equations. The global variable and equations window can be opened from Tools > Equations. Also, you can find them in the Equations folder located in the feature design tree. The import and export buttons are shown in this screenshot:
After pressing the export button, in the Export Equations window you can select which global variable or equation you want to export and also which one you want to link to an exported file.
The exported file will be a *.txt file which you can open with Windows Notepad. These equations could also have been written in a Notepad file and then imported to our part or assembly model. This file could also be modified and re-imported to our model or keep “Link to external file” option selected to apply changes of the exported *txt file to the SOLIDWORKS file. The “Link to external file” option can be found at the bottom left-hand corner of the equations and global variables window.
Note: The Export and Import processes includes options for one-time export and import without a link.