Model Reference Manual
General Commands
:
Setting Working Units and Tolerances
: Setting Working Units
Setting Working Units
Description:
The user can choose to work with units for nominal bores and dimensions other than those specified in the Catalogue. The AVEVA E3D™ default is to work in millimetres for nominal bores and distances. However, the Catalogue can contain company-specific instructions that alter the defaults; say, feet and inches. After the units setting is changed, all input and output will take place in the new units unless specifically stated.
Examples:
MM BORE
All bores will be input and output in mm
FINCH DIS
All distances and coordinates will be input and output in feet and inches
MM DISTance, MM BORE
INch DISTance, INch BORE
FInch DISTance, FInch BORE
These commands set current working units of BORE and DISTANCE physical quantities to INCH, MM or FINCH units.
UNITS DEF/AULT
Uses the default Catalogue database units
UNITS "any standard unit"
UNITS "any unit qualified value"
"optionally the unit's physical dimension"
"optionally the unit's physical dimension"
This sets the current working units of the relevant physical quantity. The standard unit can be any units abbreviation, or any form of its long name or description. The first match will be taken so users must beware ambiguities as in (for example) deg for degree and degC or m for metre and millimetre.
For example:
UNITS pound
UNITS lb mass
UNITS litre
UNITS kg
These are not acceptable:
UNITS cm3
UNITS MegaPascal
UNITS lb/ft3
Any unit qualified value may be supplied, the value given is irrelevant to the command since it is the unit that is important. However the number has to be supplied to avoid potential command ambiguity in the syntax.
The unit can be a standard unit, a compound unit or a single SI prefixed unit.
Note:
Some SI prefixed units are standard units such as mm and kg, refer to
Standard Units
for more information.
UNITS 1centimetre3
UNITS 1LB/FT3 (density)
UNITS 1MegaPascal
These are also acceptable:
UNITS 1kg
UNITS 1pound
Note:
3 feet 6 inches must be input as 3’6 when using FINCH units.
UNITS DERived Dimension
This sets the current working units for the nominated dimension to be derived for some physical quantities. The working units will be derived from the current working units of the component dimensions. For example derived area units will be the square of the current distance units. The derived density units will be the current mass units per cubic current distance units.
UNITS NUMeric Dimension
This sets the current working units for the nominated dimension to be numeric. No unit qualifiers will be output and all values input will be assumed to be in database units so no unit version will take place. This allows user applications to circumnavigate automatic unit conversions and to store input values into attributes (as happened for many attributes prior to 12.1).
UNITS DEFault
This resets all the current working units to the default units set on start of the session, and are those configured in the database (UNIT object in the first catalogue database).
UNITS SUSpend
This suspends all current working units and the system will exclusively operate using database units for all physical quantities. This command is recursive and a stack of suspends are maintained.
UNITS UNSUSpend
This unsuspends all current working units by one level. It may reinstate the last defined current working units for all physical quantities IF the suspend stack is exhausted.
UNITS REINstate
This unsuspends all current working units by all levels. It will reinstate the last defined current working units for all physical quantities.
Note:
If these have been changed whilst under suspension it is the updated ones that will be reinstated, not those at the time of suspension.
Command Syntax:
>--+-- MILlimetre --.
| |
|-- MM ----------|
| |
|-- INch --------|
| |
‘-- FInch -------+-- BOres ------.
| |
‘-- DIstances --+-->
>- UNITS -+-- any standard unit -.
| - any compound unit -+-compatible dimension -|
| |-----------------------+->
|
|
|-- NUMeric -.
|-- DERived --+-compatible dimension--|->
|
|-- DEFault ----.
| |
|-- SUSpend ----|
| |
|-- UNSUSpend --|
| |
‘-- REINstate --+-->
PML Syntax
Current units can also be set using PML core measure and unit objects
!dim = object measure('mass')
!dim.default()
- sets working units back to initial default units
!dim.suspend()
- suspends dimension by one level (additively to current level)
!dim.unsuspend()
- unsuspends by one level - again incrementally
!dim.reinstate()
- completely unsuspends back to using working units
!dim.setunits(UNIT)
- sets current/working units of dim to UNIT
Querying:
Q UNIts
This deprecated and only reports distance and bore working units, and only if the units are MM or INCH or FINCH. Any other distance units are reported as mm if metric or inch if imperial with an additional comment as to what the units actually are. This is to maintain upwards compatibility of users applications
Q DISPLAY
Gives tolerance and level settings, as well as unit settings.
Using PML Measure Object
The recommended way to query units and all aspects of them is to use features of the core MEASURE object. Some useful queries are:
!dim = object measure('mass')
!dim.currentunits()
- returns unit object of working units of the dimension
!dim.unitqualifier()
- returns string of working units qualifier (e.g. 'kg')
!dim.dbunit()
- returns database unit of the dimension
!dim.suspendlevel()
- returns suspend level of the dimension (0 if not suspended)
!dim.currentunits().isimperial()
- true if imperial unit
!dim.currentunits().ismetric()
- true if metric unit (some units can be both)
!dim.currentunits().isstandard()
- true if standard unit, false if compound unit
1974 to current year.
AVEVA Solutions Limited and its subsidiaries. All rights reserved.