How to Use Dimensional Constraints in BricsCAD
Quick answer: Dimensional constraints control six kinds of measurements, horizontal and vertical distance, length, radius, diameter, and angle, and are created using the current dimension style. You can edit them from three panels or with the DDEDIT command, control their visibility separately from the geometry, and write expressions referencing other constraints using a full set of operators and functions.
The Six Types of Dimensional Constraints
| Dimension | Command(s) |
|---|---|
| Horizontal distance | DCLINEAR or DCHORIZONTAL |
| Vertical distance | DCLINEAR or DCVERTICAL |
| Distance between points, or length of a line/polyline segment | DCALIGNED |
| Radius of an arc, circle, or arc polyline segment | DCRADIUS |
| Diameter of an arc, circle, or arc polyline segment | DCDIAMETER |
| Angle between entities, or between points and entities | DCANGULAR |
Dimensional constraints are always created using whatever dimension style is currently active.
Editing Dimensional Constraints
You can edit them from the Properties panel, the Mechanical Browser panel, the Parameters Manager panel, or with the DDEDIT command.
Via the Properties panel:
- Select the dimensional constraint; its properties appear in the panel.
- Type a new value or expression in the Expression field and press Enter. The Value field updates to match.
- Optionally edit the Name and Description fields.
- Optionally change the Reference field’s dropdown (new parameters default to Off).
- Optionally edit Text rotation.
- Press
Escto deselect.
Select several dimensional constraints at once to set their value equally across all of them.
Via the Mechanical Browser panel:
- Open the Mechanical Browser panel if it isn’t already.
- Select the constraint’s name in the Parameters list; its properties appear at the bottom.
- Optionally rename it via the Name field.
- Optionally edit its Expression field.
- Optionally change Geometry-driven (defaults to Off). Set to On, this disables the Expression field entirely, the value instead comes from the model and can only be changed through direct modelling.
- Optionally edit the Description field.
- Set the Exposed field, which controls whether the parameter is exposed when this drawing is inserted into another via
BMINSERT: Auto exposes it only if it doesn’t depend on other parameters, On always exposes it, Off never does. - Optionally set Units to linear, planar, or volume.
Via DDEDIT:
- Double-click the dimensional constraint, or run
DDEDIT. The Edit Text dialog opens. - Type a new value and press Enter or click OK.
- Optionally click another dimensional constraint and repeat.
- Press Enter or right-click to stop; every constraint you edited this way updates simultaneously.
Reference Parameters
Dimensional constraints (dynamic or annotative) can be converted into reference parameters, which stop constraining geometry and instead just display an updating measurement. This works the same way here as described on the 2D Constraints overview page: toggle it via the Reference field in Properties, or Geometry-driven in the Mechanical Browser, and note that a reference parameter’s Expression field can’t be edited directly until it’s converted back.
Controlling Visibility
Dimensional constraints are hidden by default whenever you close and reopen a drawing. Tools to control their display live on the Dimensional Constraint toolbar, the 2D Parametric ribbon tab, and the Show/Hide 2D Constraints flyout on the Parametric menu, all of which run DCDISPLAY with a specific option:
- Show/Hide: prompts you to select which entities to toggle.
- Show All: shows every dimensional constraint in the drawing.
- Hide All: hides every dimensional constraint in the drawing.
Two related settings:
DYNCONSTRAINTMODE: when on, selecting an entity temporarily shows its hidden dimensional constraints; when off, they stay hidden even while selected.- With
SELECTIONPREVIEWset to 1 or 3, hovering over a constrained entity shows a small blue constraint glyph.
Naming and Using Constraints in Expressions
Constraints get named automatically as they’re created, following a pattern by type:
| Type | Naming pattern |
|---|---|
| Distance | d1, d2, d3… |
| Radius | rad1, rad2, rad3… |
| Diameter | dia1, dia2, dia3… |
| Angular | ang1, ang2, ang3… |
Any constraint’s name can be used as a parameter inside another constraint’s expression. For example, a bracket’s overall shape might be controlled directly by rad1, d1, and ang1, while a hole’s radius (rad2) and a second leg’s length (d2) are each defined by an expression referencing those, with geometric constraints separately forcing the second leg and its hole to match the first leg’s width.
Operators
| Operator | Meaning |
|---|---|
+ |
Addition |
- |
Subtraction or negative |
* |
Multiplication |
/ |
Division |
^ |
Exponentiation |
% |
Modulo/remainder, for example 5 % 2 evaluates to 1 |
Expressions follow standard mathematical precedence: brackets first (innermost first), then exponents, then multiplication and division, then addition and subtraction, with operators of equal precedence evaluated left to right.
Functions
| Function | Syntax |
|---|---|
| Sine / Cosine / Tangent | sin() / cos() / tan() |
| Arc sine / Arc cosine / Arc tangent | asin() / acos() / atan() |
| Hyperbolic sine / cosine / tangent | sinh() / cosh() / tanh() |
| Arc hyperbolic sine / cosine / tangent | asinh() / acosh() / atanh() |
| Square root | sqrt() |
| Signum (-1, 0, 1) | sign() |
| Round to nearest integer | round() |
| Truncate decimal | trunc() |
| Round down / up | floor() / ceil() |
| Absolute value | abs() |
| Largest / smallest of two values | max(a;b) / min(a;b) |
| Degrees to radians / radians to degrees | d2r() / r2d() |
| Logarithm base e / base 10 | ln() / log() |
| Exponent base e / base 10 | exp() / exp10() |
| Power | pow(a;b) |
| Random decimal between 0 and 1 | Random |
For functions taking two values, use whichever list separator your system uses, a comma or semicolon.
Creating a New Parameter
- Right-click Parameters in the Mechanical Browser panel and choose Add new parameter.
- Edit its properties the same way as any other Mechanical Browser parameter, described above.
Two more things worth knowing: the constants Pi (3.14…) and e (2.72…) are available in expressions, and their names can’t be reused as a parameter or constraint name. Run CLEANUNUSEDVARIABLES to purge any parameters that aren’t actually used in a constraint expression or linked to a dimension.
Frequently Asked Questions
How are new dimensional constraints named by default? By type: distances get d1, d2, and so on; radii get rad1, rad2; diameters get dia1, dia2; angles get ang1, ang2.
Can one constraint’s value depend on another’s? Yes, any constraint’s name can be used as a parameter in another constraint’s expression, which is how you drive several dimensions from a smaller set of controlling values.
Why are my dimensional constraints not visible after reopening a drawing? That’s expected; they’re hidden by default every time a drawing is closed and reopened. Use DCDISPLAY (Show All, Hide All, or Show/Hide) to control this.
What’s the difference between the Reference and Geometry-driven fields? They’re the same underlying toggle, just accessed from different panels. The Reference field is in the Properties panel; Geometry-driven is the equivalent field in the Mechanical Browser panel.