Determines the type of unit for a data set.
Syntax
UnitType(DataSet)
The syntax of the UnitType function consists of the following parts:
Part |
Description |
|---|---|
DataSet |
The data set whose unit is determined. All data structures are allowed. All data types are permitted. |
Remarks
The result is a 32-bit integer that represents the unit type. You can determine the unit type of individual components for signals, space curves and signal series.
If the argument is a list, then the function is executed for each element of the list and the result is also a list.
The function returns one of the following values:
Constant |
Meaning |
|---|---|
UNIT_NONE |
No unit. |
UNIT_UNKNOWN_DIM |
Unit with an unknown dimension. |
UNIT_KNOWN_DIM |
Unit with a known SI dimension. |
UNIT_DIM_ONE |
Unit with the dimension of one (also known as a dimensionless unit). |
Available in
FlexPro Basic, Professional, Developer Suite
Examples
UnitType(1.23) |
Results in UNIT_NONE. |
UnitType(Unit<> 1 s) |
Results in UNIT_NONE. |
UnitType(1 m/m) |
Results in UNIT_DIM_ONE. |
UnitType(1 '') |
Results in UNIT_DIM_ONE. |
UnitType(Unit<> 1 m/m) |
Results in UNIT_NONE. |
UnitType(1 N m) |
Results in UNIT_KNOWN_DIM. |
UnitType(1 gal) |
Results in UNIT_UNKOWN_DIM. |
UnitType(Signal.y) |
Results in UNIT_KNOWN_DIM. |
UnitType(Signal) |
Results in UNIT_NONE. |