How to Link Values with External Files in SOLIDWORKS

Article by Matthew Kusz on Jun 17, 2022

Linking values with external files in SOLIDWORKS allows users to change a common dimension value via one source. This can be useful when dealing with multiple designs that have to mate with the same interface. 

Renaming Dimensions

SOLIDWORKS names dimensions for us when starting our first sketch and placing our first dimension. Here, D1@Sketch1 in the first dimension at the first sketch, but we can change this information to read something different. This is the key to being able to link dimensions to external files. Let’s start with the two-part assembly I will be using as my example.

How to Link Values with External Files in SOLIDWORKS

In this view, we can see both have a Sketch1.

Default Name in a SOLIDWORKS Sketch

Here we can see the D1@Sketch1 for the PORT.

Link Values in SOLIDWORKS

And here, we can see the D1@Sketch1 for the Plug. 

We can now open our two parts and rename the D1@skeatch1 to be diamater@Sketch1.

Rename SOLIDWORKS Sketch

Primary Value Option in SOLIDWORKS

Creating a Global Variable using Equations 

Next, we will look at how we can create a global variable and then asign the variable to our dimension. Using the pull-down menu, find and open Equations.

Creating a Global Variable using Equations in SOLIDWORKS

SOLIDWORKS Equations Global Variable and Dimensions Window

We need to enter some information.

Equations, Global Variables, and Dimensions Fields in SOLIDWORKS

Click OK. The Equations are listed in the FeatureManager Design Tree.

Equations in the SOLIDWORKS FeatureManager Design Tree

Now we need to link this information to our part.

Edit the sketch, double-click on the dimension, and then hit the backspace key. This will clear the value and give a pull-down menu with the option to add a global variable.

SOLIDWORKS Modify Global Variables

Accept Checkmark in SOLIDWORKS Modify

Accept by clicking the check to accept the changes to this part and save.

Linking the external Global Variable to another part

Now that we have created a global variable, we can use this file inside our other part by linking the external reference. To do so, we will need to save our global variable as a txt file.

We need to manage our equations in our FeatureManager Design Tree. 

RMB on the Equations and select Manage Equations...

Manage Equations Option in SOLIDWORKS

Now we can export the information link out.

Link to External File Option in SOLIDWORKS

We will need to do something similar to the other part file. In this case, we will not be exporting but rather importing the location we just saved to.

SOLIDWORKS Link to External File Option

Link Equations in SOLIDWORKS

Variable that has been added and linked in SOLIDWORKS

Now we can see the variable link has been added. We will need to link our other diameter dimension in this other part to the global varial as we did to the previous part.

Modify SOLIDWORKS Sketch Checkmark

We are now ready to test our external reference. Open the equations.txt we just created and change the value from 2 to 4. Then save the equations.txt and rebuild your assembly.

Here is what our assembly looked like before.

SOLIDWORKS Assembly Link Values With External File

And here is what it looks like with the change we made.

SOLIDWORKS External Variable Linked to Text File

We can see that we were able to make changes to both parts using our external variable linked to a text file.

GoEngineer YouTube video SOLIDWORKS - Link Values with External File Want to see these methods and instructions in action? Check out our YouTube video SOLIDWORKS - Link Values with External File

I hope you found this tutorial helpful. Check out more SOLIDWORKS tips and tricks below.

More SOLIDWORKS Tutorials

Quickly Create a Radial Explode in SOLIDWORKS

How to Use SOLIDWORKS Feature Freeze

SOLIDWORKS Chain Component Pattern Tutorial

Save Time! Customize Your SOLIDWORKS User Interface

SOLIDWORKS Drawings - Section Depth: Only Show What You Need!

VIEW ALL SOLIDWORKS TUTORIALS

 

About Matthew Kusz

Matthew Kusz is a Senior Technical Support Engineer at GoEngineer. When Matthew isn’t assisting customers with their engineering challenges, he spends his free time repairing antique watches/clocks, designing furniture, tending his aquariums and learning about bee keeping.

View all posts by Matthew Kusz