← All days ◀ Day 11Day 13 ▶
28-Day SolidWorks Course · Week 2 · Day 12

Design Intent, Equations and Global Variables

Make a model that changes the right way. Name dimensions, link them with global variables and equations, and capture design intent so one number drives the part.

⏱ about 2–3 hours🧪 Lab: Live equation editor❓ 5-question quiz

1Today's goals

  • Explain design intent with examples
  • Rename dimensions and features meaningfully
  • Create global variables and equations
  • Use functions such as sqrt, iif and int; control suppression with equations

2Design intent

Design intent is how the model should behave when it changes. Two parts can look identical today and behave completely differently tomorrow.

SymmetricSketch about the origin / mirror / Mid Plane, so the part grows equally both sides.
Related sizes"Bore = OD/2", "PCD = OD − 40": equations.
Counts"Bolt count = 6 if OD < 200 else 8": equation with iif.
Standard stepsChoose from a list (configurations, design tables): Day 13.

Names

Every dimension has a full name like D1@Sketch1. Click a dimension and rename it in the PropertyManager (Primary Value box) to OD@Sketch1. Rename features too: Base flange, Bolt holes. Turn on View ▸ Hide/Show ▸ Dimension Names to see them.

The Equations dialog

Tools ▸ Equations (or right-click the Equations folder). Three views: Equation View, Sketch Equation View and Ordered View (solve order). Global variables are written in double quotes: "OD" = 160. Dimensions are referenced as "PCD@Sketch2". Functions include sin cos tan sqrt abs int sgn iif; pi is built in. You can also type = directly in any dimension's Modify box. Equations can live in an external text file and be shared by many parts (Link to external file).

A dimension driven by an equation shows a red Σ symbol and cannot be edited directly — edit the equation instead.

3Do it in SolidWorks: parametric flange

  1. Open your Day 7 flange. Rename dimensions: OD, Thk, Bore, PCD, BoltD.
  2. Tools ▸ Equations → Global Variables: "OD" = 200, "N" = 8.
  3. Equations: "OD@Sketch1" = "OD", "PCD@Sketch2" = "OD" - 40, "Bore@Sketch1" = "OD" / 4.
  4. Pattern count: "D1@CirPattern1" = "N".
  5. Rule: "N" = iif ( "OD" >= 200 , 8 , 6 ) — change OD to 160 and see the count drop to 6.
  6. Rebuild (Ctrl+B), then switch to Ordered View to see the solve order.
  7. Link the flange's mass to a custom property: "SW-Mass@Flange.SLDPRT" (File ▸ Properties).

4Lab: equations engine

This mini equation editor works like the SolidWorks dialog (in order, with global variables in quotes). Change "OD", "N" or the PCD rule and watch the flange and the computed mass update — and break it on purpose to see the warnings.

5Pro tips and common mistakes

  • Keep the drivers few: 3–6 global variables usually describe a part family.
  • Avoid circular references (A uses B and B uses A). SolidWorks marks them with errors.
  • When you use sin, cos or tan, test the equation with a known angle first so you know which angle unit it expects.
  • Equations can suppress features: "Rib1" = iif ( "OD" > 250 , "unsuppressed" , "suppressed" ).

6Practice

Make a parametric shaft collar: global variables "d" (shaft) and "w" (width). OD = 2·d, width = w, set-screw hole M = iif("d" < 20, 5, 6) tapped at mid-width. Test d = 12, 20, 30.

7Quick quiz

Five questions. Click an answer — you get the explanation straight away.

Progress is kept in this browser only.