Formulas extracting length

The formulas that follow extract length values from objects in 1up and layout drawings. You can extract the lengths of objects by referring to:

Extracting lengths by referring to objects' styles

For Use
1up OneUpN.Length(StyleName; units; withChildStyles)
Layout LayoutN.Length(StyleName; units; withChildStyles)
  1. THE PARAMETERS
  2. StyleName: The style of the objects whose length you want to extract. TIP: To extract the total length of all objects in all styles, leave the argument empty. In this case, the result always includes the lengths of objects in child styles.
  3. Units: The measurement units in which EngView will compute the result. To use the default units, leave the argument empty.
  4. withChildStyles (Applies when you have supplied a style name.) Controls whether the combined length of all child styles the selected style should be included. Values: Yes = included; No = not included. Example: $Length(Creasing; m; yes)$ returns the combined lengths of all objects in the Creasing style and its child styles. Instead of Yes, you can use also true or 1; instead of No, you can use false or 0. No is the default and can be omitted.
  5. 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

The formulas extract the lengths of objects in the Layout1 predefined area.

Style Units Precision Use Example
All Default Default $Layout1.Length()$ 7316.75
All Default 0 $Layout1.Length(), n0$ 7317
All Meters Default $Layout1.Length( , m)$ m. 7.32 m.
Creasing Default Default $Layout1.Length(Creasing)$ 2461.41
Creasing Meters Default $Layout1.Length(Creasing, m)$ m. 2.46 m.
Creasing, incl. child styles Meters 1 $Layout1.Length(Creasing, m, yes), n1$ m. 3.3 m.
top of page

Extracting lengths by referring to object filters

IMPORTANT: For EngView to apply a filter, it must be of the Shared type. Learn more about how to make a filter Shared (Step 3).

For Use
1up OneUpN.LengthByFilter(FilterName, units)
Layout LayoutN.LengthByFilter(FilterName, units)
  1. THE PARAMETERS
  2. FilterName: The name of the filter. Learn how to create and apply filters. After you have created a filter, here type its name.
  3. Units: The measurement units in which EngView will compute the result. To use the default units, leave the argument empty.
  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

The formulas extract the lengths of objects in the Layout1 predefined area.

Filter Name Units Precision Use Example
Circles15 Default Default $Layout1.LengthByFilter(Circles15)$ 7316.75
Arcs>20 Default 0 $Layout1.LengthByFilter(Arcs>20), n0$ 7317
Circles>105 Centimeters Default $Layout1.LengthByFilter(Circles>105, cm)$ cm. 7.32 cm.

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

top of page