The multiply and divide functions available are
number * number
-> number
number / number
-> number
Multiply or divide two numbers. They can also be used as unary operators at the beginning of a parenthesized sub-expression. Numeric underflow is not considered to be an error and neither is it flagged as a warning. The result returned is zero.
Units are consolidated across Multiply and Divide. The result is returned in the current units of the physical quantity of the result for example when current units of pressure are psi then:
If one value has no unit it is assumed to be a scaling factor. This also applies to reciprocal physical quantities. For example:
for (10 / XLEN) will return 2mm-1 when XLEN is 5mm
2 * 3 -> 6.0
2 / 3 -> 0.666666666
Divide by zero.

Synopsis
number * number
-> number
number / number
-> number
Description
Multiply or divide two numbers. They can also be used as unary operators at the beginning of a parenthesized sub-expression. Numeric underflow is not considered to be an error and neither is it flagged as a warning. The result returned is zero.
Side Effects
Units are consolidated across Multiply and Divide. The result is returned in the current units of the physical quantity of the result for example when current units of pressure are psi then:
q (20kgf/ 1 cm2 ) will return 284.47PSI
If one value has no unit it is assumed to be a scaling factor. This also applies to reciprocal physical quantities. For example:
for (10 / XLEN) will return 2mm-1 when XLEN is 5mm
Example
2 * 3 -> 6.0
2 / 3 -> 0.666666666
Errors
Divide by zero.

Synopsis
number * number
-> number
number / number
-> number
Description
Side Effects
(10 / XLEN)
Example
2 * 3 -> 6.0
2 / 3 -> 0.666666666
Errors


All referenced units are current units. The numeric functions available are:
ABS ( number1 )
Gives the absolute value of a number
ACOS ( number1 )
Gives the arc cosine of a number, in degrees.
ASIN ( number1 )
Gives the arc sine of a number, in degrees.
ATAN ( number1 )
Gives the arc tangent of a number, in degrees.
ATANT ( number1, number2 )

Gives the arc tangent of number1/number2, in degrees, with the appropriate sign.
ALOG ( number1 )
Gives the exponential function (natural anti-log) of a number.
ARRAY(pos or dir or ori)

Converts a position, direction or orientation value or attribute into three numbers.
ARRAYSIZE ( variable-name )

Gives the size of an array variable.
ARRAYWIDTH( variable-name )

Gives the largest display width of any string in array variable-name.
COMPONENT dir OF pos2
Gives the magnitude of a vector drawn from E0 N0 U0 to pos2, projected in the direction dir1.
INT ( number1 )
Gives the truncated integer value of a number.
SIN ( number1 )
Gives the sine, cosine or tangent value of a number (considered to be in current units of angle (degrees) if value is unqualified).
COS ( number1 )
Gives the sine, cosine or tangent value of a number (considered to be in current units of angle (degrees) if value is unqualified).
TAN ( number1 )
Gives the sine, cosine or tangent value of a number (considered to be in current units of angle (degrees) if value is unqualified).
LENGTH ( text1 )
Gives the length of text1.
LOG ( number1 )
Gives the natural logarithm of a number.
MATCH ( text1, text2 )
Gives the position of the beginning of the leftmost occurrence of text2 in text1. If text2 does not occur in text1, 0 is returned.
MAX ( number1, number2[ , number3 [. . .]]) )

Gives the maximum value of the arguments.
MIN ( number1, number2[ , number3 [. . .]]) )

Gives the minimum value of the arguments.
NEGATE
Multiply a number by -1.0.
NINT ( number1 )
Gives the nearest integer to a real. NINT(N+0.5) is equal to N+1 if N is positive or equal to zero, to N if N is negative.
OCCUR ( text1, text2 )
Gives the number of times string text2 occurs in string text1.
REAL ( text1 )
Try to read a number at the beginning of text1.
POWER ( number1, number2 )

Gives the value of number1 raised to the power number2.
SQRT ( number1 )
Gives the square root of a number.
VVALUE ( variable-name )

Used for late evaluation of variables. Gives a real value.
ABS ( number1 )
-> number
Returns the absolute value of a real.
None.
ABS ( -3.2 ) -> 3.2
None.
All these will return values in current angle units.
ASIN ( number1 )
-> number
ACOS ( number1 )
-> number
ATAN ( number1 )
-> number
ATANT ( number1, number2 )
-> number
Return the arc-cosine, arc-sine or arc-tangent of a number, in degrees.
ATANT returns the arc-tangent of number1/number2 with the appropriate sign. ATANT is useful where the second value is near or equal to zero.
For example, (6 0 ATANT) will give the correct result of 90 degrees, but (6 0 D ATAN) will indicate an error when trying to divide by zero.
None.
ACOS ( 0.8660254 ) -> 30degrees
Argument of ACOS or ASIN out of range [-1.0,+1.0]
ATANT (0.0,0.0) is undefined.
ALOG ( number1 )
-> number
Return the exponential function (natural anti-log) of a number.
Numeric underflow causes the result to be set to zero.
ALOG( -0.7 ) -> 0.4965853
Floating point overflow.
ARRAY(pos or dir or ori)
-> number
Converts a position, direction or orientation value or attribute into three numbers.
None
ARRAY(e100 ) -> 100 0 0
None.
ARRAYSize ( variable-name )
-> number
Give the size of an array variable.
If the array variable does not exist, the result is undefined.
ARRAYSIZE(!array) -> 2.0
The variable is a scalar variable and not an array variable.
The variable is an array variable element and not an array variable.
ARRAYWIDTH ( variable-name )
-> number
Give the largest display with of any string in array variable_name.
None.
If an array contains the following values:
!ARRAY[1] ’Bread’
!ARRAY[2] ’is’
!ARRAY[3] ’for’
!ARRAY[4] ’life,’
!ARRAY[5] ’not’
!ARRAY[6] ’just’
!ARRAY[7] ’for’
!ARRAY[8] ’breakfast’
Then
ARRAYWIDTH(!ARRAY -> 9
defines the length of ’breakfast’.

The variable is a scalar variable and not an array variable.
The variable is an array variable element and not an array variable.
COMPonent dir1 OF pos2
-> text
Returns the magnitude of a vector drawn from E0 N0 U0 to pos2, projected in the direction dir1.
None.
COMP E 45 N of N 0 E 100 U 50 -> 70.710
None.
DISTConvert ( number )
-> number
Returns a distance value cast from the input number.
The input value is converted to its database units (if it is a physical quantity) and then cast to database units of distance (i.e. mm) and presented in current units of distance.
None.
When current distance units are mm
distc(1000)
distc(10metre)
distc( 5pascal)
distc (5atm)

-> 1000mm
-> 10000mm
-> 5mm
-> 506625mm
When current distance units are inch
distc(1000)
distc(10metre)
distc( 5pascal)
distc (5atm)

-> 39.4in
-> 393.7in
-> 0.2in
-> 19945.9in
None.
All these will accept values qualified by angle units. If no unit is supplied the value is assumed to be in current angle units (usually degrees).
SINe ( number1 )
-> number
COSine ( number1 )
-> number
TANgent ( number1 )
-> number
Return the sine, cosine or tangent value of a number (considered to be in degrees).
None.
COS ( 0.0 ) returns 1.0
TAN ( 45.0 degrees ) returns 1.0
TAN (0.785 radians) ) returns 0.9992
Division by zero for TAN if the sine is (nearly) equal to zero.
INT ( number1 )
-> number
Return the truncated integer value of a number.
None.
INT ( -23.7 ) -> -23.0
Integer overflow.
LENgth ( text1 )
-> number
Return the length of text1.
None.
LENGTH ( ’abcdef’ ) -> 6.0
LENGTH ( ’’ ) -> 0.0
None.
LOG ( number1 )
-> number
Return the natural logarithm of a number.
None.
LOG( 3 ) -> 1 0986123
Negative arguments.
MATch ( text1 , text2)
-> number
Return the position of the beginning of the leftmost occurrence of text2 in text1. If text2 does not occur in text1, 0 is returned.
None.
MATCH ( ’abcdef’ , ’cd’ ) -> 3.0
MATCH ( ’abcdef’ , ’x’ ) -> 0.0
MATCH ( ’abcdef’ , ’’ ) -> 1.0
None.
MAX ( number1 , number2 [ , number3 [ ... ] ] )
-> number
MIN ( number1 , number2 [ , number3 [ ... ] ] )
-> number
Return the maximum or minimum value of the arguments.
Values being evaluated are assumed to of a common physical quantity.
If no unit qualifiers are supplied they are simply numbers.
If a physical quantity is defined the result will be in current units of that quantity.
If unqualified numbers are mixed with unit values they are assumed to be in the current units of that physical quantity.
If quantities are in mixed units they are all compared in comparison to a standard unit.
If quantities are of different types of physical quantities a warning is issued and the numeric result compares the values in their database units.
Min and Max return a value with the same dimension as that of their arguments.
MAX ( 1 , 3.4 ) -> 3.4
MIN ( 7.6 , -12.33 , 2.3 ) -> -12.33
MIN (7.6ft, 12.33inch, 1000mm ) -> 12.3 in (current distance units are inch)
MAX (7.6ft, 12.33inch, 1000 ) -> 1000in (current distance units are inch)
MAX (7.6ft, 12.33inch, 1kg ) -> 2316.5 (database mm equivalent of 7.6ft)
None.
NEGate ( number1 )
-> number
Multiply a real by -1.0.
None.
NEG ( 1 ) -> -1.0
None.
NINT ( number1 )
-> number
Return the nearest integer to a real. NINT(N+0.5) is equal to N+1 if N is positive or equal to zero, to N if N is negative.
None.
NINT ( 1.1 ) -> 1.0
NINT ( -23.7 ) -> -24.0
NINT ( 1.5 ) -> 2.0
NINT ( -11.5 ) -> -12.0
Integer overflow.
OCCUR(text1, text2)
-> integer
Counts the number of times string text2 occurs in string text1
None.
OCCUR (’ABBACCBBBBBAB’, ’BB’) -> 3
OCCUR(’ZZZZZZZZZZZ’, ’A’) -> 0
None.
REAL ( text1 )
-> number
Try to read a real number at the beginning of text1.
Note that if text is in the form of an exponent, (-12E-1 in the third example), there must be no spaces in it.
Note: this function was formerly called NUMBER.
Numeric underflow causes the result to be set to zero.
If the text string contains units they are ignored and the value only is returned.
If the test string contains text that is NOT a valid unit it will generate an error.
If the text string is space separated from the number it is completely ignored.
REAL ( ’12.34’) -> 12.34
REAL ( ’ 7.23 E 3 meters’ ) -> 7.23
REAL ( ’ -12E-1 meters ’ ) -> -1.2
REAL (' 1200 fred ' ) -> 1200
REAL (' 1200fred ' ) -> returns an error
This will return the value of the number in the string IGNORING any unit qualifier. The unit qualifier must still be a valid unit qualifier. This is done so that output from $! And VAR ! commands can still be accepted by the REAL function.
Unable to convert the text into a real number.
POWer ( number1 , number2 )
-> real
Return the value of number1 raised to the power number2.
If the value being raised to a power is that of a physical quantity the result is also of a physical quantity.(in relevant current units).
If the resultant quantity is non physical (for example, by raising to a fractional power, or an extreme power, a warning is given and only the value of quantity is raised to the power.
If the power is a physical quantity this also gives a warning.
POWER ( -2 , 3 ) -> -8
POWER ( -2inch , 2 ) -> 4in2
POWER ( 2inch, 3.5 ) -> returns 11.314 with an error (i.e. 2**3.5)
Floating point overflow.
Zero first argument and non-positive second argument (effectively divide by zero).
Negative first argument and non-integer second argument.
SQrt ( number1 )
-> number
Return the square root of a real.
Units are consolidated across SQRT. The resultant value will be in current units of that quantity.
If the resultant quantity has no recognized physical dimension a warning is given and the value return will be a number relating to the input value in database units.
SQRT ( 4 ) -> 2.0
SQRT ( 4inch2 ) -> 2.0inch
sqrt ( 4inch3 ) -> a warning and 256.02 which is sqrt (4*25.4mm)
Negative argument.
VVALUE is used for the late evaluation of PML variables.
VVALue( variable_name )
-> number
VVALue( variable_name , number )
-> number
With one argument, returns value of the scalar variable or value of the array variable element as a number.
With two arguments, returns value of the element corresponding to the index number as a number.
The value of the variable will be returned, irrespective of its units.
This will return the value of the number in the string IGNORING any unit qualifier. The unit qualifier must still be a valid unit qualifier. This is done so that output from $! And VAR ! commands can still be accepted by the VVAL function.
If the scalar variable, the array variable or the array variable element does not exist, the result is undefined.
VVAL ( !array[1] ) -> 1.0
VVAL ( !array , 2 ) -> 0.0
Scalar variable may not be indexed. For example, VTEXT (!var[1]) ) will return an error.
Array variable must have an index. For example, VTEXT ( !array ) ) will return an error.
The string can not be converted to a number.

