Reserved Characters
Reserved Characters in Expressions
AMP
AMP = &
For example, if the desired pipeline command were as follows:
- Select_Active_File
- /FILE_NAME=ALL_FILES
- /QUERY= TAG1 & TAG2
- ;
If the tags TAG1 and TAG2 exist then all files that have been assigned both tags will be active.
If, however, we want to use pipeline parameters in place of the text TAG1 and TAG2, we have a problem because there is no way to stop Visual3D from using the & character to concatenate the text. The solution was to introduce a reserved parameter ::AMP.
The following pipeline would result
Set_Pipeline_Parameter
- Set_Pipeline_Parameter
- /PARAMETER_NAME=A
- /PARAMETER_VALUE=TAG1
- ;
- Set_Pipeline_Parameter
- /PARAMETER_NAME=B
- /PARAMETER_VALUE=TAG2
- ;
- Select_Active_File
- /FILE_NAME=ALL_FILES
- /QUERY= ::A&::AMP&::B
- ;
This would result in Visual3D interpreting the query
- /QUERY=TAG1 & TAG2
For more: Examples of Using the AMP Operator
Colon
COLON = :
SEMICOLON
Semicolon = ;
PLUS
Plus = +
FSLASH
FSlash = /
NAN
NAN is a reserved string used to designate "Not a Number".
Visual3D commands refer to NO_DATA or DATA_NOT_FOUND as NAN
- For example, the expression 1/0 results in NAN
isNAN
isNAN(expression) tests values against NAN - If the number is NAN the result is 1, otherwise the result is 0
- [Set_Pipeline_Parameter_From_Expression]
- /PARAMETER_NAME= NAN_TEST
- /EXPRESSION=ISNAN(1/0)
- /AS_INTEGER=TRUE
- ;
- ::NAN_TEST = 1
- [Set_Pipeline_Parameter_From_Expression]
- /PARAMETER_NAME= NAN_TEST
- /EXPRESSION=ISNAN(-999999.000000)
- /AS_INTEGER=TRUE
- ;
- ::NAN_TEST = 1
Returns "1" because -999999 is equal to Data Not Found in Visual3D.
- [Set_Pipeline_Parameter_From_Expression]
- /PARAMETER_NAME= NAN_TEST
- /EXPRESSION=ISNAN(15)
- /AS_INTEGER=TRUE
- ;
- ::NAN_TEST = 0
Example: Set negative values to NO_DATA
If the z-component of the LELB signal is below 0 set the frame to NO_DATA
- Evaluate_Expression
- /EXPRESSION=(TARGET::ORIGINAL::LELB::Z>0)/(TARGET::ORIGINAL::LELB::Z>0)*TARGET::ORIGINAL::LELB
- /RESULT_NAME=LELB
- /RESULT_TYPE=TARGET
- /RESULT_FOLDER=PROCESSED
- ;