Standard Syntax
- Last UpdatedNov 13, 2025
- 2 minute read
Attribute values can be set in two ways:
-
By assigning a value via a Programmable Macro Language (PML) variable, for example: !!CE.XLEN = 99
Note: There must be a space between the ‘=’ and a digit. "!!CE.XLEN =99" would not be valid.
-
Use the attribute name to assign a value to the Current Element (CE), for example, XLEN 99
The following general rules must be followed:
-
The value assigned must be the correct type for the attribute type (see examples below)
-
PML variables can not be directly used if using method (2). The PML variable must be expanded using the late evaluation syntax (that is, ‘XLEN !A’ is invalid but ‘XLEN $!A’ is OK. This also applies to any PML variables within expressions).
The behavior for each attribute type is described below:
REAL attribute - allows an int, real or real expression
!A = 1000
!!CE.XLEN= !A
!!CE.XLEN= (99.9 + !A )
XLEN $!A
XLEN (99.9 + $!A )
XLEN (99 + XLEN OF PREV BOX )
INTEGER attribute - allows an int, a real or real expression. The result will be rounded to the nearest integer.
!!CE.AREA = 99.6
Q AREA – will now return 100
TEXT attribute - allows a text value, a text expression, or UNSET. Assigning UNSET will result in a zero length string.
!A = ‘Some text ‘
!!CE.DESC = ‘My description’
!!CE.DESC = (!A + ‘extra text’)
DESC UNSET
LOGICAL attribute - allows FALSE, TRUE or logical expression.
SHOP TRUE
!A = 99
!B = 100
!!CE.SHOP ( !A GT !B)
SHOP ( $!A GT $!B)
REF attribute - allows a name, refno, ID expression, or UNSET, NULREF keywords. The UNSET and NULREF keywords both result in a null reference (=0/0) being assigned.
CREF =123/456
CREF /MYBRAN
CREF UNSET
CREF NULREF
!!CE.CREF (FIRST MEMBER OF /PIPE1 )
Note: There must be a space between the name and the ‘)’
WORD attribute - If assigning to a PML variable, then allows a text value or text expression.
!A = ‘FLG’
!!CE.TCON = !A + ‘D’
If assigning via the attribute name, then it must be a word.
TCON FLGD
POSITION attribute - allows a position or position expression.
HPOS N 100 U 100
!!CE.POS = (N 100 from /MYEQUIP )
AT N 100 from /MYEQUIP
Notes: The POS attribute can not be set by name, use AT syntax instead.
Do not use brackets if setting by attribute name.
DIRECTION attribute - Allows a direction or direction expression
HDIR N 45 U
HDIR TOWARDS /MYEQUIP
!!CE.HDIR = (TOWARDS /MYEQUIP )
Note: Do not use brackets if setting by attribute name.
ORIENTATION attribute - Allows an orientation or an orientation expression
ORI N IS U
!!CE.ORI = (N IS E WRT /VESS1 )
Note: Do not use brackets if setting by attribute name.
The value being assigned to an attribute must either be dimensionally equivalent to the attribute, or else a numerical value (which is taken to be in current working units of the dimension). If there is a clash of physical quantity an error will occur. The following will all generate errors.
XLEN 5kg
!!CE.XLEN = 5kg
XLEN $!W where !W has been set to 5kg