Function
Comments
ABS ( number1 )
Gives the absolute value of a number
ACOS ( number1 )
Gives the arc cosine of a number, in degrees.
ASIN ( number1 )
Gives the arc sine of a number, in degrees.
ATAN ( number1 )
Gives the arc tangent of a number, in degrees.
ATANT ( number1, number2 )
Gives the arc tangent of number1/number2, in degrees, with the appropriate sign.
ALOG ( number1 )
Gives the exponential function (natural anti-log) of a number.
ARRAY(pos or dir or ori)
Converts a position, direction or orientation value or attribute into three numbers.
ARRAYSIZE ( variable-name )
Gives the size of an array variable.
ARRAYWIDTH( variable-name )
Gives the largest display width of any string in array variable-name.
COMPONENT dir OF pos2
Gives the magnitude of a vector drawn from E0 N0 U0 to pos2, projected in the direction dir1.
INT ( number1 )
Gives the truncated integer value of a number.
SIN ( number1 )
Gives the sine, cosine or tangent value of a number (considered to be in current units of angle (degrees) if value is unqualified).
COS ( number1 )
Gives the sine, cosine or tangent value of a number (considered to be in current units of angle (degrees) if value is unqualified).
TAN ( number1 )
Gives the sine, cosine or tangent value of a number (considered to be in current units of angle (degrees) if value is unqualified).
LENGTH ( text1 )
Gives the length of text1.
LOG ( number1 )
Gives the natural logarithm of a number.
MATCH ( text1, text2 )
Gives the position of the beginning of the leftmost occurrence of text2 in text1. If text2 does not occur in text1, 0 is returned.
MAX ( number1, number2[ , number3 [. . .]]) )
Gives the maximum value of the arguments.
MIN ( number1, number2[ , number3 [. . .]]) )
Gives the minimum value of the arguments.
NEGATE
Multiply a number by -1.0.
NINT ( number1 )
Gives the nearest integer to a real. NINT(N+0.5) is equal to N+1 if N is positive or equal to zero, to N if N is negative.
OCCUR ( text1, text2 )
Gives the number of times string text2 occurs in string text1.
REAL ( text1 )
Try to read a number at the beginning of text1.
POWER ( number1, number2 )
Gives the value of number1 raised to the power number2.
SQRT ( number1 )
Gives the square root of a number.
VVALUE ( variable-name )
Used for late evaluation of variables. Gives a real value.
Synopsis
ABS ( number1 )
-> number
Description
Returns the absolute value of a real.
Side Effects
None.
Example
ABS ( -3.2 ) -> 3.2
Errors
None.
Synopsis
ASIN ( number1 )
-> number
ACOS ( number1 )
-> number
ATAN ( number1 )
-> number
ATANT ( number1, number2 )
-> number
Description
Return the arc-cosine, arc-sine or arc-tangent of a number, in degrees.
ATANT returns the arc-tangent of number1/number2 with the appropriate sign. ATANT is useful where the second value is near or equal to zero.
For example, (6 0 ATANT) will give the correct result of 90 degrees, but (6 0 D ATAN) will indicate an error when trying to divide by zero.
Side Effects
None.
Example
ACOS ( 0.8660254 ) -> 30degrees
Errors
Argument of ACOS or ASIN out of range [-1.0,+1.0]
ATANT (0.0,0.0) is undefined.
Synopsis
ALOG ( number1 )
-> number
Description
Return the exponential function (natural anti-log) of a number.
Side Effects
Numeric underflow causes the result to be set to zero.
Example
ALOG( -0.7 ) -> 0.4965853
Errors
Floating point overflow.
Synopsis
ARRAY(pos or dir or ori)
-> number
Description
Converts a position, direction or orientation value or attribute into three numbers.
Side Effects
None
Example
ARRAY(e100 ) -> 100 0 0
Errors
None.
Synopsis
ARRAYSize ( variable-name )
-> number
Description
Give the size of an array variable.
Side Effects
If the array variable does not exist, the result is undefined.
Example
ARRAYSIZE(!array) -> 2.0
Errors
The variable is a scalar variable and not an array variable.
The variable is an array variable element and not an array variable.
Synopsis
ARRAYWIDTH ( variable-name )
-> number
Description
Give the largest display with of any string in array variable_name.
Side Effects
None.
Example
If an array contains the following values:
!ARRAY[1] ’Bread’
!ARRAY[2] ’is’
!ARRAY[3] ’for’
!ARRAY[4] ’life,’
!ARRAY[5] ’not’
!ARRAY[6] ’just’
!ARRAY[7] ’for’
!ARRAY[8] ’breakfast’
Then
ARRAYWIDTH(!ARRAY -> 9
defines the length of ’breakfast’.
Errors
The variable is a scalar variable and not an array variable.
The variable is an array variable element and not an array variable.
Synopsis
COMPonent dir1 OF pos2
-> text
Description
Returns the magnitude of a vector drawn from E0 N0 U0 to pos2, projected in the direction dir1.
Side Effects
None.
Example
COMP E 45 N of N 0 E 100 U 50 -> 70.710
Errors
None.
Synopsis
DISTConvert ( number )
-> number
Description
Returns a distance value cast from the input number.
The input value is converted to its database units (if it is a physical quantity) and then cast to database units of distance (i.e. mm) and presented in current units of distance.
Side Effects
None.
Example
When current distance units are mm
distc(1000)
distc(10metre)
distc( 5pascal)
distc (5atm)
-> 1000mm
-> 10000mm
-> 5mm
-> 506625mm
When current distance units are inch
distc(1000)
distc(10metre)
distc( 5pascal)
distc (5atm)
-> 39.4in
-> 393.7in
-> 0.2in
-> 19945.9in
Errors
None.
Synopsis
SINe ( number1 )
-> number
COSine ( number1 )
-> number
TANgent ( number1 )
-> number
Description
Return the sine, cosine or tangent value of a number (considered to be in degrees).
Side Effects
None.
Example
COS ( 0.0 ) returns 1.0
TAN ( 45.0 degrees ) returns 1.0
TAN (0.785 radians) ) returns 0.9992
Errors
Division by zero for TAN if the sine is (nearly) equal to zero.
Synopsis
INT ( number1 )
-> number
Description
Return the truncated integer value of a number.
Side Effects
None.
Example
INT ( 1.6 )    -> 1.0
INT ( -23.7 ) -> -23.0
Errors
Integer overflow.
Synopsis
LENgth ( text1 )
-> number
Description
Return the length of text1.
Side Effects
None.
Example
LENGTH ( ’abcdef’ ) -> 6.0
LENGTH ( ’’ ) -> 0.0
Errors
None.
Synopsis
LOG ( number1 )
-> number
Description
Return the natural logarithm of a number.
Side Effects
None.
Example
LOG( 3 ) -> 1 0986123
Errors
Negative arguments.
Synopsis
MATch ( text1 , text2)
-> number
Description
Return the position of the beginning of the leftmost occurrence of text2 in text1. If text2 does not occur in text1, 0 is returned.
Side Effects
None.
Example
MATCH ( ’abcdef’ , ’cd’ ) -> 3.0
MATCH ( ’abcdef’ , ’x’ ) -> 0.0
MATCH ( ’abcdef’ , ’’ ) -> 1.0
Errors
None.
Synopsis
MAX ( number1 , number2 [ , number3 [ ... ] ] )
-> number
MIN ( number1 , number2 [ , number3 [ ... ] ] )
-> number
Description
Return the maximum or minimum value of the arguments.
Side Effects
Values being evaluated are assumed to of a common physical quantity.
If no unit qualifiers are supplied they are simply numbers.
If a physical quantity is defined the result will be in current units of that quantity.
If unqualified numbers are mixed with unit values they are assumed to be in the current units of that physical quantity.
If quantities are in mixed units they are all compared in comparison to a standard unit.
If quantities are of different types of physical quantities a warning is issued and the numeric result compares the values in their database units.
Min and Max return a value with the same dimension as that of their arguments.
Example
MAX ( 1 , 3.4 ) -> 3.4
MIN ( 7.6 , -12.33 , 2.3 ) -> -12.33
MIN (7.6ft, 12.33inch, 1000mm ) -> 12.3 in (current distance units are inch)
MAX (7.6ft, 12.33inch, 1000 ) -> 1000in (current distance units are inch)
MAX (7.6ft, 12.33inch, 1kg ) -> 2316.5 (database mm equivalent of 7.6ft)
Errors
None.
Synopsis
NEGate ( number1 )
-> number
Description
Multiply a real by -1.0.
Side Effects
None.
Example
NEG ( 1 ) -> -1.0
Errors
None.
Synopsis
NINT ( number1 )
-> number
Description
Return the nearest integer to a real. NINT(N+0.5) is equal to N+1 if N is positive or equal to zero, to N if N is negative.
Side Effects
None.
Example
NINT ( 1.1 ) -> 1.0
NINT ( -23.7 ) -> -24.0
NINT ( 1.5 ) -> 2.0
NINT ( -11.5 ) -> -12.0
Errors
Integer overflow.
Synopsis
OCCUR(text1, text2)
-> integer
Description
Counts the number of times string text2 occurs in string text1
Side Effects
None.
Example
OCCUR (’ABBACCBBBBBAB’, ’BB’) -> 3
OCCUR(’ZZZZZZZZZZZ’, ’A’) -> 0
Errors
None.
Synopsis
REAL ( text1 )
-> number
Description
Try to read a real number at the beginning of text1.
Note that if text is in the form of an exponent, (-12E-1 in the third example), there must be no spaces in it.
Note: this function was formerly called NUMBER.
Side Effects
Numeric underflow causes the result to be set to zero.
If the text string contains units they are ignored and the value only is returned.
If the test string contains text that is NOT a valid unit it will generate an error.
If the text string is space separated from the number it is completely ignored.
Example
REAL ( ’12.34’) -> 12.34
REAL ( ’ 7.23 E 3 meters’ ) -> 7.23
REAL ( ’ -12E-1 meters ’ ) -> -1.2
REAL (' 1200 fred ' ) -> 1200
REAL (' 1200fred ' ) -> returns an error
This will return the value of the number in the string IGNORING any unit qualifier. The unit qualifier must still be a valid unit qualifier. This is done so that output from $! And VAR ! commands can still be accepted by the REAL function.
Note:
The extension of these functions are NOT supported in DARS as they require PML functionality.
Errors
Unable to convert the text into a real number.
Synopsis
POWer ( number1 , number2 )
-> real
Description
Return the value of number1 raised to the power number2.
Side Effects
If the value being raised to a power is that of a physical quantity the result is also of a physical quantity.(in relevant current units).
If the resultant quantity is non physical (for example, by raising to a fractional power, or an extreme power, a warning is given and only the value of quantity is raised to the power.
If the power is a physical quantity this also gives a warning.
Example
POWER ( -2 , 3 ) -> -8
POWER ( -2inch , 2 ) -> 4in2
POWER ( 2inch, 3.5 ) -> returns 11.314 with an error (i.e. 2**3.5)
Errors
Floating point overflow.
Zero first argument and non-positive second argument (effectively divide by zero).
Negative first argument and non-integer second argument.
Synopsis
SQrt ( number1 )
-> number
Description
Return the square root of a real.
Side Effects
Units are consolidated across SQRT. The resultant value will be in current units of that quantity.
If the resultant quantity has no recognized physical dimension a warning is given and the value return will be a number relating to the input value in database units.
Example
SQRT ( 4 ) -> 2.0
SQRT ( 4inch2 ) -> 2.0inch
sqrt ( 4inch3 ) -> a warning and 256.02 which is sqrt (4*25.4mm)
Errors
Negative argument.
Synopsis
VVALue( variable_name )
-> number
VVALue( variable_name , number )
-> number
Description
With one argument, returns value of the scalar variable or value of the array variable element as a number.
With two arguments, returns value of the element corresponding to the index number as a number.
The value of the variable will be returned, irrespective of its units.
This will return the value of the number in the string IGNORING any unit qualifier. The unit qualifier must still be a valid unit qualifier. This is done so that output from $! And VAR ! commands can still be accepted by the VVAL function.
Note:
The extension of these functions are NOT supported in DARS as they require PML functionality.
Side Effects
If the scalar variable, the array variable or the array variable element does not exist, the result is undefined.
Example
VVAL ( !array[1] ) -> 1.0
VVAL ( !array , 2 ) -> 0.0
Errors
Scalar variable may not be indexed. For example, VTEXT (!var[1]) ) will return an error.
Array variable must have an index. For example, VTEXT ( !array ) ) will return an error.
The string can not be converted to a number.
Note:
The extension of these functions are NOT supported in DARS as they require PML functionality.
Note:
The extension of these functions are NOT supported in DARS as they require PML functionality.

