Close

Relief for ODA Team in Ukraine

Learn more
ODA Drawings SDK
Working with Dimension Fit and Movement

Fit and movement values define the structure and behavior of a dimension entity when its dimension text box and dimension lines are moved.

Dimtmove

The Dimtmove value specifies the method of movement for a dimension text box and dimension lines relative to one to another, and also defines the entity behavior, leader visibility, and interpretation of the text position. Dimtmove is an integer value and can have the following values:

  • 0 — The dimension lines and dimension text box move together. When the dimension lines move, the dimension text box moves next to it. When the dimension text box moves, the dimension entity moves, with its placement depending on the type of dimension entity:
    • Linear, angular, and arc-length dimensions — Dimension lines move together next to the dimension text box along the extension lines.
    • Diametric, radial, and radial large dimensions — The single dimension line moves inside or outside of the definition entity and is rotated around the center in the direction of the chord point.
    • Ordinate dimension entities — The single extension line and hook line are moved perpendicularly to the definition axis and the length of the extension line and jog are changed.

    If the dimension text box is placed outside of extension lines, a leader line is drawn, which extends the dimension line from an extension line to the dimension text box margin. If there is not enough space between the extension lines, the text and arrowheads are placed according to the Dimatfit value. The text position is the center of the dimension text box for all dimension entities.

    This is the initial value.

    For aligned linear and rotated linear dimension entities:

    For two-line angular, three-point angular, and arc-length dimension entities:

    For radial, radial large, and diametric dimension entities:

    For ordinate dimension entities:

  • 1 — The dimension lines and dimension text box move independently and are connected with a leader. When the dimension text box moves, the action depends on the type of dimension entity:
    • Linear, angular, and arc-length dimensions — Dimension lines remain in their original location, and a leader line is drawn from the middle of the dimension line to the dimension text box margin. The leader line rotates and jogs to the dimension text box when it moves.
    • Ordinate, diametric, radial and radial large dimensions — Dimension lines have the same behavior as when Dimtmove is set to 0.

    The text position is the start point of the leader line for aligned and rotated linear dimension entities; the center of the dimension text box for angular, ordinate, radial large, and arc-length dimension entities; and the start point of the dimension line for diametric and radial dimension entities.

    For aligned linear and rotated linear dimension entities:

    For two-line angular, three-point angular, and arc-length dimension entities:

    For radial, radial large, and diametric dimension entities:

    For ordinate dimension entities:

  • 2 — The dimension lines and dimension text box move independently and a leader line is not drawn. When the dimension text box moves, the action depends on the type of dimension entity:
    • Linear, angular, and arc-length dimensions — Dimension lines remain in their original location.
    • Radial, radial large, and diametric dimensions — The single dimension line is placed inside of the definition entity only and is rotated around the center in the direction from the center to the text position.
    • Ordinate dimensions — The single extension line remains in its original location.

    The text position is the center of the dimension text box for all dimension entities.

    For aligned linear and rotated linear dimension entities:

    For two-line angular, three-point angular, and arc-length dimension entities:

    For radial, radial large, and diametric dimension entities:

    For ordinate dimension entities:

To get the Dimtmove value, use the dimtmove() method, which returns the Dimtmove value as an OdInt16 value.

For example:


odPrintConsoleString(L"\nDimtmove value is %d", pDimension->dimtmove());

To set a new Dimtmove value, use the setDimtmove() method, which requires one OdInt16 parameter to specify the new Dimtmove value.

For example:


pDimension->setDimtmove(1);

Dimatfit

The Dimatfit value controls the placement of the dimension text box and arrowheads relative to extension lines. The fit defines the behavior of a dimension entity when there is not enough space between the extension lines to place the text and arrowheads.

The Dimatfit value is not available for ordinate dimension entities but is applicable to all another dimension entities.

The fit is an OdInt16 value and can have the following values:

  • 0 — Moves both text and arrowheads outside of extension lines. The space between extension lines is empty.
  • 1 — Moves arrowheads outside of extension lines, and text is placed between extension lines.
  • 2 — Moves text outside of extension lines, and arrowheads are placed between extension lines.
  • 3 — Moves either text or arrowheads or both outside of the extension lines to provide the best fit. This is the initial value.

When enough space is available between extension lines to draw the text and arrowheads together, the text and arrowheads are placed inside of the extension lines and the Dimatfit value is ignored. When space is available for neither text nor arrowheads, text and arrowheads are moved together outside of extension lines and the Dimatfit value is ignored.

To get the Dimatfit value, use the dimatfit() method, which returns the Dimatfit value as an OdInt16 value.

For example:


odPrintConsoleString(L"\nDimatfit value is %d", pDimension->dimatfit());

To set a new Dimatfit value, use the setDimatfit() method, which requires one OdInt16 value as a new Dimatfit value. For example:


pDimension->setDimatfit(1);

See Also

Working with Dimensions

Working with Common Dimension Entity

Working with General Dimension Methods

Positioning Dimension Text

Formatting Dimension Text

Working with Dimension Lines

Working with Extension Lines

Working with Dimension Tolerances

Working with Dimension Values

Working with Primary Unit Measurements

Working with Alternate Unit Measurements

Marking the Center of Dimensions

Copyright © 2002 – 2022. Open Design Alliance. All rights reserved.