Using dimensional constraints

Dimensional constraints control the dimensions of 2D entities.

  • Horizontal distance (1) (DCLINEAR and DCHORIZONTAL commands).
  • Vertical distance (2) (DCLINEAR and DCVERTICAL commands).
  • Distance between points or the length of lines and polyline segments (3) (DCALIGNED command).
  • Radius of arcs, circles and arc polyline segments (4) (DCRADIUS command).
  • Diameter of arcs, circles and arc polyline segments (5) (DCDIAMETER command).
  • Angle between entities or between points and entities (6) (DCANGULAR command).
Note: Dimensional constraints are created using the current dimension style.

Editing dimensional constraints

Dimensional constraints can be edited:

  • In the Properties panel.
  • In the Mechanical Browser panel.
  • In the Parameters Manager panel.
  • Using the DDEDIT command.
You can set dimensional constraints (dynamic or annotative) as reference parameters from:
  • The Properties panel by changing for the selected dimensional constraint/s the value of the Reference property from No to Yes.
  • The Mechanical Browser panel by changing the value of the Geometry-driven field from Off to On.
Note: Reference parameters no longer constrain geometry. They display measurements and update when the geometry is modified. Thus, you can no longer manually edit the Expression field value. To do this, set back the reference parameter as a dimensional constraint.

The reference parameters are displayed within brackets in model space, paper space, and in the Mechanical Browser panel. All reference parameters in the drawing are listed in the Parameters Manager under the Reference Parameters category.

Editing dimensional constraints in the Properties panel

  1. Select the dimensional constraint.

    The properties of the entity display in the Properties panel.

  2. Type a new value or expression in the Expression field, then press Enter.

    The readout of the Value field changes accordingly.

  3. (Optional) Edit the Name field.
  4. (Optional) Edit the Description field.
  5. (Optional) Select the Reference field, then click the down-arrow button and choose an option. A new parameter gets the Off option by default.
  6. (Optional) Edit the Text rotation field.
  7. Press the Esc key to unselect.
Note: Select multiple dimensional constraints simultaneously to set their value equally.

Editing dimensional constraints in the Mechanical browser panel

  1. If not already open, open the Mechanical Browser panel.
  2. Select a name of the dimensional constraint in the Parameters list.

    The properties of the selected parameter are displayed at the bottom of the Mechanical browser panel.

  3. (Optional) Select the Name field, then type a new name.
  4. (Optional) Select the Expression field, then type a new value or expression.
  5. (Optional) Select the Geometry-driven field, then click the down-arrow button and choose an option. A new parameter gets the Off option by default. If set to On, it disables the Expression field. The value of a parameter value is obtained from the model and can be changed with direct modeling operations.
  6. (Optional) Select the Description field, then type a new description.
  7. (Optional) Set the Exposed field, which specifies whether the parameter is exposed when the drawing is inserted in another drawing using the BMINSERT command.
    The options are:
    • Auto: the parameter is exposed only if it does not depend on other parameters.
    • ON: the parameter is always exposed.
    • OFF: the parameter is never exposed.
  8. (Optional) Set the Units property: linear, planar or volume.

    Select the field, then click the down-arrow button and choose an option.

Using the DDEDIT command

  1. Do one of the following:
    • Double click the dimensional constraint.
    • Launch the DDEDIT command.

    You are prompted: _DDEDIT

    The Edit Text dialog box displays.

  2. Type a new value in the Text field, then press Enter or click the OK button.
  3. (Optional) Click another dimensional constraint and repeat the previous step.
  4. Do one of the following:
    • Keep editing more dimensional constraints.

    • Press Enter or right click to stop.

      All edited dimensional constraints are updated simultaneously.

Setting the visibility of dimensional constraints

Dimensional constraints are hidden when a drawing is closed and reopened.

Tools to control the display of dimensional constraints are located on:
  • the Dimensional Constraint toolbar.
  • the 2D Parametric ribbon tab.
  • the Show/Hide 2D Constraints fly-out menu of the Parametric menu.

These tools execute the DCDISPLAY command using a specific option.

The options are:

  • Show/Hide: prompts you to select the entities.
  • Show All: show all dimensional constraints in the drawing.
  • Hide All: hide all dimensional constraints in the drawing.
Note:
  • The DYNCONSTRAINTMODE system variable controls the visibility of hidden dimensional constraints when selecting entities:
    • ON: display dimensional constraints when entities are selected.
    • OFF: dimensional constraints remain hidden when entities are selected.
  • When hovering over an entity with a dimensional constraint, the blue constraint glyph () displays if the SELECTIONPREVIEW system variable is set to 1 or 3.

Using expressions to define dimensional constraints

Dimensional constraints are named automatically upon creation.

The naming rules are as follows:

  • distance: d1, d2, d3, ...
  • radius: rad1, rad2, rad3, ...
  • diameter: dia1, dia2, dia3, ..
  • angular: ang1, ang2, ang3, ..

The name of a constraint can be used as a parameter in a mathematical expression to define another dimensional constraint.

The dimensions of the bracket below are controlled through the rad1 radius, d1 distance and ang1 angular dimensional constraints.

The radius of the hole (rad2 ) and the length of the second leg (d2 ) are defined by expressions.

Geometric constraints force the width of the second leg and the hole in it to be equal to the first leg.

Using operators in expressions

The following operators can be used in expressions:

Operator Description
+ Addition
- Subtraction or Negative
* Multiplication
/ Division
^ Exponentiation
%

Modulo or Remainder operator

The expression "5 % 2" would evaluate to 1, because 5 divided by 2 leaves a quotient of 2 and a remainder of 1.

Expressions are evaluated according to the standard mathematical rules of precedence:

  1. Expressions within brackets; innermost sets first.
  2. Standard operations order:
    1. exponent
    2. multiplication and division
    3. addition and subtraction
  3. Operators of equal precedence from left to right.

Using functions in expressions

The following functions can be used in expressions:

Function Syntax
Sine sin(expression)
Cosine cos(expression)
Tangent tan(expression)
Arc sine asin(expression)
Arc cosine acos(expression)
Arc tangent atan(expression)
Hyperbolic sine sinh(expression)
Hyperbolic cosine cosh(expression)
Hyperbolic tangent tanh(expression)
Arc hyperbolic sine asinh(expression)
Arc hyperbolic cosine acosh(expression)
Arc hyperbolic tangent atanh(expression)
Square root sqrt(expression)
Signum function (-1,0,1) sign(expression)
Round to nearest integer round(expression)
Truncate decimal trunc(expression)
Round down floor(expression)
Round up ceil(expression)
Absolute value abs(expression)
Largest element in array max(expression1;expression2)*
Smallest element in array min(expression1;expression2)*
Degrees to radians d2r(expression)
Radians to degrees r2d(expression)
Logarithm, base e ln(expression)
Logarithm, base 10 log(expression)
Exponent, base e exp(expression)
Exponent, base 10 exp10(expression)
Power function pow(expression1;expression2)*
Random decimal between 0 and 1 Random

* Use the list separator character as defined on your system: , (comma) or ; (semicolon).

Creating a new parameter

  1. Right click Parameters in the Mechanical Browser panel.

    A context menu displays.

  2. Select Add new parameter in the context menu.

    A new parameter is created.

  3. Edit the properties of the new parameter.

    See the Editing dimensional constraints in the Mechanical browser panel procedure above.

Note:
  • The constants Pi=3.14... and e=2.72... can be used in expressions. The constants names are not allowed to be used as a parameter or constraint name.
  • The CLEANUNUSEDVARIABLES command purges parameters that are not used in constraint expressions or linked to dimensions.