Local Coordinate System Syntax
- Last UpdatedJul 25, 2025
- 2 minute read
The Local Coordinate System (LCS) is used in CIE operations to change the current coordinate system between world and local coordinates, allowing you to create and modify objects in the local U, V, W space.
LCS can be accessed and set from PML and used in PML MOVE/ROTATE/QUERY commands.
LCS in PML
LCS is a PMLNet callable object which can be accessed as follows:
IMPORT 'AVEVA.CORE3D.INTERACTION.GENERIC'
HANDLE (1000, 0)
ENDHANDLE
USING NAMESPACE 'AVEVA.CORE3D.INTERACTION.GENERIC.TOOLS.LCS'
!LCS = OBJECT PMLLCSHELPER()
Once created, you can set the LCS to the current element. For example:
!LCS.LCS(!E1301)
You can query the position or orientation as follows:
Q VAR !LCS.POSITION()
Q VAR !LCS.ORIENTATION()
Query the Position wrt LCS
You can query the position wrt another database element with the LCS for the current element, !!CE, as follows:
!POSWRTLCS = POS WRT LCS
MOVE wrt LCS
The PML syntax to move the current element, !!CE, wrt the coordinate system of another element is:
MOVE BY E 1000 WRT /TESTGRID
where /TESTGRID is an element that may have a different orientation to the world.
The result is that the CE is moved in the East direction by 1000mm with respect to /TESTGRID orientation. The result is the same translation as the CIE move operation in the U direction, where LCS = /TESTGRID. It can be achieved using PML syntax. For example:
MOVE BY E 1000 WRT LCS
ROTATE WRT LCS
ROTATE wrt LCS
Rotate PML syntax can be used as follows:
ROTATE BY 90 ABOUT E WRT LCS
POSITION and DIRECTION Objects
You can create a position object wrt another element using the LCS as follows:
!POSWRTLCS = E0 N0 U0 WRT LCS
which would result in the same position with
!LCS.LCS(!E1301)
and
!POSWRTEQU = E0 N0 U0 WRT /E1301
Plines and Ppoints
Plines and Ppoints can be queried as follows:
VAR !POSWRTLCSPOS PPLINE NA WRT LCS
VAR !POSWRTLCS PPOINT 1 WRT LCS
Expressions and Queries
LCS can be used in PML 1 expressions as follows:
VAR !POSWRTLCS ( HDIR OF /100-B-1-B1 WRT LCS EQ E 45 N )
or PML 1 queries as follows:
VAR !POSWRTLCS HPOS WRT LCS
or
VAR !DIRWRTLCS DIR HDIR WRT LCS
or evaluated as follows:
VAR !POSWRTLCS EVAL ( S 100 UP 200 WRT LCS ) FOR CE
or given a position, for example:
!HPOS = ( HPOS WRT /* )
it can be used in an expression as follows:
VAR !RESULT = !HPOS.WRTLCS().EAST.EQ(!HPOS.WRT(!E1301).EAST))
or given a direction, for example:
!HDIR = ( HDIR WRT /* )
it can be used in an expression as follows:
VAR !RESULT = !HDIR.WRTLCS().EQ(!HDIR.WRT(!E1301))
OFFSET using PML 2
PML 2 can be used to move elements using the OFFSET method on POSITION, for example. Given the position of an element:
!POS = POS
we can offset the element by 1000mm in the X direction of the current LCS as follows:
!POSWRTLCS = !POS.OFFSET(!LCS.ORIENTATION().XDIR(), 1000)