 # Expression Builder

Used to create valid expression equations to calculate the value of the variable. It allows you to use other variables, conditional statements, arithmetic operations, and various arithmetic and trigonometric functions to build a valid expression.

You can access this dialog from the following:
• Variables dialog: Click ... besides the Expression variable definition in the Properties pane of a variable. SettingDescription
Symbol Type Selector Lets you choose from the following:
• Variables - Choose from the available variables to use in the expression.
Note: The list of available variables excludes any variables which cannot be used within the expression because they contain expressions which directly or indirectly reference the variable being assigned to.
• Functions - Choose from the following Trigonometric, Arithmetic or Conversion functions to use in the expression:
• sin

sin(x): sine of x

• acos

acos(x): arccosine of x

• asin

asin(x): arcsine of x

• atan

atan(x): arctangent of x

• cos

cos(x): cosine of x

• tan

tan(x): tangent of x

• sqrt

sqrt(x): square root of x

• limit

limit (x, min, max):

x, if x is less than max and greater than min

min, if x is less than min

max, if x is greater than max

• max

max(a, b, ..., t): maximum of 2 to 20 values

• min

min(a, b, ..., t): minimum of 2 to 20 values

• floor

floor(x): x rounded down to a nearest integer

• ceil

ceil(x): x rounded up to a nearest integer

• log

log(x): natural logarithm of x

• log10

log10(x): base-10 logarithm of x

• trunc

trunc(x): x with the decimal portion truncated

Equivalent to floor(x) if x is greater than zero

Equivalent to ceil(x) if x is less than zero

• round

round(x): rounds x to the nearest integer; or

round(x,p): rounds x to the nearest value with the number of decimal digits specified by p

• odd

odd(x): true if x is an odd integer

• sign

sign(x):

1 if x is greater than zero

-1 if x is less than zero

0 if x is equal to zero

• abs

abs(x): absolute value of x

• int

int(x): converts x to an integer, truncating any decimal portion and discarding any units

• num

num(x): converts x to a number, discarding any units

• dist

dist(x): converts x to a distance in working units

• ang

ang(x): converts x to an angle in degrees

• degrees

degrees(x): converts the value of x in radians to an angle in degrees

• Constants - Choose from the following constants to use in the expression:
• true
• false
• PI - π
• E
• SQRT2 - Square root of 2
• SQRT1_2 - 1 divided by the square root of 2
• LN2 - Natural logarithm of 2
• LN10 - Natural logarithm of 10
• LOG2E - Base-2 logarithm of e
• LOG10E - Base-10 logarithm of e
Tip: To insert the required variable, function, or constant, double-click on it.
Toolbar Provides quick access to the following general mathematical and boolean operations:
• Subtract (-)
• Multiply (*)
• Divide (/)
• Exponent (^)
• Modulo (%)
• Equal to (==)
• Not equal to (!=)
• Less than (<)
• Greater than (>)
• Less than equal to (<=)
• Greater than equal to (>=)
• And (&&)
• Or (| |)
• Not (!) - Negates a True or False value
• Conditional (?:)
• Group with parentheses (( ))
• Distance - A value enclosed in square brackets parsed as a distance in working units.
• Angle - A value enclosed in angle brackets parsed as an angle according to angle readout settings.
Expression Field Provides a text field where you build the expression by entering and pulling the constituent elements (variables, functions, values, operators, etc).
Test Checks the validity of the expression and gives comments for error/success in the field besides. You can also press <Enter> to parse the expression.