Formula patterns
DRAWING |
FORMULA TO USE |
1UP |
$OneUp1.Count(StyleName); format$ |
LAYOUT |
$Layout1.Count(StyleName); format$ |
Examples
TO COUNT |
USE |
YOU WILL SEE |
The number of objects in a specified style in the 1up drawing |
$OneUp1.Count(Cutting)$ | The number of objects in the Cutting style in the OneUp1 drawing in the default precision |
The number of objects in a specified style in the layout drawing |
$Layout1.Count(Creasing); n0$ pcs | The number of objects in the Creasing style in the Layout1 drawing displayed as an integer and with added explanatory text (in this case 'pcs') |
IMPORTANT: space-separated style names; case sensitivity; list separators
SPACE-SEPARATED STYLE NAMES: In a formula, to refer to a style whose name is made up of multiple words separated by spaces, enclose the style name in quotation marks:
$ONEUP1.LENGTH("RILLEN 3PT", m)$
$ONEUP1.LENGTH("RILLEN MIT RILLKÖRPER", m)$
CASE-SENSITIVE INDICATIONS FOR MEASUREMENT UNITS AND FORMATTING: Whenever a formula contains indications for measurement units and formatting, ensure that these are typed in lower case. That is, the formula may be typed in any case you like, but the applied measurement units and formatting indications must be typed in lower case. Consider the following examples, in which the formulas are typed in upper case but the measurement and formatting indications are in lower case:
$Layout1.SheetWidth(mm); n2$
$Layout1.lenght(m)$
LIST SEPARATOR TYPE: Throughout this guide, semicolon — (;) — is used to separate formula attributes. List separators are critical for how the program interprets the attributes within formulas. Your own system, however, may use a default list separator that is different from semicolon — for example, comma (,). In this case, if you simply copy a formula from the help guide and then paste it, error messages will appear and the formula will not calculate.
So while typing a formula, ensure that the list separator used in the formula is identical with the one set for your system. This means that you may need to edit either your system's list separator setting or the formula you are typing. The examples that follow illustrate how you can use formulas with semicolons and colons as list separators:
As presented in the help guide. list separator is semicolon (;) |
type it like this if your list separator is comma (,) |
$Layout1.Area(m; Plotting); n2$ |
$Layout1.Area(m, Plotting), n2$ |
$Layout1.AreaEx(yes; mm); n2$ |
$Layout1.AreaEx(yes, mm), n2$ |
$Layout1.SheetHeight(mm); n2$ |
$Layout1.SheetHeight(mm), n2$ |
$Fold3D1.BoundingBoxWidth(Production; mm; yes)$ |
$Fold3D1.BoundingBoxWidth(Production, mm, yes)$ |