Function
Comments
ABS ( number1 )
ACOS ( number1 )
ASIN ( number1 )
ATAN ( number1 )
ATANT ( number1, number2 )
number1
number2
ALOG ( number1 )
ARRAY(pos or dir or ori)
ARRAYSIZE ( variable-name )
ARRAYWIDTH( variable-name )
COMPONENT dir OF pos2
pos2
dir1
INT ( number1 )
SIN ( number1 )
COS ( number1 )
TAN ( number1 )
LENGTH ( text1 )
LOG ( number1 )
MATCH ( text1, text2 )
text2
text1
text2
text1
MAX ( number1, number2[ , number3 [. . .]]) )
MIN ( number1, number2[ , number3 [. . .]]) )
NEGATE
NINT ( number1 )
OCCUR ( text1, text2 )
text2
text1
REAL ( text1 )
text1
POWER ( number1, number2 )
number1
number2
SQRT ( number1 )
VVALUE ( variable-name )
Synopsis
ABS ( number1 )
-> number
Description
Side Effects
Example
ABS ( -3.2 ) -> 3.2
Errors
Synopsis
ASIN ( number1 )
-> number
ACOS ( number1 )
-> number
ATAN ( number1 )
-> number
ATANT ( number1, number2 )
-> number
Description
number1/number2
Side Effects
Example
ACOS ( 0.8660254 ) -> 30degrees
Errors
ATANT (0.0,0.0)
Synopsis
ALOG ( number1 )
-> number
Description
Side Effects
Example
ALOG( -0.7 ) -> 0.4965853
Errors
Synopsis
ARRAY(pos or dir or ori)
-> number
Description
Side Effects
Example
ARRAY(e100 ) -> 100 0 0
Errors
Synopsis
ARRAYSize ( variable-name )
-> number
Description
Side Effects
Example
Errors
Synopsis
ARRAYWIDTH ( variable-name )
-> number
Description
variable_name
Side Effects
Example
If an array contains the following values:
!ARRAY[1] ’Bread’
!ARRAY[2] ’is’
!ARRAY[3] ’for’
!ARRAY[4] ’life,’
!ARRAY[5] ’not’
!ARRAY[6] ’just’
!ARRAY[7] ’for’
!ARRAY[8] ’breakfast’
ARRAYWIDTH(!ARRAY -> 9
Errors
Synopsis
COMPonent dir1 OF pos2
-> text
Description
pos2
dir1.
Side Effects
Example
COMP E 45 N of N 0 E 100 U 50 -> 70.710
Errors
Synopsis
DISTConvert ( number )
-> number
Description
Side Effects
Example
-> 1000mm
-> 10000mm
-> 5mm
-> 506625mm
distc(1000)
distc(10metre)
distc( 5pascal)
distc (5atm)
-> 39.4in
-> 393.7in
-> 0.2in
-> 19945.9in
Errors
Synopsis
SINe ( number1 )
-> number
COSine ( number1 )
-> number
TANgent ( number1 )
-> number
Description
Side Effects
Example
COS ( 0.0 ) returns 1.0
TAN ( 45.0 degrees ) returns 1.0
TAN (0.785 radians) ) returns 0.9992
Errors
Synopsis
INT ( number1 )
-> number
Description
Side Effects
Example
Errors
Synopsis
LENgth ( text1 )
-> number
Description
text1
Side Effects
Example
LENGTH ( ’abcdef’ ) -> 6.0
LENGTH ( ’’ ) -> 0.0
Errors
Synopsis
LOG ( number1 )
-> number
Description
Side Effects
Example
LOG( 3 ) -> 1 0986123
Errors
Synopsis
MATch ( text1 , text2)
-> number
Description
text2
text1
text2
text1
Side Effects
Example
MATCH ( ’abcdef’ , ’cd’ ) -> 3.0
MATCH ( ’abcdef’ , ’x’ ) -> 0.0
MATCH ( ’abcdef’ , ’’ ) -> 1.0
Errors
Synopsis
MAX ( number1 , number2 [ , number3 [ ... ] ] )
-> number
MIN ( number1 , number2 [ , number3 [ ... ] ] )
-> number
Description
Side Effects
Example
MAX ( 1 , 3.4 ) -> 3.4
MIN ( 7.6 , -12.33 , 2.3 ) -> -12.33
MIN (7.6ft, 12.33inch, 1000mm ) -> 12.3 in (current distance units are inch)
MAX (7.6ft, 12.33inch, 1000 ) -> 1000in (current distance units are inch)
MAX (7.6ft, 12.33inch, 1kg ) -> 2316.5 (database mm equivalent of 7.6ft)
Synopsis
NEGate ( number1 )
-> number
Description
Side Effects
Example
NEG ( 1 ) -> -1.0
Errors
Synopsis
Description
NINT(N+0.5)
N+1
N
N
N
Side Effects
Example
NINT ( 1.1 ) -> 1.0
NINT ( -23.7 ) -> -24.0
NINT ( 1.5 ) -> 2.0
NINT ( -11.5 ) -> -12.0
Errors
Synopsis
OCCUR(text1, text2)
-> integer
Description
text2
text1
Side Effects
Example
OCCUR (’ABBACCBBBBBAB’, ’BB’) -> 3
OCCUR(’ZZZZZZZZZZZ’, ’A’) -> 0
Errors
Synopsis
REAL ( text1 )
-> number
Description
text1
Side Effects
Example
REAL ( ’12.34’) -> 12.34
REAL ( ’ 7.23 E 3 meters’ ) -> 7.23
REAL ( ’ -12E-1 meters ’ ) -> -1.2
REAL (' 1200 fred ' ) -> 1200
REAL (' 1200fred ' ) -> returns a
Note
:
Errors
Synopsis
POWer ( number1 , number2 )
-> real
Description
number1
number2
Side Effects
Example
POWER ( -2 , 3 ) -> -8
POWER ( -2inch , 2 ) -> 4in2
POWER ( 2inch, 3.5 ) -> returns 11.314 with an error (i.e. 2**3.5)
Errors
Synopsis
SQrt ( number1 )
-> number
Description
Side Effects
Example
SQRT ( 4 ) -> 2.0
SQRT ( 4inch2 ) -> 2.0inch
sqrt ( 4inch3 ) -> a warning and 256.02 which is sqrt (4*25.4mm)
Errors
Synopsis
VVALue( variable_name )
-> number
VVALue( variable_name , number )
-> number
Description
Note
:
Side Effects
Example
VVAL ( !array[1] ) -> 1.0
VVAL ( !array , 2 ) -> 0.0
Errors
VTEXT (!var[1]) )
VTEXT ( !array ) )


Real array expressions can contain attributes of type real array, for example: DESP.


Units and Physical Quantity Attributes in Expressions

