Skip to content
SOLID WORKS ClubSOLID WORKS Club

Advanced parts · Lesson 9

SOLIDWORKS global variables

A global variable is a named value — Thk = 8 mm, Clearance = 0.5 mm — that any dimension or equation in the file can use. Change it once and every dimension that uses it updates. Linked to an external text file, the same variables can drive several parts at once. Always give global variables units, or a switch of document units can change their meaning.

Kevin Walsh Kevin Walsh Updated Checked for SOLIDWORKS 2026
Global variable Thk driving the thickness of a plate and the height of a boss

Where to find it

Tools → Equations → Global Variables; or type = and a new name in a Modify box

Global variables at a glance

Item Detail
Create Equations dialog, or = plus a new name in a Modify box
Shown as Gold text with a globe icon
Use in Any dimension or equation, in quotes: "Thk"
Units Supported since 2013 — always type them
Configurations Configurable since 2014
Share Link to external file (equations.txt); lines read "Name" = value

For formulas between dimensions, see equations; for whole families of sizes, design tables.

Practise it: drive the spur gear from module and tooth count.

Step by step

  1. 1

    Create the variable

    Tools → Equations. Under Global Variables add Thk with the value 8mm (type the unit). It shows in gold with a globe icon.

  2. 2

    Use it for the plate

    Extrude a 100 × 50 mm rectangle and set the depth to = "Thk" in the Modify box.

    Extrude depth set to the global variable Thk in the Modify box
    Any dimension can use a global variable.
  3. 3

    Use it twice

    Add a Ø20 boss on top, centred, and set its height to = "Thk" * 2.

  4. 4

    Change the variable

    In Tools → Equations change Thk to 10mm and rebuild. The plate and the boss both update.

  5. 5

    Share with other parts (optional)

    In the Equations dialog use Link to external file to save the variables in a text file. Other parts can link to the same file; edit it, save and rebuild (Ctrl + B) to update them all.

Common mistakes

  • Values without units. Hawk Ridge describes a 20 in screen size turning into 20 mm after a unit change. Type the unit.
  • Expecting a global variable to exist in other files. It belongs to its file unless you share it through an external text file.
  • Editing linked variables inside SOLIDWORKS — they are locked; edit the text file.

Lesson 9 of 16 in the advanced parts course.

Practice

Build the plate (100 × 50 × Thk) and the Ø20 boss (height 2 × Thk). Check: with Thk = 8 mm the volume is 45,026.55 mm³; with Thk = 10 mm it is 56,283.19 mm³.

Sources

Checked November 2026. SOLID WORKS Club is independent; menu names can differ slightly between releases.

Frequently asked questions

How do I create a global variable in SOLIDWORKS?

+

In Tools → Equations add it under Global Variables, or type = and a new name in a dimension's Modify box and SOLIDWORKS offers to create it.

Can global variables be used in several parts?

+

A global variable belongs to one file, but you can link files to the same external text file so they share the values.

Do global variables need units?

+

Yes, give them units. Without units a change of document units can change what the number means.

Can global variables differ by configuration?

+

Yes, since SOLIDWORKS 2014 their values can be configured per configuration.