Database Management
Reference Manual
Expressions
:
Positions, Directions and Orientations in Expressions
: 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.
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.
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.
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.
Note:
The CONSTRUCT syntax uses the world as the default axis.
Example
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
The result of
Q (N 100 WRT /BOX1)
, will depend on the current element.
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.
WRT can be further qualified by FROM.
1974 to current year.
AVEVA Solutions Limited and its subsidiaries. All rights reserved.