Formulas extracting object properties: length, radius, arc sweep,
and Dx/Dy distances
Use the formulas in this page to extract the following properties
of objects: length, radius, arc sweep, and Dx/Dy distances.
NOTE: All the formulas that follow require that
you supply the ID of the object whose property you want to extract.
Here's how to do this: (1) To see the 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 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.
The formula
To extract |
Use |
The length of an object |
objlen(object ID) |
- THE PARAMETER
- object ID The ID of the object whose length
you want to extract.
Examples
The examples that follow show you how to exract the lengths
of discrete objects and objects in Synergy components.
To extract the length of |
Use |
Example |
A line with ID=1 |
objlen(L1) |
100.00 |
A fillet with ID=6 |
objlen(F6) |
31.42 |
A circle with ID=8 |
objlen(C8) |
15.71 |
An arc in a component with ID=ASC5.A27 |
objlen(ASC5.A27) |
10.09 |
You can use a formula to extract the radius of a circular object.
The formula
To extract |
Use |
A radius |
objradius(object ID) |
- THE PARAMETER
- object ID The 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 ID=7 |
objradius(F7) |
20.00 |
A circle with ID=8 |
objradius(C8) |
2.50 |
An arc in a component with ID=ASC5.A27 |
objradius(ASC5.A27) |
6.00 |
Use the following formula to extract the sweep of an arc.
The formula
To extract |
Use |
The sweep of an arc |
objsweep(object ID) |
- THE PARAMETER
- object ID The ID of the object whose sweep you
want to extract.
Examples
To extract the sweep of |
Use |
Example |
An arc in a component with ID=ASC5.A27 |
objsweep(ASC5.A27) |
96.38 |
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.
The formula
To extract |
Use |
Dx, Dy |
objsize("object ID", "case") |
- THE PARAMETERS
- object ID The ID of the object whose Dx/Dy distance
values you want to extract.
- case The object's bounding rectangle distances
as follows: boundh for Dx; boundy
for Dy.
- 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 ID=1 |
objsize("L1"; "boundh") |
20.00 |
Dy of a line with ID=1 |
objsize("L1"; "boundv") |
25.00 |
Dx of an arc with ID=2 |
objsize("A2"; "boundh") |
31.47 |
Dy of an ellipse with ID=4 |
objsize("E4"; "boundv") |
12.00 |