You can count inner contours (those placed inside other closed contours in the same style) or outer contours (those that enclose other contours in the same style).
The formula
To count | Use |
---|---|
Inner/outer closed contours in a particular style | OneUpN.HolesCount(StyleName; CountInnerContours) |
- THE PARAMETERS
- StyleName: The style of the objects that form closed contour. If no style is specified, the Cutting style and its child styles are used.
- CountInnerContours Specifies which closed contours in the specified style are counted. Values: Yes = inner contours; No = outer contours. No is the default and can be omitted.
- 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 examples that follow show you how to write formulas for counting closed contours and set formatting for the results. The examples refer to the following drawing.

NOTE: The examples that follow refer to the OneUp1 design frame area. n0 removes the fractional part from the result.
To count | In style | Use | Example |
---|---|---|---|
Holes inside the closed contours | Cutting | $OneUp1.HolesCount( ; yes); n0$ | 2 |
$OneUp1.HolesCount(Cutting; yes); n0$ | |||
The outer closed contours | $OneUp1.HolesCount(); n0$ | 1 | |
$OneUp1.HolesCount(Cutting); n0$ | |||
Holes inside the closed contours | Perforating 3x1.5 | $OneUp1.HolesCount(Perforating 3x1.5; yes); n0$ | 15 |
The outer closed contours | $OneUp1.HolesCount(Perforating 3x1.5); n0$ | 1 |