Software Customisation
Reference Manual
Summary of Objects, Members and Methods
:
Object Type Details
: UNIT Object
UNIT Object
Member
Name
Result
Purpose
Constructors
Unit()
Unit(REAL)
UNIT
Creates a UNIT of which the value of REAL is a (valid) enum value, or is a negative (compound) unit.
Unit(STRING)
UNIT
Creates a UNIT with String equivalent to (in order) Description, Name, ComponentName, or Hashcode.
Methods
Name
Result
Purpose
Name String Methods
Description()
String()
STRING
Long description of unit, very often same as Name()
Name()
STRING
Unit name used as qualifier for solitary units
ShortName()
STRING
Short name used as qualifier for component units. Very often same as Name()
Hashcode()
Ptype()
STRING
Hash code of unit. If a compound unit returns 'COMPOUND', if derived from component standard units (e.g. Area units are Distance squared) returns 'DRVD'.
General Queries
Enum()
REAL
Unique integer ID for this unit. Positive if standard unit.
Negative if compound unit.
Factor()
REAL
Conversion factor to database units.
UnitQualifier()
STRING
Unit qualifier of current units.
Dimension()
MEASURE
Dimension of unit.
IsStandard()
BOOLEAN
TRUE if a standard, single, unit.
FALSE if a compound unit (e.g. kg/m3, m2)
IsNull()
BOOLEAN
TRUE if units are NONE.
AllDimensions()
ARRAY of MEASURES
Set of all standard dimensions.
AllUnits()
ARRAY of UNITS
Set of all named, standard Units.
IsImperial()
BOOLEAN
TRUE if an exclusively imperial unit (e.g. inch, lb) or a non specific unit (e.g. second, ohm, degree).
IsMetric()
BOOLEAN
TRUE if an exclusively metric unit (e.g. mm, kg) or a non specific unit used in metric situations.
Note:
Derived units (which are units derived from current units of component dimensions such as area units derived from current distance) and numeric units (no conversion or unit qualifiers) have empty strings for name, description and qualifier. However their hash codes are DRVD and NUMB so they can be created using a form as object unit ('DRVD'). Current units can be set to this using measure.setUnits. Additionally numeric current units can be set using measure.numeric().
1974 to current year.
AVEVA Solutions Limited and its subsidiaries. All rights reserved.