Formulas extracting object properties: length, radius, arc sweep, Dx/Dy distances, and line slope

Use the formulas in this page to extract the following properties of objects: length, radius, arc sweep, Dx/Dy distances, and line slope.

NOTE: All the formulas that follow require that you supply the name (ID) of the object whose property you want to extract. Here's how to do this: (1) To see the name (ID) of a discrete object: Place the mouse cursor on the object. Do not click. The object becomes highlighted. Then look at the lower left corner of the application's window. (2) To see the name (ID) of an object in a Synergy component: Press and hold down CTRL+SHIFT, and then place the mouse cursor on the object. Do not click. The object becomes highlighted. Then look at the lower left corner of the application's window. The pictures below show you where to look for these IDs.

Extracting Object Length

Use in practice

In the expression of components

Consider the following example, which uses the objsize function. The example explains the use of the formula in the expression of a component. The height of the rectangular panel equals the dimension that extracts the length of the edge of the triangular panel (Slope1).

Dx & Dy

In cost models

The same formula when used in a cost model. The value of the Distance parameter equals that of the Slope3 dimension.

Dx & Dy

Complex formula expressions

For all the formulas that follow you can use the following square brackets syntax to write complex expressions:

$Oneup1[objsize("BSC1.L5", "") + objsize("BSC1.L7", "")]$

The formulas in detail

Length

The formula

To extract Use
The length of an object OneupN.objlen("name")
  1. THE PARAMETER
  2. name The name (ID) of the object whose length you want to extract.

Examples

The examples that follow show you how to extract the lengths of discrete objects and objects in Synergy components.

To extract the length of Use Example
A line with name L1 OneupN.objlen("L1") 100.00
A fillet with name F6 OneupN.objlen("F6") 31.42
A circle with name C8 OneupN.objlen("C8") 15.71
An arc in a component with name ASC5.A27 OneupN.objlen("ASC5.A27") 10.09
Radius

You can use a formula to extract the radius of a circular object.

The formula

To extract Use
A radius OneupN.objradius("name")
  1. THE PARAMETER
  2. name The name (ID) of the object whose length you want to extract.

Examples

The examples that follow show you how to extract a radius.

To extract the radius of Use Example
A fillet with name F7 OneupN.objradius("F7") 20.00
A circle with name C8 OneupN.objradius("C8") 2.50
An arc in a component with name ASC5.A27 OneupN.objradius("ASC5.A27") 6.00
The sweep of an arc

Use the following formula to extract the sweep of an arc. NOTE: When drawing an arc counterclockwise (left), the value is positive; when drawing clockwise (right), negative (pictured).

Extracting Sweep

The formula

To extract Use
The sweep of an arc OneupN.objsweep("name")
  1. THE PARAMETER
  2. name The name (ID) of the object whose sweep you want to extract.

Examples

To extract the sweep of Use Example
An arc in a component with name ASC5.A27 OneupN.objsweep("ASC5.A27") 96.38
The Dx and Dy distances of an object

Use the following formula to extract an object's Dx and Dy distance values. NOTE: You see these distances each time you are drawing an object or have selected one: the program displays the Dx and Dy distance values in the contextual edit bar.

Dx & Dy

The formula

To extract Use
Dx, Dy OneupN.objsize("object ID", "case")
  1. THE PARAMETERS
  2. name The name (ID) of the object whose Dx/Dy distance values you want to extract.
  3. case The object's bounding rectangle distances as follows: boundh for Dx; boundv for Dy.
  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 extract Use Example
Dx of a line with name L1 OneupN.objsize("L1"; "boundh") 20.00
Dy of a line with name L1 OneupN.objsize("L1"; "boundv") 25.00
Dx of an arc with name A2 OneupN.objsize("A2"; "boundh") 31.47
Dy of an ellipse with name E4 OneupN.objsize("E4"; "boundv") 12.00
Object slope

Use the following formula to extract the slope (angle) of a line.

The formula

To extract Use
Dx, Dy OneupN.objsize("name", "slope")
  1. THE PARAMETERS
  2. name The name of the line whose angle values you want to extract.
  3. slope extracts line’s slope (angle).
  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 extract the slope of Use Example
A line with name L1 OneupN.objsize("L1", "slope") 45
A line in a component with name ASC5.L3 OneupN.objsize("ASC5.L3", "slope") 57.15
The distance between a circle and a line

Use the following formula to extract the distance between a circle and a line.

The formula

To extract Use
Distance between a cicle and a line OneupN.objdist("circle name1", "line name2", "case")
  1. THE PARAMETERS
  2. circle name1 The name of a circle
  3. line name2 The name of a line
  4. case [min, max], where "min" and "max" are the minimum and maximum distances between the objects.
  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$

Example

Dx & Dy
To extract Use Example
Distance C1–L2 (min) OneupN.objdist("C1"; "L2"; "min") 14.93
Distance C1–L2 (max) OneupN.objdist("C1"; "L2"; "max") 64.93

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

The control points of objects

Use the following formula to extract the distance between control points.

The formula

To extract Use
Distance between control points OneupN.objdist("name1", "name2", "case")
  1. THE PARAMETERS
  2. name1 The name of a control point
  3. name2 The name of a control point
  4. case ["", "h", "v"], where "" is the distance between the control points, "h" is the horizontal distance between the control points; and "v" is the vertical distance between the points.
  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

Control Points
To extract Use Example
Distance L1.beg–L2.beg OneupN.objdist("L1.beg"; "L2.beg"; "") 33.37
Horizontal Distance L1.beg–L2.beg OneupN.objdist("L1.beg"; "L2.beg"; "h") 29
Vertical Distance C1.beg–L2.beg OneupN.objdist("L1.beg"; "L2.beg"; "v") 16.50

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

Angle between objects

Use the following formula to extract the angle between objects.

The formula

To extract Use
Angle between objects OneupN.objangle("name1", "name2", "case")
  1. THE PARAMETERS
  2. name1 The name of an object
  3. name2 The name of an object
  4. case ["", "beg1", "beg2", "end1", "end2"], where "" is applicable for lines and control points, "beg1" applicable for arcs only) beginning of name1; "beg2" –(arcs only) the beginning of name2; "end1" – (arcs only) end of name1; "end2" – (arcs only) end of name2.
  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$

Example: Extracting angle values

Angle Objects

In the picture, the objects are as follows:

Object ID Description
ASC197.L10 Line 10 in component ASC197
ASC195.L38 Line 38 in component ASC195
ASC195.L40 Line 40 in component ASC195
ASC197.L9 Line 9 in component ASC197

The extracted angles depend on:

As a result, you receive the following result depending on how you write the function:

To extract Use Example
ang1 OneupN.objangle("ASC195.L38"; "ASC197.L10"; "") 29.30
ang2 OneupN.objangle("ASC197.L10"; "ASC195.L38"; "") 330.70
ang3 OneupN.objangle("ASC197.L9"; "ASC195.L40"; "") 209.30
ang4 OneupN.objangle("ASC195.L40"; "ASC197.L9"; "") 150.70

Example: Extracting angles between tangential lines

Angle Objects
To extract Use Example
ang OneupN.objangle("A57.end"; "A458.beg"; "") 154.64
ang1 OneupN.180-objangle("A57.end"; "A458.beg"; "") 25.36

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