In real expressions the dimension of the result is tracked using:
If at any time a value with no dimension occurs where a value with a specific dimension is needed then the value is taken to be one of that dimension in the current working units of that dimension (for example, mm for distances, degrees for angles). This will occur in addition and subtraction operations, and arguments for typed functions (for example,. trigonometric).
Whenever a clash of physical quantity occurs then either a warning or an error will be raised (for example, SIN(25inch).
In all expressions and functions physical quantities are tracked and the result, wherever possible is returned in the current units of the resultant physical quantity (dimension). If the system cannot do this (for example, the expression is not dimensionally sound, or the dimension exceeds the scope which the system can track) then a warning is issued and a simple numeric result is returned.
When a user enters a literal value then the type of physical quantity is not known and the decision as to what it is determined to make it consistent with the context with respect to other values in the expression. When it is finally determined the value is then taken to be in the current units of that quantity. The method of this determination is normally straightforward and is described in specific sections above.
The units for PML variables are also unknown. Where units are known and handled similarly in expression.
To cope with ’unknown’ units each value remembers its original units internally. An attempt is then made to allow for ’unknown’ units across operators and within functions. In general the physical quantity of the result of a function, or expressions, is tracked by the system and the resulting value is one of the resultant physical quantities. For example multiplying 3 distances together gives a result of a volume which will have units such as gallons, litres or cubic ft.
On comparison, addition or subtraction of two values then if one has units and the other has none (i.e. not a physical quantity) it is assumed to be the same sort of quantity as the other, and in the current units of that quantity.
For example:
If we are working in distance units of inches, it is known that XLEN is a distance value. Internally the value is held in mm, but the units are held as INCH. The units for ’10’ are held as unknown. On doing the comparison, the ’10’ is assumed to be inches and thus multiplied by 25.4 to make sure that the comparison works as expected.
Special action is also taken to preserve the correct units across multiplication, division, POWER and SQRT, as described in the sections above.
(XLEN GT 10).
The dimension of any attribute values used (for example, XLEN, BANG, DENS, GVOL)
The unit qualifiers of any values supplied
The known result of any function (for example, ASIN returns an angle, POW, SQRT return a computed dimension, MIN/MAX that of their arguments etc.)
The computed result of multiplication and division operation. (for example, GWEI/GVOL is a density)
The need for consistency for addition and subtraction operations
The dimension of any attribute values used (for example, XLEN, BANG, DENS, GVOL)
The dimension of any attribute values used (for example, XLEN, BANG, DENS, GVOL)
The unit qualifiers of any values supplied
The unit qualifiers of any values supplied
The known result of any function (for example, ASIN returns an angle, POW, SQRT return a computed dimension, MIN/MAX that of their arguments etc.)
The known result of any function (for example, ASIN returns an angle, POW, SQRT return a computed dimension, MIN/MAX that of their arguments etc.)
The computed result of multiplication and division operation. (for example, GWEI/GVOL is a density)
The computed result of multiplication and division operation. (for example, GWEI/GVOL is a density)
The need for consistency for addition and subtraction operations
The need for consistency for addition and subtraction operations


IDs can be used in expressions. IDs can be any of the following:
SPEC OF SPREF OF FLAN 1 OF NEXT BRAN.
HEAD TUBE OF /BRAN1.
Element name, for example: /VESS1.
Refno, for example: =23/456.
Element type further up the hierarchy, for example: SITE.
Number within member list, for example: 3.
Type and number within member list, for example: BOX 3.
NEXT, PREV for next, previous within current list. Optionally with a count and/or element type, for example: NEXT 2 BOX, LAST CYL.
NEXT, PREV MEMBER for next, previous within member list. Optionally with a count and/or element type.
If the element type given is only valid as a member then MEMBER is assumed. For example, NEXT BOX at an EQUIPMENT will assume MEMBER.
FIRST, LAST for first and last in current list. Optionally with a count and/or element type.
FIRST, LAST MEMBER for first and last in member list. If the element type given is only valid as a member then MEMBER is assumed.
END to navigate up from current list.
END is similar to owner but not quite the same. For example, if the current element is a GROUP MEMBER, and it has been reached from the GROUP then END will return to the group but OWNE will go to the true owner.
Attribute of type ref, for example: CREF
SAME to mean last current element
NULREF to mean =0/0
CE for the current element
’OF’ may be used to nest the options indefinitely. For example:
SPEC OF SPREF OF FLAN 1 OF NEXT BRAN.
This denotes the SPEC element owing the SELE element pointed to by the SPREF attribute on the first FLANGE of the next BRANCH. ILEAVE TUBE, IARRIV TUBE, HEAD TUBE, TAIL TUBE can be added to denote tube. For example:
HEAD TUBE OF /BRAN1.
An error will occur if there is no implied tube for the element concerned.
ID arrays can also be used in expressions. For example, CRFA.
Element name, for example: /VESS1.
Element name, for example: /VESS1.
Refno, for example: =23/456.
Refno, for example: =23/456.
Element type further up the hierarchy, for example: SITE.
Element type further up the hierarchy, for example: SITE.
Number within member list, for example: 3.
Number within member list, for example: 3.
Type and number within member list, for example: BOX 3.
Type and number within member list, for example: BOX 3.
NEXT, PREV for next, previous within current list. Optionally with a count and/or element type, for example: NEXT 2 BOX, LAST CYL.
NEXT, PREV for next, previous within current list. Optionally with a count and/or element type, for example: NEXT 2 BOX, LAST CYL.
NEXT, PREV MEMBER for next, previous within member list. Optionally with a count and/or element type.
NEXT, PREV MEMBER for next, previous within member list. Optionally with a count and/or element type.
If the element type given is only valid as a member then MEMBER is assumed. For example, NEXT BOX at an EQUIPMENT will assume MEMBER.
If the element type given is only valid as a member then MEMBER is assumed. For example, NEXT BOX at an EQUIPMENT will assume MEMBER.
FIRST, LAST for first and last in current list. Optionally with a count and/or element type.
FIRST, LAST for first and last in current list. Optionally with a count and/or element type.
FIRST, LAST MEMBER for first and last in member list. If the element type given is only valid as a member then MEMBER is assumed.
FIRST, LAST MEMBER for first and last in member list. If the element type given is only valid as a member then MEMBER is assumed.
END to navigate up from current list.
END to navigate up from current list.
END is similar to owner but not quite the same. For example, if the current element is a GROUP MEMBER, and it has been reached from the GROUP then END will return to the group but OWNE will go to the true owner.
END is similar to owner but not quite the same. For example, if the current element is a GROUP MEMBER, and it has been reached from the GROUP then END will return to the group but OWNE will go to the true owner.
Attribute of type ref, for example: CREF
Attribute of type ref, for example: CREF
SAME to mean last current element
SAME to mean last current element
NULREF to mean =0/0
NULREF to mean =0/0
CE for the current element
CE for the current element
’OF’ may be used to nest the options indefinitely. For example:
SPEC OF SPREF OF FLAN 1 OF NEXT BRAN.
’OF’ may be used to nest the options indefinitely. For example:
This denotes the SPEC element owing the SELE element pointed to by the SPREF attribute on the first FLANGE of the next BRANCH. ILEAVE TUBE, IARRIV TUBE, HEAD TUBE, TAIL TUBE can be added to denote tube. For example:
HEAD TUBE OF /BRAN1.
This denotes the SPEC element owing the SELE element pointed to by the SPREF attribute on the first FLANGE of the next BRANCH. ILEAVE TUBE, IARRIV TUBE, HEAD TUBE, TAIL TUBE can be added to denote tube. For example:
An error will occur if there is no implied tube for the element concerned.
ID arrays can also be used in expressions. For example, CRFA.
An error will occur if there is no implied tube for the element concerned.
Note:
Some of the ID syntax clashes with other types. To allow for this, an id expression may always be preceded with the keyword ID. For example, ID 3 will mean the third member of the current list rather than a number of value 3.

Note
:


Positions, Directions and Orientations in Expressions

Information is provided on how to use and compare positions and on how to define units, an offset from a fixed point, the direction and orientation in expressions.


The basic ways of defining a position are:
The Cartesian position may optionally be followed by WRT to specify the axis system. Refer to WRT.
POS OF /VESS1 WRT /* or P1 POS OF /CYL2
N 45 W 20000 U 1000
N 1000 FROM /ATEST.
N 1000 FROM P1 OF /BOX2.
N 1000 FROM POSS OF /SCTN1
N (DESP[1] + 10) E
Position attribute plus optional WRT. For example:
POS OF /VESS1 WRT /* or P1 POS OF /CYL2
Cartesian position. For example:
N 45 W 20000 U 1000
Cartesian position from an element. For example:
N 1000 FROM /ATEST.
Cartesian position from a ppoint. For example:
N 1000 FROM P1 OF /BOX2.
Cartesian position from an attribute. For example:
N 1000 FROM POSS OF /SCTN1
Any numeric value within a position may itself be an expression. For example: the following is a valid position expression
N (DESP[1] + 10) E
Position attribute plus optional WRT. For example:
POS OF /VESS1 WRT /* or P1 POS OF /CYL2
Position attribute plus optional WRT. For example:
Cartesian position. For example:
N 45 W 20000 U 1000
Cartesian position. For example:
Cartesian position from an element. For example:
N 1000 FROM /ATEST.
Cartesian position from an element. For example:
Cartesian position from a ppoint. For example:
N 1000 FROM P1 OF /BOX2.
Cartesian position from a ppoint. For example:
Cartesian position from an attribute. For example:
N 1000 FROM POSS OF /SCTN1
Cartesian position from an attribute. For example:
Any numeric value within a position may itself be an expression. For example: the following is a valid position expression
N (DESP[1] + 10) E
Any numeric value within a position may itself be an expression. For example: the following is a valid position expression

WRT
WRT


The WRT keyword is used to toggle between absolute and relative units.
When we specify an element (or attribute of an element) we are specifying an absolute point in world space. The point can be given in world space or some other axis. Normally the answer is required relative to the owner axis system and this is taken as the default. For example:
Q POS
$ will return the position of the current element
$ relatively to its owner.
Q POS OF /EQUIP1
$ will return the position of EQUIP1 relative to its
$ owner.
Q POS
$ will return the position of the current element
$ relatively to its owner.
Q POS OF /EQUIP1
$ will return the position of EQUIP1 relative to its
$ owner.
If we require the result in some other axis system then the WRT keyword is used. For example:
Q POS WRT /*
$.for the position in world coordinates.
Q POS WRT /*
$.for the position in world coordinates.
When we specify a Cartesian coordinate we are dealing with a relative position.
For example, ’N 10’ is meaningless until we specify the axis system, or default to an axis system.
Again we use WRT to do this, although it is important to note that in this case we are going from a relative position to an absolute position (in the previous example WRT was used to go from an absolute position to a relative one).
For example:
N 100 WRT /BOX1
$ specifies an absolute position in world space
$ which is N100 of /BOX1.
N 100 WRT /BOX1
$ specifies an absolute position in world space
$ which is N100 of /BOX1.
The default is that Cartesian coordinates are in the owning element’s axis system. This absolute position can be expressed in different coordinate systems: the default is again the owner’s axis system.
A SITE at (0,0,0)
With default (World) orientation
A ZONE at (100,0,0)
With default (World) orientation
An EQUIPMENT at (100,0,0)
With orientation ’N IS E
A BOX at (-100,0,0)
With default (World) orientation
The result of Q (N 100 WRT /BOX1), will depend on the current element.
World
(300,100,0), in World coordinates.
Site
(300,100,0) in World coordinates because the World is the owner of the current element.
Zone
(300,100,0) in World coordinates, because the Site is the owner of the current element, and the Site coordinates are the same as the World coordinates.
Equipment
(200,100,0), which is the position relative to its owner, the Zone.
Box
(100,100,0) which is the position relative to its owner, the Equipment.
WRT can be further qualified by FROM.
Q POS
$ will return the position of the current element
$ relatively to its owner.
Q POS OF /EQUIP1
$ will return the position of EQUIP1 relative to its
$ owner.
Q POS WRT /*
$.for the position in world coordinates.
N 100 WRT /BOX1
$ specifies an absolute position in world space
$ which is N100 of /BOX1.
Item
Comments
A SITE at (0,0,0)
With default (World) orientation
A ZONE at (100,0,0)
With default (World) orientation
An EQUIPMENT at (100,0,0)
With orientation ’N IS E
A BOX at (-100,0,0)
With default (World) orientation
Location
Result
World
(300,100,0), in World coordinates.
Site
(300,100,0) in World coordinates because the World is the owner of the current element.
Zone
(300,100,0) in World coordinates, because the Site is the owner of the current element, and the Site coordinates are the same as the World coordinates.
Equipment
(200,100,0), which is the position relative to its owner, the Zone.
Box
(100,100,0) which is the position relative to its owner, the Equipment.
Note:
The CONSTRUCT syntax uses the world as the default axis.

Q POS
Q POS OF /EQUIP1
Q POS WRT /*
N 100 WRT /BOX1
Note
:
Q (N 100 WRT /BOX1)


In some cases we require an offset from a fixed point, other than the position of an item. For example, a point or attribute.
The FROM syntax is used for this. We may still use WRT in combination with FROM, but in this case the WRT is only used to determine the axis direction and not the offset, since the offset is specified by the FROM part.
Consider the following:
A SITE at (0,0,0)
With default (World) orientation
A ZONE at (100,0,0)
With default (World) orientation
An EQUIPMENT at (100,0,0)
With orientation ’N IS E
A BOX at (-100,0,0)
With default (World) orientation
The result of Q (N 100 WRT /* FROM /BOX1), shown as Ä in , will depend on the current element.
World, Site, and Zone
(200,200,0) since the offset of N100 is applied in world axis rather than /BOX1 axis.
Equipment
(100,200,0). Note: the default axis for the result is the Zone.
Box
(200,0,0), because the default axis for the result is the Equipment.
The result of ’Q (N 100 WRT /BOX1 FROM /* ) is different:
Site and Zone
(100,0,0)
Equipment
(0,0,0)
Box
(0, -100, 0), because the axis for the result is the Equipment.
The result of ’Q (N 100 FROM /* )’ is different yet again.
For this we cannot mark an absolute point on the diagram since the default WRT will vary with the current element. In fact for the SITE, ZONE, EQUI the point Ä is marked in , and for the BOX the point coincides with the ZONE.
Site and Zone
(0,100,0)
Equipment
(-100,100,0), because the default result axis is the Zone.
Box
(0, -100, 0), because the axis for the result is the Equipment.

Item
Comments
A SITE at (0,0,0)
With default (World) orientation
A ZONE at (100,0,0)
With default (World) orientation
An EQUIPMENT at (100,0,0)
With orientation ’N IS E
A BOX at (-100,0,0)
With default (World) orientation
Location
Result
World, Site, and Zone
(200,200,0) since the offset of N100 is applied in world axis rather than /BOX1 axis.
Equipment
(100,200,0). Note: the default axis for the result is the Zone.
Box
(200,0,0), because the default axis for the result is the Equipment.
Location
Result
Site and Zone
(100,0,0)
Equipment
(0,0,0)
Box
(0, -100, 0), because the axis for the result is the Equipment.
Location
Result
Site and Zone
(0,100,0)
Equipment
(-100,100,0), because the default result axis is the Zone.
Box
(0, -100, 0), because the axis for the result is the Equipment.

Q (N 100 WRT /* FROM /BOX1),
Ä
’Q (N 100 WRT /BOX1 FROM /* )
’Q (N 100 FROM /* )’
Ä


Two positions can be compared with EQ, NE, GT, LT, GE or LE. The pairs of coordinates are only compared in the coordinate axes for which the two positions are defined. A position attribute always has all three coordinates defined.
For positions entered by you, only those coordinates which are given by you are defined. For example:
’N10U3’
$ only the Y and Z coordinates are defined,
$ while the X coordinate remains undefined
’N10U3’
$ only the Y and Z coordinates are defined,
$ while the X coordinate remains undefined
For the EQ operator, all the pairs of defined coordinates should be equal. For NE, only one pair of defined coordinates need be different. For GT (LT,GE,LE), all the defined coordinates of the first position should be greater than (less than, greater than or equal to, less than or equal to) the defined coordinates of the second position. This means that GE is not the opposite of LT and LE is not the opposite of GT.
If no coordinate of the two positions are defined for a common axis (e.g. ’N10’ and ’W4D7’), the result of the comparison is undefined.
’POS EQ W1S2D3’
$ This evaluates to true only if POS of the current $ element is (-1,-2,-3).
’POS GT N10’ or ’N10 LE POS’
$ Only the second coordinate of POS is compared;
$ if it is greater than 10, then the result is true.
’E10N10 GT E0N0’
$ Is true because the inequality is verified for the X
$ and Y axis (both coordinates are undefined for
$ the Z axis, so it is ignored).
’E10N0 GT E0N0’
$ Is false because the Y components are different $ axes.
’E10N0 GT E0U100’
$ Is true. Although no comparison can be
$ performed n either the Y or the Z axis, because
$ the components are not present in both position
$ constants, the comparison is true in the X
$ component.
’N10 EQ W4D7’
$ Is undefined (no comparison is possible).
’POS EQ W1S2D3’
$ This evaluates to true only if POS of the current $ element is (-1,-2,-3).
’POS GT N10’ or ’N10 LE POS’

$ Only the second coordinate of POS is compared;
$ if it is greater than 10, then the result is true.
’E10N10 GT E0N0’
$ Is true because the inequality is verified for the X
$ and Y axis (both coordinates are undefined for
$ the Z axis, so it is ignored).
’E10N0 GT E0N0’
$ Is false because the Y components are different $ axes.
’E10N0 GT E0U100’
$ Is true. Although no comparison can be
$ performed n either the Y or the Z axis, because
$ the components are not present in both position
$ constants, the comparison is true in the X
$ component.
’N10 EQ W4D7’
$ Is undefined (no comparison is possible).
Refer to Precision of Comparisons, for tolerances in comparing numbers.
’N10U3’
$ only the Y and Z coordinates are defined,
$ while the X coordinate remains undefined
’POS EQ W1S2D3’
$ This evaluates to true only if POS of the current $ element is (-1,-2,-3).
’POS GT N10’ or ’N10 LE POS’
$ Only the second coordinate of POS is compared;
$ if it is greater than 10, then the result is true.
’E10N10 GT E0N0’
$ Is true because the inequality is verified for the X
$ and Y axis (both coordinates are undefined for
$ the Z axis, so it is ignored).
’E10N0 GT E0N0’
$ Is false because the Y components are different $ axes.
’E10N0 GT E0U100’
$ Is true. Although no comparison can be
$ performed n either the Y or the Z axis, because
$ the components are not present in both position
$ constants, the comparison is true in the X
$ component.
’N10 EQ W4D7’
$ Is undefined (no comparison is possible).

Precision of Comparisons
’N10U3’
’POS EQ W1S2D3’
’POS GT N10’ or ’N10 LE POS’
’E10N10 GT E0N0’
’E10N0 GT E0N0’
’E10N0 GT E0U100’
’N10 EQ W4D7’
Precision of Comparisons
,


The POLAR keyword allows positions to be defined in terms of a distance in a particular direction from a point.
If FROM is not specified the default is the origin of the owner.
POLAR N 45 E DIST 20M FROM U 10 M
POLAR AXES PL OF PREV DIST ( ABORE * 10 ) FROM PL OF PRE V
POLAR N 45 E DIST 20M FROM U 10 M

POLAR AXES PL OF PREV DIST ( ABORE * 10 ) FROM PL OF PRE V

POLAR N 45 E DIST 20M FROM U 10 M
POLAR AXES PL OF PREV DIST ( ABORE * 10 ) FROM PL OF PRE V
POLAR dir DISTance expr -+- FROM -+- pos -----.
                         |        |           |
                         |        ‘- point ---|
                         |                    |
                         ‘--------------------+--->

POLAR dir DISTance expr -+- FROM -+- pos -----.
                         |        |           |
                         |        ‘- point ---|
                         |                    |
                         ‘--------------------+--->
POLAR N 45 E DIST 20M FROM U 10 M
POLAR AXES PL OF PREV DIST ( ABORE * 10 ) FROM PL OF PRE V


The basic ways of defining a direction are:
HDIR OF /PIPE1 WRT /*
N 45 W
(U WRT CE )
Q ( Z WRT /SCTN )
FROM N 50 WRT CE TO N 100
>- CLOSEST type -+- WITH exp -.
                 |            |
                 ‘------------+- DIRECTION dir -+- EXTENT val -.
                                                |              |
                                                ‘--------------+--> cont

         continued >-+- AFTER val -.
                     |             |
                     ‘-------------+- FROM ? -.
                                   |          |
                                   ‘----------+-->
CLOSEST DIR E
CLOSEST BOX WITH ( PURP EQ ’FLOO’ ) DIR D WRT /* EXTENT 20M
CLOSEST VALVE DIR N 45 U FROM E100 N200 U300
CLOSEST BRAN HANG AFTER 2M
Direction attribute plus optional WRT. For example,
HDIR OF /PIPE1 WRT /*
Cartesian direction. For example,
N 45 W
Cartesian direction WRT to an element.
All Cartesian directions are returned in the axis of the owner of the current element. For example:
(U WRT CE )
will return the Z axis of the current element relative to its owner.
Q ( Z WRT /SCTN )
will return the Z axis direction of /SCTN relative to the owner of the current element. For example, if the result is required in world coordinates the current element must be the World or a Site.
FROM pos2 TO pos2. For example
FROM N 50 WRT CE TO N 100
Keyword AXES followed by a p-point or pline.
The CLOSEST keyword, which will find the closest element in a particular direction.
Direction attribute plus optional WRT. For example,
HDIR OF /PIPE1 WRT /*
Direction attribute plus optional WRT. For example,
Cartesian direction. For example,
N 45 W
Cartesian direction. For example,
Cartesian direction WRT to an element.
Cartesian direction WRT to an element.
All Cartesian directions are returned in the axis of the owner of the current element. For example:
(U WRT CE )
All Cartesian directions are returned in the axis of the owner of the current element. For example:
will return the Z axis of the current element relative to its owner.
Q ( Z WRT /SCTN )
will return the Z axis of the current element relative to its owner.
will return the Z axis direction of /SCTN relative to the owner of the current element. For example, if the result is required in world coordinates the current element must be the World or a Site.
will return the Z axis direction of /SCTN relative to the owner of the current element. For example, if the result is required in world coordinates the current element must be the World or a Site.
FROM pos2 TO pos2. For example
FROM N 50 WRT CE TO N 100
FROM pos2 TO pos2. For example
Keyword AXES followed by a p-point or pline.
Keyword AXES followed by a p-point or pline.
The CLOSEST keyword, which will find the closest element in a particular direction.
The CLOSEST keyword, which will find the closest element in a particular direction.
In the above graph the keywords are:
EXTENT, which is how far to search in the direction specified, default 10M
AFTER, or the distance along vector after which to start search, default 0M
FROM, which specifies an alternative start point other than current element. This is of particular use for a branch where you might want to specify the HPOS or TPOS.
In the above graph the keywords are:
In the above graph the keywords are:
EXTENT, which is how far to search in the direction specified, default 10M
EXTENT, which is how far to search in the direction specified, default 10M
AFTER, or the distance along vector after which to start search, default 0M
AFTER, or the distance along vector after which to start search, default 0M
FROM, which specifies an alternative start point other than current element. This is of particular use for a branch where you might want to specify the HPOS or TPOS.
FROM, which specifies an alternative start point other than current element. This is of particular use for a branch where you might want to specify the HPOS or TPOS.


The basic ways of defining an orientation are:
ORI OF /BOX1 WRT /*
dir IS dir AND dir IS dir
(E IS U WRT /SCTN1 AND N IS E WRT /SCTN1)
            ----<---------.
             /              |
 >-- AXES --*--- PArrive ---|
            |               |
            |--- PLeave ----|
            |               |
            |--- PTail -----|
            |               |
            |--- HHead -----|
            |               |
            |--- HTail -----|
            |               |
            ‘--- PPOINT n --+-- OF - <gid> ---->
( AXES PLEAVE IS AXES PLEAVE OF PREV AND AXES P3 IS UP )
Orientation attribute plus optional WRT. For example:
ORI OF /BOX1 WRT /*
Cartesian orientation. For example:
dir IS dir AND dir IS dir
For example to set an orientation of an element to that of a section, rotated by 90 degrees use:
(E IS U WRT /SCTN1 AND N IS E WRT /SCTN1)
The AXES keyword, which will allow you to use P-points to specify orientations.
Orientation attribute plus optional WRT. For example:
ORI OF /BOX1 WRT /*
Orientation attribute plus optional WRT. For example:
Cartesian orientation. For example:
dir IS dir AND dir IS dir
Cartesian orientation. For example:
For example to set an orientation of an element to that of a section, rotated by 90 degrees use:
(E IS U WRT /SCTN1 AND N IS E WRT /SCTN1)
For example to set an orientation of an element to that of a section, rotated by 90 degrees use:
The AXES keyword, which will allow you to use P-points to specify orientations.
The AXES keyword, which will allow you to use P-points to specify orientations.
This will orient a branch component, such as a valve, so that it is aligned with the previous component and its P3 is up.
Refer to also Compare Positions.
This will orient a branch component, such as a valve, so that it is aligned with the previous component and its P3 is up.
Refer to also Compare Positions.
This will orient a branch component, such as a valve, so that it is aligned with the previous component and its P3 is up.

Compare Positions
            ----<---------.
             /              |
 >-- AXES --*--- PArrive ---|
            |               |
            |--- PLeave ----|
            |               |
            |--- PTail -----|
            |               |
            |--- HHead -----|
            |               |
            |--- HTail -----|
            |               |
            ‘--- PPOINT n --+-- OF - <gid> ---->
Compare Positions


Text expressions can contain the following:
A text string, which must be enclosed in quotes. For example: ’FRED’.
An AVEVA E3D Design attribute of type text or word. For example: FUNC
A single element of a word array attribute. For example: ELEL[2].
Text operators
Text functions
A text string, which must be enclosed in quotes. For example: ’FRED’.
A text string, which must be enclosed in quotes. For example: ’FRED’.
An AVEVA E3D Design attribute of type text or word. For example: FUNC
An AVEVA E3D Design attribute of type text or word. For example: FUNC
A single element of a word array attribute. For example: ELEL[2].
A single element of a word array attribute. For example: ELEL[2].
Text operators
Text operators
Text functions
Text functions


The text operator available is +, used for concatenation.
text1 + text2 -> text
-> text
Return the concatenation of two text strings.
None.
’no’ + ’space’ -> ’nospace’
Text result too long.

Synopsis
text1 + text2 -> text
-> text
Description
Return the concatenation of two text strings.
Side Effects
None.
Example
’no’ + ’space’ -> ’nospace’
Errors
Text result too long.

Synopsis
text1 + text2 -> text
-> text
Description
Side Effects
Example
Errors


The text functions available are:
AFTER
BEFORE
DIMENSIONOF, DIMOF
DIMWOOD
DISTANCE
LOWCASE, UPCASE
PART
REPLACE
STRING
SUBS, DSUBS
TRIM
UNITSOF
VTEXT
AFTER

BEFORE

DIMENSIONOF, DIMOF

DIMWOOD

DISTANCE

LOWCASE, UPCASE

PART

REPLACE

STRING

SUBS, DSUBS

TRIM

UNITSOF

VTEXT

AFTER ( text1 , text2 )
-> text
Return the substring of text1 which is after the leftmost occurrence of text2 in text1.
If text2 does not occur in text1, the null string is returned.
None.
AFTER ( ’abcdef’ , ’cd’ ) ->’ef’
AFTER ( ’abcdef’ , ’x’ ) -> ’’
AFTER ( ’abcdef’ , ’’ ) -> ’abcdef’
None.
BEFORE ( text1 , text2 )
-> text
Return the substring of text1 which is before the leftmost occurrence of text2 in text1. If text2 does not occur in text1, text1 is returned.
None.
BEFORE ( ’abcdef’ , ’cd’ ) -> ’ab’
BEFORE ( ’abcdef’ , ’x’ ) -> ’’
BEFORE ( ’abcdef’ , ’’ ) -> ‘’
None.
DIMensionof or DIMOF
(any real variable or expression)
-> text
Evaluates the real expression and returns its physical dimension as a text string. This is name of the dimension in the table in Standard Units.
The argument can be a single real value (with or without unit qualifier) or any real expression.
None.
Dim (1)
dim(1kg)
dimof(1kg/m3)
dimensionof (1 curie)
dim (1joule / 1 day / sqrt (1 m4))
dim (1 newton / sqrt ( 1 m4)
-> NONE
-> Mass
-> Density
-> Radioactivity
-> GENERIC
-> Pressure

DIMWORD
(any real variable or expression)
-> text
Evaluates the real expression and returns its physical dimension as a word string. This is HASH name of the dimension in the table in Standard Units.
The argument can be a single real value (with or without unit qualifier) or any real expression.
None.
Dimword (1)
dimword (1curie)
Dimword (1kg/5litre)
dimword (1curie)
dimword (1kg/5litre)
dimword (1joule / 1 day / sqrt (1 m4))
dimword (1 newton / sqrt (1 m4)
dim(1kg)
-> NONE
-> RADY
-> DENS
-> RADY
-> DENS
-> GENERIC
-> PRESS
-> Mass

DISTance ( number1 )
-> text
DISTance( number1, logical1, logical2, logical3, number2, logical4)
-> text
For the one-argument form, if the current distance units are FINCH, text is the conversion of the decimal inches value number1 into the format ’aa’bb.cc/dd’. Otherwise, text is the STRING conversion of number1.
The six-argument form is more complex. The format is:
DIST/ANCE (distance, feet, usformat, fraction, denom_or_dp, zeros)
where:
AVEVA E3D Design
For both US and AVEVA E3D Design formats the following rules are observed:
The inches and fraction of inches are followed by a double quote(").
None.
If the current distance units are FINCH:
DISTANCE ( 17.5 ) -> ’1’5.1/2’
Some examples, where the current distance units are feet and inches:
DIST(34.5,TRUE,TRUE,TRUE,100,TRUE) -> 2’-10.1/2.
DIST(34.5,FALSE,TRUE,FALSE,1,TRUE) -> 34.5"
DIST(34.5,FALSE,TRUE,TRUE,4,FALSE) -> 34 1/2"
DIST(128.5,TRUE,FALSE,TRUE,2,TRUE) -> 10’08.1/2"

The following table shows sets of options that could have been chosen and the format of the output produced for different numbers. Blanks output by the system are represented by underscores(_).

The value is too big to be converted.
UPCase ( text1 )
-> text
LOWCase ( text1 )
-> text
Return an upper or lower case version of text1.
None.
UPCASE ( ’False’) -> ’FALSE’
LOWCASE ( ’False’) -> ’false’
None.
PART(text1, number1)
-> text
PART(text1, number1 , text2)
-> text
With two arguments, returns the number1 component of text1 assuming that text1 is split on any whitespace characters. If number1 is negative, counting of components starts from the right.
With three arguments, as above, but use text2 as the separator on which splitting takes place.
If you give a part number higher than the number of components in the string, the function returns an empty string.
None.
PART (’x-y-z’, 1, ’-’ -> ’x’
PART (’a b c d e’, 4-> ’d’
PART (’/PIPE45/B9’, -1, ’/’) -> ’B9’
PART(’aa bb cc’, 2) -> ’bb’
PART(’aa-bb-cc’,3,’-’) -> ’cc’
None.
REPLace (text1,text2,text3)
-> text
REPLace(text1,text2,text3,int1)
-> text
REPLace(text1,text2,text2,int1,int2)
-> text
Replace search string text2 in input string text1 with replacement string text3.
If int1 is given this specifies the first occurrence of text2 at which to start replacement.
If int2 is given this specifies the number of replacements to make. int1 and/or int2 may be negative to indicate that the direction is backwards.
None.
Three arguments:
REPLACE (’cat dog cat cat dog ’, ’cat’, ’dog’ ) -> ’dog dog dog dog dog’
All occurrences of ’cat’ are replaced with ’dog’.

Four arguments: start occurrence given:
REPLACE (’cat dog cat cat cat dog’, ’cat’, ’dog’, 2) -> ’cat dog dog dog dog dog
All occurrence of ’cat’ from the second occurrence onwards are replaced with ’dog’

REPLACE(’cat dog cat cat dog’ ,’cat’, dog’, -2 -> ’dog dog dog cat dog’
All occurrences starting at the second occurrence from the end of the string and moving backwards are replaced Note that a negative fourth argument without a fifth argument implies backwards mode.

Five arguments: start occurrence and number of replacements given. Replace two occurrences of ’cat’ starting at second occurrence:
REPLACE (’cat dog cat cat cat, ’cat’, ’dog’, 2,2) -> ’cat dog dog dog cat’
Replace two occurrences in backwards direction starting at the second occurrence:
REPLACE (’cat dog cat cat cat’, ,’cat’, ’dog’, 2, -2) -> ’dog dog dog cat cat ’

Replace two occurrences in forwards direction starting at second occurrence from the end of the string:
REPLACE (’cat cat cat cat dog’, ’cat’, ’dog’,-2,2) -> ’cat cat dog dog dog’
Replace two occurrences in backwards direction starting at second occurrence from the end of the string.
REPLACE (’cat cat cat cat dog’,’cat’, ’dog’, -2, -2) -> ’cat dog dog cat dog’

The following examples all give the same result:
REPLACE(’cat1 cat2 cat3 cat4 cat5 cat6 cat7 cat8 cat9 cat10’, ’cat’, ’dog’, 4, 2)
REPLACE(’cat1 cat2 cat3 cat4 cat5 cat6 cat7 cat8 cat9 cat10’, ’cat’, ’dog’, 5, -2)
REPLACE(’cat1 cat2 cat3 cat4 cat5 cat6 cat7 cat8 cat9 cat10’, ’cat’, ’dog’,-6, -2)
REPLACE(’cat1 cat2 cat3 cat4 cat5 cat6 cat7 cat8 cat9 cat10’, ’cat’, ’dog’, -7, 2)

In each case, the output string is
’cat1 cat2 cat3 dog4 dog5 cat6 cat7 cat8 cat9 cat10’

If the replacement string text3 is a null string the required number of occurrences of the search string text2 are removed. For example:
REPLACE (’AAABBABZ’, ’B’, ’’) -> ’AAAAZ’
REPLACE (’AAABBABZ’, ’B’, ’’, -1, -1) -> ’AAABBAZ’
If the input string text1 is a null string or an unset text attribute, the input string text1 is returned unchanged. For example:
REPLACE (’’, ’A’,’B’) -> ’’
If the search string text2 is longer than the input string text1, the input string text1 is returned unchanged. For example:
REPLACE(’AA’, ’AAAAA’ , ’B’) -> ’AA’

If no occurrence of the search string text2 is found, the input string text1 is returned unchanged. For example:
If required occurrence int1 is not found the input string text1 is returned unchanged. For example:
REPLACE(’AAAAAA’, ’A’, ’B’, 10 )   -> ’AAAAAA’

If the number of replacements required int2 is greater than the actual number of occurrence from the specified start occurrence, replacements are made up to the end of the string ( or beginning in backwards mode). For example:
REPLACE (’AAAAAA’, ’A’, ’B’, -3, 8) -> ’BBBBAA’
STRing ( any scalar type )
-> text
STRing ( number , text1 )
-> text
STRing ( pos , text1 )
-> text
Turns a value into a text string.
With a single argument the STRING function can be applied to the following scalar data types:

With only one argument, decimal places are output to give a maximum of six significant figures. Trailing zeros are always removed in this case.

With two arguments the data type may be either numeric (scalar) or position or direction. With two arguments, convert a number or position into a text string using the format described by text1, which may take any of the values between ’D0’ and ’D6’ (or ’d0’ and ’d6’), where the number indicates the number of decimal places.

For numbers, STRING always outputs values as millimetres. If unit conversion is needed then the DIST function should be used. For positions, the current distance units are used.
None.
STRING ( 1 ) -> ’1’
STRING ( 1 , ’D3’ ) -> ’1.000’
STRING ( 1.23456789 ) -> ’1.23457’
STRING(1.1230000) ->’1.123’
STRING ( 1.23456789 , ’D3’ ) -> ’1.235’
STRING (9*9 LT 100) -> ’TRUE’
STRING (OWN OF CE) -> ’/PIPE1’
STRING(POS) -> ’W1000 N20000 U18000’
STRING(POS, ’D4’ ) -> ’W10000.1234 N20000.1234 U18000.1234’
STRING(HDIR OF /PIPE1-1) -> ’D’
STRING(E 22.0125 N, ’D2’) -> ’E 22.01 N’
STRING (ORI OF NEXT) -> ’Y IS D AND Z IS U’

SUBString ( text1 , number1 )
-> text
SUBString ( text1 , number1 , number2 )
-> text
With two arguments, return the substring of text1 beginning at the position number1 to the end of text1.
With three arguments, return the substring of text1 beginning at the position number1 and of length number2. If number1 is negative, then counting of characters starts from the RHS of the input string. If number2 is negative, then characters up to and including the start position are returned.
None.
SUBSTRING ( ’abcdef’ , 3 ) -> ’cdef’
SUBSTRING ( ’abcdef’ ,-3 ) -> ’abcd’
SUBSTRING ( ’abcdef’ , 3 , 2 ) -> ’cd’
SUBSTRING ( ’abcdef’ , -3, 2 ) -> ’de’
SUBSTRING ( ’abcdef’ , 3 , -2 ) -> ’bc’
SUBSTRING ( ’abcdef’ , 10 ) -> ’’
SUBSTRING ( ’abcdef’ , -10 , 2 ) -> ’ab’
None.
TRIM ( text1 )
-> text
TRIM ( text1, text2 )
-> text
TRIM ( text1, text2, text3 )
-> text
When only one argument is supplied, TRIM removes all spaces to the left (leading) and right (trailing) of text1 and returns the answer in text.
When two arguments are supplied, text2 specifies where the spaces should be removed from: either ’L’ or ’l’ for left, ’R’ or ’r’ for right, and ’M’ or ’m’ for multiple (where multiple occurrences of blanks are squeezed to a single spaces) or any combination of the three key letters. So the default is ’LR’ when this field is omitted.
When the third argument text3 is also supplied, this should only be a single character which overrides the space character as the character being trimmed.
None.
TRIM ( ’ How now, brown cow ’, ’LRM’ ) -> ’How now, brown cow’
TRIM ( ’10.3000’, ’R’, ’0’ ) -> ’10.3’
None.
UNITSOF or UNIT
(any real variable or expression)
-> text
Evaluates the real expression and returns its current units a text string. This is standard unit qualifier that would be output with the value when queried.
The argument can be a single real value (with or without unit qualifier) or any real expression.
None.
Note these are only possible results, depending on current units
UNITOF (1)
UNITOF (1kg)
UNITOF (1kg/m3)
UNITOF (1 curie)
UNITOF (1joule / 1 day / sqrt (1 m4))
UNITOF (1 newton / sqrt (1 m4))
-> ‘’
-> lb
-> lb/ft3
-> curie
-> j/s/mm2
-> bar
None.
VTEXT is used for the late evaluation of variables.
VTEXT ( variable-name )
-> text
VTEXT ( variable-name , number )
-> text
With one argument, it gets the value of the scalar variable or the value of the array variable element.
With two arguments, it gets the value of the element corresponding to the index number.
The value is returned as a text string.
See also VLOGICAL used for late evaluation when a logical result is required, and VVALUE used for late evaluation when a numeric result is required.
If the scalar variable, the array variable or the array variable element does not exist, the result is undefined.
VTEXT ( !var ) -> ’hello’
VTEXT ( !array[1] ) -> ’1.00’
VTEXT ( !array , 2 ) -> ’0.00’
Errors Scalar variable may not be indexed (for example, VTEXT (!var[1]) ).
Array variable must have an index (for example, VTEXT ( !array ) ).

AFTER
BEFORE
DIMENSIONOF, DIMOF
DIMWOOD
DISTANCE
LOWCASE, UPCASE
PART
REPLACE
STRING
SUBS, DSUBS
TRIM
UNITSOF
VTEXT
Synopsis
AFTER ( text1 , text2 )
-> text
Description
Return the substring of text1 which is after the leftmost occurrence of text2 in text1.
If text2 does not occur in text1, the null string is returned.
Side Effects
None.
Example
AFTER ( ’abcdef’ , ’cd’ ) ->’ef’
AFTER ( ’abcdef’ , ’x’ ) -> ’’
AFTER ( ’abcdef’ , ’’ ) -> ’abcdef’
Errors
None.
Synopsis
BEFORE ( text1 , text2 )
-> text
Description
Return the substring of text1 which is before the leftmost occurrence of text2 in text1. If text2 does not occur in text1, text1 is returned.
Side Effects
None.
Example
BEFORE ( ’abcdef’ , ’cd’ ) -> ’ab’
BEFORE ( ’abcdef’ , ’x’ ) -> ’’
BEFORE ( ’abcdef’ , ’’ ) -> ‘’
Errors
None.
Synopsis
DIMensionof or DIMOF
(any real variable or expression)
-> text
Description
Evaluates the real expression and returns its physical dimension as a text string. This is name of the dimension in the table in Standard Units.
The argument can be a single real value (with or without unit qualifier) or any real expression.
Side Effects
None.
Example
Dim (1)
dim(1kg)
dimof(1kg/m3)
dimensionof (1 curie)
dim (1joule / 1 day / sqrt (1 m4))
dim (1 newton / sqrt ( 1 m4)
-> NONE
-> Mass
-> Density
-> Radioactivity
-> GENERIC
-> Pressure
Errors
Synopsis
DIMWORD
(any real variable or expression)
-> text
Description
Evaluates the real expression and returns its physical dimension as a word string. This is HASH name of the dimension in the table in Standard Units.
The argument can be a single real value (with or without unit qualifier) or any real expression.
Side Effects
None.
Example
Dimword (1)
dimword (1curie)
Dimword (1kg/5litre)
dimword (1curie)
dimword (1kg/5litre)
dimword (1joule / 1 day / sqrt (1 m4))
dimword (1 newton / sqrt (1 m4)
dim(1kg)
-> NONE
-> RADY
-> DENS
-> RADY
-> DENS
-> GENERIC
-> PRESS
-> Mass
Errors
Synopsis
DISTance ( number1 )
-> text
DISTance( number1, logical1, logical2, logical3, number2, logical4)
-> text
Description
For the one-argument form, if the current distance units are FINCH, text is the conversion of the decimal inches value number1 into the format ’aa’bb.cc/dd’. Otherwise, text is the STRING conversion of number1.
The six-argument form is more complex. The format is:
DIST/ANCE (distance, feet, usformat, fraction, denom_or_dp, zeros)
where:
distance is the numeric distance in inches that is to be formatted.
feet is a logical flag set to true if output is to be in feet and inches and to false if output is to be in inches.
usformat is a logical set to true if US format is to be used or false if AVEVA E3D Design format is to be used.
fraction is a logical set to true if the fractional component is to be output as a fraction or false if to be output as a decimal denom_or_dp is a number representing the largest denominator if fraction is TRUE or representing the number of decimal places if it is FALSE.
zeros is a logical set to true if zeros are to be shown when that component of the output has no value. .
AVEVA E3D Design
For both US and AVEVA E3D Design formats the following rules are observed:
If distance is negative, the first symbol is a minus sign.
If feet is true and the distance is at least a foot, then the number of feet is output next, followed by a single quote (’). Only if zeros is true will the number of feet be output as 0 for distances less than a foot. Otherwise the feet will be omitted.
If feet have been output, the inches will be at least two characters wide. Numbers less than ten will be preceded by a space if US format is being used or a zero if AVEVA E3D Design format is used. A zero will be output if there are no whole inches.
If no feet have been output and the distance is at least an inch, then the number of inches is displayed but without any preceding spaces. Only if zeros is true will a 0 be output for distances of less than an inch.
If inches have been output and fraction is true, these will be followed by a decimal point (.).
If fraction is TRUE and the number has a fractional component, then the numerator and the denominator are shown separated by a slash (/). This is then blank padded up to the width that the largest numerator and denominator would take.
If fraction is FALSE and the number of decimal places is greater than zero, then the decimal point (.) is displayed followed by the remainder up to the appropriate number of decimal places. If the number of decimal places is 0 then the decimal point is not shown either.
If US format has been selected then the following additional rules are observed on output:
The (’) after the number of feet is followed by a dash
(-).
The decimal point separating the inches from the fraction is replaced by a space.
The inches and fraction of inches are followed by a double quote(").
Side Effects
None.
Example
If the current distance units are FINCH:
DISTANCE ( 17.5 ) -> ’1’5.1/2’
Some examples, where the current distance units are feet and inches:
DIST(34.5,TRUE,TRUE,TRUE,100,TRUE) -> 2’-10.1/2.
DIST(34.5,FALSE,TRUE,FALSE,1,TRUE) -> 34.5"
DIST(34.5,FALSE,TRUE,TRUE,4,FALSE) -> 34 1/2"
DIST(128.5,TRUE,FALSE,TRUE,2,TRUE) -> 10’08.1/2"
The following table shows sets of options that could have been chosen and the format of the output produced for different numbers. Blanks output by the system are represented by underscores(_).
Errors
The value is too big to be converted.
Synopsis
UPCase ( text1 )
-> text
LOWCase ( text1 )
-> text
Description
Return an upper or lower case version of text1.
Side Effects
None.
Example
UPCASE ( ’False’) -> ’FALSE’
LOWCASE ( ’False’) -> ’false’
Errors
None.
Synopsis
PART(text1, number1)
-> text
PART(text1, number1 , text2)
-> text
Description
With two arguments, returns the number1 component of text1 assuming that text1 is split on any whitespace characters. If number1 is negative, counting of components starts from the right.
With three arguments, as above, but use text2 as the separator on which splitting takes place.
If you give a part number higher than the number of components in the string, the function returns an empty string.
Side Effects
None.
Example
PART (’x-y-z’, 1, ’-’ -> ’x’
PART (’a b c d e’, 4-> ’d’
PART (’/PIPE45/B9’, -1, ’/’) -> ’B9’
PART(’aa bb cc’, 2) -> ’bb’
PART(’aa-bb-cc’,3,’-’) -> ’cc’
Errors
None.
Synopsis
REPLace (text1,text2,text3)
-> text
REPLace(text1,text2,text3,int1)
-> text
REPLace(text1,text2,text2,int1,int2)
-> text
Description
Replace search string text2 in input string text1 with replacement string text3.
If int1 is given this specifies the first occurrence of text2 at which to start replacement.
If int2 is given this specifies the number of replacements to make. int1 and/or int2 may be negative to indicate that the direction is backwards.
Side Effects
None.
Example
Three arguments:
REPLACE (’cat dog cat cat dog ’, ’cat’, ’dog’ ) -> ’dog dog dog dog dog’
All occurrences of ’cat’ are replaced with ’dog’.
Four arguments: start occurrence given:
REPLACE (’cat dog cat cat cat dog’, ’cat’, ’dog’, 2) -> ’cat dog dog dog dog dog
All occurrence of ’cat’ from the second occurrence onwards are replaced with ’dog’
REPLACE(’cat dog cat cat dog’ ,’cat’, dog’, -2 -> ’dog dog dog cat dog’
All occurrences starting at the second occurrence from the end of the string and moving backwards are replaced Note that a negative fourth argument without a fifth argument implies backwards mode.
Five arguments: start occurrence and number of replacements given. Replace two occurrences of ’cat’ starting at second occurrence:
REPLACE (’cat dog cat cat cat, ’cat’, ’dog’, 2,2) -> ’cat dog dog dog cat’
Replace two occurrences in backwards direction starting at the second occurrence:
REPLACE (’cat dog cat cat cat’, ,’cat’, ’dog’, 2, -2) -> ’dog dog dog cat cat ’
Replace two occurrences in forwards direction starting at second occurrence from the end of the string:
REPLACE (’cat cat cat cat dog’, ’cat’, ’dog’,-2,2) -> ’cat cat dog dog dog’
Replace two occurrences in backwards direction starting at second occurrence from the end of the string.
REPLACE (’cat cat cat cat dog’,’cat’, ’dog’, -2, -2) -> ’cat dog dog cat dog’
The following examples all give the same result:
REPLACE(’cat1 cat2 cat3 cat4 cat5 cat6 cat7 cat8 cat9 cat10’, ’cat’, ’dog’, 4, 2)
REPLACE(’cat1 cat2 cat3 cat4 cat5 cat6 cat7 cat8 cat9 cat10’, ’cat’, ’dog’, 5, -2)
REPLACE(’cat1 cat2 cat3 cat4 cat5 cat6 cat7 cat8 cat9 cat10’, ’cat’, ’dog’,-6, -2)
REPLACE(’cat1 cat2 cat3 cat4 cat5 cat6 cat7 cat8 cat9 cat10’, ’cat’, ’dog’, -7, 2)
In each case, the output string is
’cat1 cat2 cat3 dog4 dog5 cat6 cat7 cat8 cat9 cat10’
If the replacement string text3 is a null string the required number of occurrences of the search string text2 are removed. For example:
REPLACE (’AAABBABZ’, ’B’, ’’) -> ’AAAAZ’
REPLACE (’AAABBABZ’, ’B’, ’’, -1, -1) -> ’AAABBAZ’
Errors
If the input string text1 is a null string or an unset text attribute, the input string text1 is returned unchanged. For example:
REPLACE (’’, ’A’,’B’) -> ’’
If the search string text2 is longer than the input string text1, the input string text1 is returned unchanged. For example:
REPLACE(’AA’, ’AAAAA’ , ’B’) -> ’AA’
If no occurrence of the search string text2 is found, the input string text1 is returned unchanged. For example:
REPLACE( ’AAAAAA’,’B’,’C’)  -> ’AAAAAA
If required occurrence int1 is not found the input string text1 is returned unchanged. For example:
REPLACE(’AAAAAA’, ’A’, ’B’, 10 )   -> ’AAAAAA’
If the number of replacements required int2 is greater than the actual number of occurrence from the specified start occurrence, replacements are made up to the end of the string ( or beginning in backwards mode). For example:
REPLACE(’AAAAAA’, ’A’, ’B’, 2, 8) ->   ’ABBBBB’
REPLACE (’AAAAAA’, ’A’, ’B’, -3, 8) -> ’BBBBAA’
Synopsis
STRing ( any scalar type )
-> text
STRing ( number , text1 )
-> text
STRing ( pos , text1 )
-> text
Description
Turns a value into a text string.
With a single argument the STRING function can be applied to the following scalar data types:
Numeric
Logical
Id
Position
Direction
Orientation
With only one argument, decimal places are output to give a maximum of six significant figures. Trailing zeros are always removed in this case.
With two arguments the data type may be either numeric (scalar) or position or direction. With two arguments, convert a number or position into a text string using the format described by text1, which may take any of the values between ’D0’ and ’D6’ (or ’d0’ and ’d6’), where the number indicates the number of decimal places.
For numbers, STRING always outputs values as millimetres. If unit conversion is needed then the DIST function should be used. For positions, the current distance units are used.
Side Effects
None.
Example
STRING ( 1 ) -> ’1’
STRING ( 1 , ’D3’ ) -> ’1.000’
STRING ( 1.23456789 ) -> ’1.23457’
STRING(1.1230000) ->’1.123’
STRING ( 1.23456789 , ’D3’ ) -> ’1.235’
STRING (9*9 LT 100) -> ’TRUE’
STRING (OWN OF CE) -> ’/PIPE1’
STRING(POS) -> ’W1000 N20000 U18000’
STRING(POS, ’D4’ ) -> ’W10000.1234 N20000.1234 U18000.1234’
STRING(HDIR OF /PIPE1-1) -> ’D’
STRING(E 22.0125 N, ’D2’) -> ’E 22.01 N’
STRING (ORI OF NEXT) -> ’Y IS D AND Z IS U’
Errors
Synopsis
SUBString ( text1 , number1 )
-> text
SUBString ( text1 , number1 , number2 )
-> text
Description
With two arguments, return the substring of text1 beginning at the position number1 to the end of text1.
With three arguments, return the substring of text1 beginning at the position number1 and of length number2. If number1 is negative, then counting of characters starts from the RHS of the input string. If number2 is negative, then characters up to and including the start position are returned.
Side Effects
None.
Example
SUBSTRING ( ’abcdef’ , 3 ) -> ’cdef’
SUBSTRING ( ’abcdef’ ,-3 ) -> ’abcd’
SUBSTRING ( ’abcdef’ , 3 , 2 ) -> ’cd’
SUBSTRING ( ’abcdef’ , -3, 2 ) -> ’de’
SUBSTRING ( ’abcdef’ , 3 , -2 ) -> ’bc’
SUBSTRING ( ’abcdef’ , 10 ) -> ’’
SUBSTRING ( ’abcdef’ , -10 , 2 ) -> ’ab’
Errors
None.
Synopsis
TRIM ( text1 )
-> text
TRIM ( text1, text2 )
-> text
TRIM ( text1, text2, text3 )
-> text
Description
When only one argument is supplied, TRIM removes all spaces to the left (leading) and right (trailing) of text1 and returns the answer in text.
When two arguments are supplied, text2 specifies where the spaces should be removed from: either ’L’ or ’l’ for left, ’R’ or ’r’ for right, and ’M’ or ’m’ for multiple (where multiple occurrences of blanks are squeezed to a single spaces) or any combination of the three key letters. So the default is ’LR’ when this field is omitted.
When the third argument text3 is also supplied, this should only be a single character which overrides the space character as the character being trimmed.
Side Effects
None.
Example
TRIM ( ’ How now, brown cow ’, ’LRM’ ) -> ’How now, brown cow’
TRIM ( ’10.3000’, ’R’, ’0’ ) -> ’10.3’
Errors
None.
Synopsis
UNITSOF or UNIT
(any real variable or expression)
-> text
Description
Evaluates the real expression and returns its current units a text string. This is standard unit qualifier that would be output with the value when queried.
The argument can be a single real value (with or without unit qualifier) or any real expression.
Side Effects
None.
Example
Note these are only possible results, depending on current units
UNITOF (1)
UNITOF (1kg)
UNITOF (1kg/m3)
UNITOF (1 curie)
UNITOF (1joule / 1 day / sqrt (1 m4))
UNITOF (1 newton / sqrt (1 m4))
-> ‘’
-> lb
-> lb/ft3
-> curie
-> j/s/mm2
-> bar
Errors
None.
Synopsis
VTEXT ( variable-name )
-> text
VTEXT ( variable-name , number )
-> text
Description
With one argument, it gets the value of the scalar variable or the value of the array variable element.
With two arguments, it gets the value of the element corresponding to the index number.
The value is returned as a text string.
See also VLOGICAL used for late evaluation when a logical result is required, and VVALUE used for late evaluation when a numeric result is required.
Side Effects
If the scalar variable, the array variable or the array variable element does not exist, the result is undefined.
Example
VTEXT ( !var ) -> ’hello’
VTEXT ( !array[1] ) -> ’1.00’
VTEXT ( !array , 2 ) -> ’0.00’
Errors
Errors Scalar variable may not be indexed (for example, VTEXT (!var[1]) ).
Array variable must have an index (for example, VTEXT ( !array ) ).
distance is the numeric distance in inches that is to be formatted.
feet is a logical flag set to true if output is to be in feet and inches and to false if output is to be in inches.
usformat is a logical set to true if US format is to be used or false if AVEVA E3D Design format is to be used.
distance is the numeric distance in inches that is to be formatted.
distance is the numeric distance in inches that is to be formatted.
feet is a logical flag set to true if output is to be in feet and inches and to false if output is to be in inches.
feet is a logical flag set to true if output is to be in feet and inches and to false if output is to be in inches.
usformat is a logical set to true if US format is to be used or false if AVEVA E3D Design format is to be used.
usformat is a logical set to true if US format is to be used or false if AVEVA E3D Design format is to be used.
fraction is a logical set to true if the fractional component is to be output as a fraction or false if to be output as a decimal denom_or_dp is a number representing the largest denominator if fraction is TRUE or representing the number of decimal places if it is FALSE.
zeros is a logical set to true if zeros are to be shown when that component of the output has no value. .
fraction is a logical set to true if the fractional component is to be output as a fraction or false if to be output as a decimal denom_or_dp is a number representing the largest denominator if fraction is TRUE or representing the number of decimal places if it is FALSE.
fraction is a logical set to true if the fractional component is to be output as a fraction or false if to be output as a decimal denom_or_dp is a number representing the largest denominator if fraction is TRUE or representing the number of decimal places if it is FALSE.
zeros is a logical set to true if zeros are to be shown when that component of the output has no value. .
zeros is a logical set to true if zeros are to be shown when that component of the output has no value. .
If distance is negative, the first symbol is a minus sign.
If feet is true and the distance is at least a foot, then the number of feet is output next, followed by a single quote (’). Only if zeros is true will the number of feet be output as 0 for distances less than a foot. Otherwise the feet will be omitted.
If distance is negative, the first symbol is a minus sign.
If distance is negative, the first symbol is a minus sign.
If feet is true and the distance is at least a foot, then the number of feet is output next, followed by a single quote (’). Only if zeros is true will the number of feet be output as 0 for distances less than a foot. Otherwise the feet will be omitted.
If feet is true and the distance is at least a foot, then the number of feet is output next, followed by a single quote (’). Only if zeros is true will the number of feet be output as 0 for distances less than a foot. Otherwise the feet will be omitted.
If feet have been output, the inches will be at least two characters wide. Numbers less than ten will be preceded by a space if US format is being used or a zero if AVEVA E3D Design format is used. A zero will be output if there are no whole inches.
If feet have been output, the inches will be at least two characters wide. Numbers less than ten will be preceded by a space if US format is being used or a zero if AVEVA E3D Design format is used. A zero will be output if there are no whole inches.
If feet have been output, the inches will be at least two characters wide. Numbers less than ten will be preceded by a space if US format is being used or a zero if AVEVA E3D Design format is used. A zero will be output if there are no whole inches.
If no feet have been output and the distance is at least an inch, then the number of inches is displayed but without any preceding spaces. Only if zeros is true will a 0 be output for distances of less than an inch.
If inches have been output and fraction is true, these will be followed by a decimal point (.).
If no feet have been output and the distance is at least an inch, then the number of inches is displayed but without any preceding spaces. Only if zeros is true will a 0 be output for distances of less than an inch.
If no feet have been output and the distance is at least an inch, then the number of inches is displayed but without any preceding spaces. Only if zeros is true will a 0 be output for distances of less than an inch.
If inches have been output and fraction is true, these will be followed by a decimal point (.).
If inches have been output and fraction is true, these will be followed by a decimal point (.).
If fraction is TRUE and the number has a fractional component, then the numerator and the denominator are shown separated by a slash (/). This is then blank padded up to the width that the largest numerator and denominator would take.
If fraction is TRUE and the number has a fractional component, then the numerator and the denominator are shown separated by a slash (/). This is then blank padded up to the width that the largest numerator and denominator would take.
If fraction is TRUE and the number has a fractional component, then the numerator and the denominator are shown separated by a slash (/). This is then blank padded up to the width that the largest numerator and denominator would take.
If fraction is FALSE and the number of decimal places is greater than zero, then the decimal point (.) is displayed followed by the remainder up to the appropriate number of decimal places. If the number of decimal places is 0 then the decimal point is not shown either.
If US format has been selected then the following additional rules are observed on output:
If fraction is FALSE and the number of decimal places is greater than zero, then the decimal point (.) is displayed followed by the remainder up to the appropriate number of decimal places. If the number of decimal places is 0 then the decimal point is not shown either.
If fraction is FALSE and the number of decimal places is greater than zero, then the decimal point (.) is displayed followed by the remainder up to the appropriate number of decimal places. If the number of decimal places is 0 then the decimal point is not shown either.
If US format has been selected then the following additional rules are observed on output:
If US format has been selected then the following additional rules are observed on output:
The (’) after the number of feet is followed by a dash
(-).
The decimal point separating the inches from the fraction is replaced by a space.
The (’) after the number of feet is followed by a dash
The (’) after the number of feet is followed by a dash
(-).
(-).
The decimal point separating the inches from the fraction is replaced by a space.
The decimal point separating the inches from


Late Evaluation of Variables in Expressions

The functions Valid Value elements (VVALUE), VLOGICAL and VTEXT are used for late evaluation of Programmable Macro Language (PML) variables, that is, they enable you to specify PML variables in expressions which will not be evaluated until the expression is evaluated. For example, when you are creating a report template, you are actually creating a macro which will run when a report is generated. All variables in a report template must therefore be preceded by a suitable late evaluation operator; otherwise the system will try to substitute a value for the variable when it is entered on the form. The difference between the operators is the type of output. VVALUE is used to output a numeric value, VLOGICAL to output a logical variable and VTEXT to output a text variable.


All attributes and pseudo-attributes may be recognised within expressions. Optionally they may be followed by ’OF’ to denote a different element to the current one; for example, POS OF /VESS1. Brackets may be used to denote an element of an array, for example DESP[8 + 1] for the ninth value of DESP. Since syntax clashes are possible, the keyword ATTRIB may be used to denote that an attribute follows. For example, ATTRIB E will denote the pseudo-attribute EAST as opposed to the start of a position or direction. Attributes are described in the Data Model Reference Manual.

Data Model Reference Manual
DESP[8 + 1]
Data Model Reference Manual


All expressions may be queried. Arrays are always concatenated into a single variable. Imperial values are always output as inch to variables. This preserves maximum accuracy. To output in FINCH, then the DISTANCE function must be used. In general expression do not have to be enclosed in brackets, but to be sure that other queries are not picked up by mistake then it is advisable to do so.
Particular queries that could lead to confusion are those available both outside and inside expressions. These are:
The functionality may vary between outside and inside expression queries. For example, ’Q N 100 FROM /POSS’ is not valid. It must be entered as Q N 100 FROM /POSS ).
Q PPOINT n
Q POS or cartesian position
Q ORI or cartesian orientation
Q PPOINT n
Q PPOINT n
Q POS or cartesian position
Q POS or cartesian position
Q ORI or cartesian orientation
Q ORI or cartesian orientation

Q PPOINT n
Q POS or cartesian position
Q ORI or cartesian orientation
’Q N 100 FROM /POSS’
Q N 100 FROM /POSS


To allow for small losses of accuracy, the following tolerances are used.
Number
Tolerance factor of 0.000001.
In other words, if the difference between two reals is not greater than 0.000001* (maximum of the two values) then the values are considered to be equal. For example,
Position
Considered to be equal if within 0.5 mm of one another.
Direction or Orientation
Considered to be equal if values are within 0.005.

Object
Tolerance
Number
Tolerance factor of 0.000001.
In other words, if the difference between two reals is not greater than 0.000001* (maximum of the two values) then the values are considered to be equal. For example,
(1.000001 GT 1) is FALSE as it considers 1.000001; and 1 to be equal;
(1.000002 GT 1) is TRUE.
Position
Considered to be equal if within 0.5 mm of one another.
Direction or Orientation
Considered to be equal if values are within 0.005.
(1.000001 GT 1) is FALSE as it considers 1.000001; and 1 to be equal;
(1.000002 GT 1) is TRUE.
(1.000001 GT 1) is FALSE as it considers 1.000001; and 1 to be equal;
(1.000001 GT 1) is FALSE as it considers 1.000001; and 1 to be equal;
(1.000002 GT 1) is TRUE.
(1.000002 GT 1) is TRUE.


In order to permit expressions like ((DIAM GT 200.0) OR (TYPE EQ ’BOX’)), expressions must be able to cope with undefined values. Generally, applying an operator to one or more undefined arguments has an undefined result.
Two exceptions are: the use of the AND operator with a false argument, will result in FALSE, regardless of whether or not the remainder of the arguments are defined; and OR which returns TRUE if any of its arguments is TRUE. For example, consider applying the above expression when the current element is a box. DIAM is undefined; therefore (DIAM GT 200.0) is also undefined. However, (TYPE EQ ’BOX’) is certainly true and so the final result of the whole expression evaluates to TRUE.
An undefined result occurs when:
One of the operands or arguments of a function (except some cases of AND and OR) is undefined.
An attribute is unavailable for the corresponding element (for example, ’DIAM OF OWNER’ when the current element is a box).
An element is undefined (for example, ’OWNER’ when the current element is the WORLD).
An attribute is unset (for example, text attribute or User defined Atrtribute (UDA) of length 0).
A variable is undefined (for example, ’VVAL(!ARC6)’ where !ARC6 has never been initialized).
Two position constants are compared with GT, GE, LT or LE and they have no common coordinates (for example, ’N10 EQ E5’).
If the result of the whole expression is undefined, an error occurs.
One of the operands or arguments of a function (except some cases of AND and OR) is undefined.
One of the operands or arguments of a function (except some cases of AND and OR) is undefined.
An attribute is unavailable for the corresponding element (for example, ’DIAM OF OWNER’ when the current element is a box).
An attribute is unavailable for the corresponding element (for example, ’DIAM OF OWNER’ when the current element is a box).
An element is undefined (for example, ’OWNER’ when the current element is the WORLD).
An element is undefined (for example, ’OWNER’ when the current element is the WORLD).
An attribute is unset (for example, text attribute or User defined Atrtribute (UDA) of length 0).
An attribute is unset (for example, text attribute or User defined Atrtribute (UDA) of length 0).
A variable is undefined (for example, ’VVAL(!ARC6)’ where !ARC6 has never been initialized).
A variable is undefined (for example, ’VVAL(!ARC6)’ where !ARC6 has never been initialized).
Two position constants are compared with GT, GE, LT or LE and they have no common coordinates (for example, ’N10 EQ E5’).
Two position constants are compared with GT, GE, LT or LE and they have no common coordinates (for example, ’N10 EQ E5’).
If the result of the whole expression is undefined, an error occurs.
If the result of the whole expression is undefined, an error occurs.

((DIAM GT 200.0) OR (TYPE EQ ’BOX’))
(DIAM GT 200.0)
(TYPE EQ ’BOX’)
’DIAM OF OWNER’
’OWNER’
’VVAL(!ARC6)’
!ARC6
’N10 EQ E5’


A particular class of undefined values are unset values. The concept exists for attributes which are valid for a given element, but for which no value has been assigned. Typically these may be elements of an array, or ’word’ attributes. References of value =0/0 are also treated as unset.
Unset values are propagated as for undefined values (except for Boolean operations- see below). Undefined values take precedence over unset. There is a specific logical function UNSET to test if a values is unset.
Across comparisons, unset values are not propagated, but are treated as follows:
EQ, GT, GE, LT, LE
Results in FALSE.
NE
Results in TRUE.
OR , AND
Values are treated as FALSE.
For example, if DESP(2) and LVAL(3) are unset then:
Operator
When Applied to an UNSET
EQ, GT, GE, LT, LE
Results in FALSE.
NE
Results in TRUE.
OR , AND
Values are treated as FALSE.
(DESP(2) GT 99) -> False
(DESP(2) NE 33) -> True
(:LVAL(3) AND TRUE) -> False

DESP(2)
LVAL(3)


Rather than being set explicitly, the values of some types of attribute can be specified in terms of rules; that is, expressions from which the attribute values can be evaluated. Rules can be set only for attributes of the following types (including user-defined attributes): text, scalar (integer, real or logical), position, orientation, direction; they cannot be set for reference attributes. A static rule will change the attribute setting only when verified or executed explicitly, whereas a dynamic rule will update the attribute setting whenever any part of the expression changes (the default type is static).

static
dynamic