Formulas for extracting overall dimensions in 3D models and inserted objects

The following two sets of formulas lets you extract the overall dimensions of 3D models and external object inserted into 3D models.

The overall dimensions correspond to the length, width and height of the bounding box that encompasses the 3D model or inserted object. These values are taken from the length, width and height that are displayed in the tabular area of 3D drawings — in the Dimensions column of each phase.

Formulas for extracting the overall dimensions of 3D models
For FORMULA
Length Fold3DN.BoundingBoxLength(PhaseName; Units; UseParts)
Width Fold3DN.BoundingBoxWidth(PhaseName; Units; UseParts)
Height Fold3DN.BoundingBoxHeight(PhaseName; Units; UseParts)
  1. The parameters
  2. PhaseName: The name of the phase as set for the active 3D drawing. If PhaseName is left empty, the dimensions of the last phase of the 3D model are displayed.
  3. UseParts: A placeholder for the values True or False. It determines if the dimension is calculated by taking into account any visible — that is, not hidden from view — additional parts added to the 3D model. If false is used, the dimensions of the added external parts are not taken into account. If true is used (the default state), the dimensions of the added parts are taken into account. NOTE: For the value true, the values 1 and yes can be used with identical result. For the value false, the values 0 and no can be used with identical result.
  4. Know your list separator: When typing a formula, make sure you separate its elements with your computer's list separator symbol. Yours may be different from the one used in this guide. Examples (in red):
    With Semicolon With Comma
    $Layout1.Length(Cutting; m; yes); n2$ $Layout1.Length(Cutting, m, yes), n2$

Examples

To measure Phase Units Use
The length Initial State mm $Fold3D1.BoundingBoxLength(Initial State; mm; true)$ mm.
The width Production mm $Fold3D1.BoundingBoxWidth(Production; mm; yes)$ mm.
The height Assembly mm $Fold3D3.BoundingBoxHeight(Assembly; mm; 1)$ mm.
Formulas for extracting the overall dimensions of inserted objects
For FORMULA
Length $Fold3DN.BoundingBoxLength(, Units)$
Width $Fold3DN.BoundingBoxWidth(, Units)$
Height $Fold3DN.BoundingBoxHeight(, Units)$

NOTE: Units makes the formula extract the dimension values in the currently used measurement units. In formulas, use smallcase when typing the letters indicating the units.

Examples

To measure Object linked to Units Use Example
Length Fold3D1 mm $Fold3D1.BoundingBoxLength(, mm)$ mm. 34.50 mm.
Width Fold3D1 cm $Fold3D1.BoundingBoxWidth(, cm)$ cm. 4.20 cm.
Height Fold3D3 mm $Fold3D3.BoundingBoxHeight(, mm)$ mm. 14.60 mm.

NOTE: When citing the names of external objects, pay attention to how they are placed into the respective predefined areas.

IN THE DESIGN FRAME

In the following table, the left frames cite the predefined areas. All dimensions-extracting formulas in the right frames refer to the objects placed into the predefined areas.

IMPORTANT: In design frames, Expression means that a formula is correctly entered and will produce an actual result when the design frame is applied in a print drawing.

IN THE PRINT DRAWING

The following pictures shows how external objects are linked to predefined areas as pictured above. While you are setting up the print drawing, you refer the external objects to the predefined area names. In the Print Frame Placement dialog box, you refer the external objects to the predefined areas. When in the dialog box you click Apply, you will see how the formulas are applied and the external objects displayed in the predefined areas.

IMPORTANT: Note the actual extracted overall dimensions of external objects under 3D dimensions.

See the general rules for how to write formulas and format formula results.