Reference Dimensions Across Bodies in FreeCAD

In FreeCAD, you can reference external dimensions and geometry from another body inside a sketch, but you cannot directly click-select elements across different PartDesign bodies using the standard External Geometry tool without causing dependency conflicts. To achieve cross-body referencing safely, you must use either a SubShapeBinder for geometric references or the Expression Engine (often paired with a Spreadsheet) for purely numerical dimensional linking.

Method 1: Using a SubShapeBinder (For Geometric References)

When you need a sketch to snap to an edge, vertex, or face belonging to a different body, the SubShapeBinder creates a non-breaking reference link inside the active body.

  1. Activate the Target Body: Double-click the body containing the sketch you are working on to ensure it is active.
  2. Select the External Geometry: In the 3D view or tree view, select the face, edge, or vertex from the other body that you want to reference.
  3. Create the Binder: Click the Create a sub-object(s) shape binder icon in the PartDesign toolbar (a green sheet/cube icon). This places a binder object inside your active body linked to the external feature.
  4. Project into the Sketch: Open your sketch, select the Create an edge linked to external geometry tool (shortcut X), and click the geometry of the SubShapeBinder.

The external feature will turn magenta, allowing you to apply standard constraints (coincident, distance, tangency) to it within your sketch.

Method 2: Using Expressions (For Direct Dimension Linking)

If you only need to match a numeric dimension (such as length, radius, or angle) without projecting 3D geometry into the sketch plane, you can reference the constraint directly using FreeCAD's Expression Engine.

  1. Name the Source Constraint: Open the sketch in the first body, select the dimension constraint you wish to reference, open its properties, and assign it a distinct name in the Name field (e.g., MainWidth).
  2. Open the Target Sketch: Open the sketch in your second body and add the desired dimensional constraint.
  3. Link via Formula: Click the small blue Formula editor icon (f(x)) next to the constraint value field.
  4. Enter the Reference Path: Input the path to the constraint using the format:
    SketchName.Constraints.ConstraintName
    (Example: Sketch.Constraints.MainWidth)
    If the bodies share identical sketch names, specify the body:
    <<BodyName>>.SketchName.Constraints.ConstraintName

Once confirmed, the dimension field will turn orange, indicating it is parametrically driven by the external sketch dimension.

Method 3: Using a Spreadsheet (Best Practice)

For complex multi-body assemblies, referencing sketches directly to one another can lead to circular dependencies and model breakage. The most robust approach is using the Spreadsheet Workbench:

  1. Create a centralized spreadsheet containing your primary design dimensions with defined aliases.
  2. In both bodies, bind sketch constraints to the spreadsheet cells using =Spreadsheet.AliasName in the formula editor.
  3. Modifying the central spreadsheet will update both bodies simultaneously without creating direct dependencies between the two bodies.