The Attribute instance can then be used for querying the ‘meta data’, that means, data about data. The methods of the class allow the following to be queried.
String Type()
Attribute type
String Name()
Attribute name
String Description()
Attribute description
Int Hash()
Attribute hash value
int Length()
Attribute length
bool IsPseudo()
Whether pseudo or not
bool IsUda()
Whether a User defined Attributes (UDA) or not
string querytext()
As output at the command line when querying attribute
string units
Either BORE, DISTANCE or NONE
Returns the unit field of the attribute which is the string of the hash code of the dimension of the attribute (BORE, DIST, MASS, ANGL, or for numbers of no physical quantity NONE). For UDAs it is the value of the UDA Type (UTYP) attribute.
bool Noclaim()
Whether attribute can be changed without doing a claim
ElementType array
ElementTypes
List of Elements for which the attribute is valid. This only works for UDAs
Real array limits
Min/Max values for real/int types
String array
ValidValues(ElementType)
List of valid for text attributes. The list may vary with element type
string DefaultValue
(ElementType)
Attribute default. This only works for UDAs
string Category()
Determines the grouping of attributes on the ‘Attribute Utility’ form
bool hyperlink()
if true then the attribute value refers to an external file
bool connection()
if true then the attribute value will appear on the reference list form
bool hidden()
If true then attribute will not appear on the Attribute utility form or after ‘Q ATT’
bool protected()
if true then attribute is not visible if a protected Databases (DB).
String Type()
Attribute type
String Name()
Attribute name
String Description()
Attribute description
Int Hash()
Attribute hash value
int Length()
Attribute length
bool IsPseudo()
Whether pseudo or not
bool IsUda()
Whether a User defined Attributes (UDA) or not
string querytext()
As output at the command line when querying attribute
string units
Either BORE, DISTANCE or NONE
Returns the unit field of the attribute which is the string of the hash code of the dimension of the attribute (BORE, DIST, MASS, ANGL, or for numbers of no physical quantity NONE). For UDAs it is the value of the UDA Type (UTYP) attribute.
bool Noclaim()
Whether attribute can be changed without doing a claim
ElementType array
ElementTypes
List of Elements for which the attribute is valid. This only works for UDAs
Real array limits
Min/Max values for real/int types
String array
ValidValues(ElementType)
List of valid for text attributes. The list may vary with element type
string DefaultValue
(ElementType)
Attribute default. This only works for UDAs
string Category()
Determines the grouping of attributes on the ‘Attribute Utility’ form
bool hyperlink()
if true then the attribute value refers to an external file
bool connection()
if true then the attribute value will appear on the reference list form
bool hidden()
If true then attribute will not appear on the Attribute utility form or after ‘Q ATT’
bool protected()
if true then attribute is not visible if a protected Databases (DB).
String Type()
Attribute type
String Name()
Attribute name
String Description()
Attribute description
Int Hash()
Attribute hash value
int Length()
Attribute length
bool IsPseudo()
Whether pseudo or not
bool IsUda()
Whether a User defined Attributes (UDA) or not
string querytext()
As output at the command line when querying attribute
string units
Either BORE, DISTANCE or NONE
Returns the unit field of the attribute which is the string of the hash code of the dimension of the attribute (BORE, DIST, MASS, ANGL, or for numbers of no physical quantity NONE). For UDAs it is the value of the UDA Type (UTYP) attribute.
bool Noclaim()
Whether attribute can be changed without doing a claim
ElementType array
ElementTypes
List of Elements for which the attribute is valid. This only works for UDAs
Real array limits
Min/Max values for real/int types
String array
ValidValues(ElementType)
List of valid for text attributes. The list may vary with element type
string DefaultValue
(ElementType)
Attribute default. This only works for UDAs
string Category()
Determines the grouping of attributes on the ‘Attribute Utility’ form
bool hyperlink()
if true then the attribute value refers to an external file
bool connection()
if true then the attribute value will appear on the reference list form
bool hidden()
If true then attribute will not appear on the Attribute utility form or after ‘Q ATT’
bool protected()
if true then attribute is not visible if a protected Databases (DB).
Note:
We do yet not support direct usage of this class in other syntax.

String Type()
String Name()
String Description()
Int Hash()
int Length()
bool IsPseudo()
bool IsUda()
string querytext()
string units
bool Noclaim()
ElementType array
ElementTypes
Real array limits
String array
ValidValues(ElementType)
string DefaultValue
(ElementType)
string Category()
bool hyperlink()
bool connection()
bool hidden()
bool protected()
Note
:


Information is provided on creating element type classes using PML, on the methods and on the related pseudo attributes.


An ElementType instance may be created for a system Element type or a User Defined Element Type (UDET).
The ElementType instance can then be used for querying the ‘meta data’. which means,. data about data. The methods of the class allow the following to be queried.


The available methods are:
string Name()
Name of element type
string Description()
Description of element type
int Hash()
Hash value
bool IsUdet()
Whether a User Defined Element Type (UDET) or not
Attribute array
systemAttributes()
List of system attributes (excludes User defined Attributes (UDAs))
string array DbType()s
List of valid Database (DB) types
string ChangeType()
Indicates if an element of this type may have it’s type changed
ElementType SystemType()
for UDETs this is the base type
ElementType array
UDETs derived from this type
bool Primary()
Whether the element is primary or not
ElementType array
MemberTypes()
Valid members, including UDETs
ElementType array
ParentTypes()
Valid parents, including UDETs
string Name()
Name of element type
string Description()
Description of element type
int Hash()
Hash value
bool IsUdet()
Whether a User Defined Element Type (UDET) or not
Attribute array
systemAttributes()
List of system attributes (excludes User defined Attributes (UDAs))
string array DbType()s
List of valid Database (DB) types
string ChangeType()
Indicates if an element of this type may have it’s type changed
ElementType SystemType()
for UDETs this is the base type
ElementType array
UDETs derived from this type
bool Primary()
Whether the element is primary or not
ElementType array
MemberTypes()
Valid members, including UDETs
ElementType array
ParentTypes()
Valid parents, including UDETs
string Name()
Name of element type
string Description()
Description of element type
int Hash()
Hash value
bool IsUdet()
Whether a User Defined Element Type (UDET) or not
Attribute array
systemAttributes()
List of system attributes (excludes User defined Attributes (UDAs))
string array DbType()s
List of valid Database (DB) types
string ChangeType()
Indicates if an element of this type may have it’s type changed
ElementType SystemType()
for UDETs this is the base type
ElementType array
UDETs derived from this type
bool Primary()
Whether the element is primary or not
ElementType array
MemberTypes()
Valid members, including UDETs
ElementType array
ParentTypes()
Valid parents, including UDETs
Note:
We do yet not support direct usage of this class in other syntax.

string Name()
string Description()
int Hash()
bool IsUdet()
Attribute array
systemAttributes()
string array DbType()s
string ChangeType()
ElementType SystemType()
ElementType array
bool Primary()
ElementType array
MemberTypes()
ElementType array
ParentTypes()
Note
:


There are a number of pseudo attributes that return values according to the element type, as follows:
HLIS
WORD(2000)

List of all possible types in owning hierarchy
LIST
WORD(2000)

List of all possible member types
LLIS
WORD(2000)

List of all possible types in member hierarchy
OLIS
WORD(2000)

List of all possible owner types
REPTXT
STRING

Reporter text used for element type

Attribute Name
Data Type
Qualifier
Description
HLIS
WORD(2000)
List of all possible types in owning hierarchy
LIST
WORD(2000)
List of all possible member types
LLIS
WORD(2000)
List of all possible types in member hierarchy
OLIS
WORD(2000)
List of all possible owner types
REPTXT
STRING
Reporter text used for element type


This chapter describes the commands to create, copy and modify database elements.


As well as accessing the current content of a Database (DB), you may also (if you have Read/Write access rights) modify a DB in any of the following ways:
Create a new element at an appropriate level of the DB hierarchy; refer to Create a New Element.
Delete an element from the DB hierarchy; refer to Delete an Element.
Reorganize the hierarchy, refer to Reorganize the DB Hierarchy:
by rearranging members of an element into a different list order.
by moving an element from one part of the hierarchy to another;
Define the attributes and offspring of a new element by copying the corresponding attribute, settings and member lists from another element; refer to Copy Attributes from One Element to Another.
Create a new element at an appropriate level of the DB hierarchy; refer to Create a New Element.
Create a new element at an appropriate level of the DB hierarchy; refer to Create a New Element.
Delete an element from the DB hierarchy; refer to Delete an Element.
Delete an element from the DB hierarchy; refer to Delete an Element.
Reorganize the hierarchy, refer to Reorganize the DB Hierarchy:
by rearranging members of an element into a different list order.
by moving an element from one part of the hierarchy to another;
Reorganize the hierarchy, refer to Reorganize the DB Hierarchy:
Define the attributes and offspring of a new element by copying the corresponding attribute, settings and member lists from another element; refer to Copy Attributes from One Element to Another.
Define the attributes and offspring of a new element by copying the corresponding attribute, settings and member lists from another element; refer to Copy Attributes from One Element to Another.

Create a New Element
Delete an Element
Reorganize the DB Hierarchy
Copy Attributes from One Element to Another
Create a New Element
Delete an Element
Reorganize the DB Hierarchy
Copy Attributes from One Element to Another


To create a new element within an existing Database (DB), you must first make sure that the Current Element (CE) is at a level within the hierarchy which can legally own the element to be created. For example, a Site can own a Zone, but it cannot own a Valve. To create a new Valve, you must be at Branch level. You must therefore navigate to the correct level by using one of the command options described in Database Navigation and Query Syntax.
You can then create a new element, set its attributes and, if required, create further elements as its members.
If you create an element without explicitly identifying its position in the Member List of the Current Element, the new element is inserted immediately after the Current List Position. To use this option, enter the command
NEW element_type element_name
(element_name is optional)
NEW element_type element_name
(element_name is optional)
For example, if the Current List Position is at member 4 (/VALV1) of the Member List.

The command
adds a new Tee at list position 5 (between /VALV1 and /ELBO2) and names it /TEE2. The Member List of /BRAN1 thus becomes

To insert the new Tee as the first or last component in the Member List, access the Branch Head or Tail, respectively, before giving the NEW TEE command.
To create a new element at a specified list position, identify a list position adjacent to the required position and state which side of it the newly-created element is to go. The command syntax is one of the following:
where element_name is again optional and where list_position may be specified in any of the ways described in Database Navigation and Query Syntax.
Consider the following examples. Starting from the configuration shown, any of these commands creates a new Tee between /ELBO3 (list position 7) and /FLAN2 (list position 8):
NEW TEE AFTER /ELBO3
Specify name or refno
NEW TEE BEFORE 8
Specify list position number
NEW TEE BEFORE FLAN 2
Specify member type and number (second Flange in the list)
NEW TEE AFTER LAST ELBO
Specify first or last member of a given type (last Elbow in the list)
NEW TEE AFTER NEXT 3
Specify position relative to Current List Position
NEW TEE BEFORE LAST FLAN
Specify first or last member of a given type
NEW TEE AFTER /ELBO3
Specify name or refno
NEW TEE BEFORE 8
Specify list position number
NEW TEE BEFORE FLAN 2
Specify member type and number (second Flange in the list)
NEW TEE AFTER LAST ELBO
Specify first or last member of a given type (last Elbow in the list)
NEW TEE AFTER NEXT 3
Specify position relative to Current List Position
NEW TEE BEFORE LAST FLAN
Specify first or last member of a given type
The new Tee, which is unnamed, becomes list member 7, /ELBO3 becomes list member 8, /FLAN2 becomes list member 9, and so on.
To create a new top level element in a specific database there is a DB keyword available in the syntax of the ‘NEW’ command as follows:
NEW element_type element_name DB database_name
where element_name is again optional and where the database_name is expressed as a fully qualified database name,for example, team/database.
The following command will create a new SITE named /MYSITE in the MYTEAM/MYDB database.
NEW element_type element_name
(element_name is optional)
NEW TEE AFTER /ELBO3
Specify name or refno
NEW TEE BEFORE 8
Specify list position number
NEW TEE BEFORE FLAN 2
Specify member type and number (second Flange in the list)
NEW TEE AFTER LAST ELBO
Specify first or last member of a given type (last Elbow in the list)
NEW TEE AFTER NEXT 3
Specify position relative to Current List Position
NEW TEE BEFORE LAST FLAN
Specify first or last member of a given type
NEW TEE /TEE2
NEW    element_type element_name BEFore list_position
NEW    element_type element_name AFTer list_position
NEW SITE /MYSITE DB MYTEAM/MYDB
Note:
The Q LIST query will tell you which element types you can create as members of the Current Element.

Database Navigation and Query Syntax
Database Navigation and Query Syntax
Database Navigation and Query Syntax
Note
:
NEW element_type element_name
Database Navigation and Query Syntax
NEW TEE AFTER /ELBO3
NEW TEE BEFORE 8
NEW TEE BEFORE FLAN 2
NEW TEE AFTER LAST ELBO
NEW TEE AFTER NEXT 3
NEW TEE BEFORE LAST FLAN
NEW
element_type element_name
DB
database_name
element_name
database_name
team/database


You can delete either the entire Current Element or some or all of its offspring. When you delete the Current Element, you also delete all of its offspring (that is, its members, their members, etc.) from the hierarchy. The command must therefore be used with care. When an element has been deleted, its Owner becomes the new Current Element.
As a safeguard against accidental deletion of parts of a DB, the deletion function operates only on the Current Element. As further safeguards, the DELETE command word must be entered in full and the command syntax requires that you confirm the generic type of the Current Element. Furthermore, access to the required element and its subsequent deletion must be specified in two separate command lines.
To delete the Current Element and all its offspring, enter
For example, to delete a Nozzle, make the Nozzle the Current Element and then enter
The Equipment which owned the Nozzle becomes the Current Element.
To delete a complete Zone, including all Equipment, Piping, Structures etc. owned by it, make the Zone the Current Element and then enter
The Site which owned the deleted Zone becomes the Current Element.
To delete only specified members of the Current Element, use one of the following forms of the command syntax:
DELETE element_type MEMbers
(deletes all members)
DELETE element_type MEMbers integer
(deletes one member)
DELETE element_type MEMbers integer TO integer
(deletes a range of members)
(deletes all members)
(deletes one member)
(deletes a range of members)
Consider the following examples, where the Current Element is /BRAN1 with the Member List illustrated in Figure 10-2:
DELETE BRAN MEMBERS
Deletes all components from the Branch, leaving only the Branch Head and Tail
DELETE BRAN MEMBER 6
Deletes only /TEE1
DELETE BRAN MEMBERS 5 TO 7
Deletes /ELBO2, /TEE1 and /ELBO3
Deletes all components from the Branch, leaving only the Branch Head and Tail
Deletes only /TEE1
Deletes /ELBO2, /TEE1 and /ELBO3

DELETE element_type MEMbers
(deletes all members)
DELETE element_type MEMbers integer
(deletes one member)
DELETE element_type MEMbers integer TO integer
(deletes a range of members)
DELETE BRAN MEMBERS
Deletes all components from the Branch, leaving only the Branch Head and Tail
DELETE BRAN MEMBER 6
Deletes only /TEE1
DELETE BRAN MEMBERS 5 TO 7
Deletes /ELBO2, /TEE1 and /ELBO3
DELETE NOZZ
DELETE ZONE

DELETE
DELETE element_type MEMbers
DELETE element_type MEMbers integer
DELETE element_type MEMbers integer TO integer
DELETE BRAN MEMBERS
DELETE BRAN MEMBER 6
DELETE BRAN MEMBERS 5 TO 7


You can reorganize the structure of the Database (DB) hierarchy, without elements being added to or removed from its contents, in either of two ways:
In both cases elements and their offspring are transferred to new positions in the hierarchy. In the first case the element's owner remains unchanged, while in the second case the element's owner changes.
To rearrange the Member List of the Current Element (CE), use one of the commands:
where element_id specifies an element which is to be moved (which must be a member of the Current Element) and where list_position may be specified in any of the ways described in Database Navigation and Query Syntax.
If list_position is omitted, the intended position is assumed to be immediately after the Current List Position.
For example, starting with the previous Member List:

The command
moves /ELBO3 to position 5, immediately following the Current List Position, giving the new Member List

Starting from either of the above configurations, the command
moves /ELBO3 to position 3, immediately before /ELBO1, thus

To insert an existing element into the Member List of the Current Element, when it is not already a member of that list, use one of the commands
where element_id specifies an element which is to be moved (which may be anywhere within the DB hierarchy as long as it is at an appropriate level) and where list_position may be specified in any of the ways described in Database Navigation and Query Syntax.
If list_position is omitted, the intended position is assumed to be immediately after the Current List Position.
For example, starting with the simple hierarchy

the command
moves /PIPE2 (and all its offspring) to the position immediately following the Current List Position. Ownership of /PIPE2 passes from /ZONE2 to /ZONE1, resulting in the new hierarchy

REOrder element_id
REOrder element_id  BEFore list_position
REOrder element_id  AFTer  list_position
REORDER /ELBO3
REORDER    /ELBO3   BEFORE   FIRST   ELBO
INCLude element_id
INCLude element_id  BEFore list_position
INCLude element_id  AFTer  list_position
INCLUDE /PIPE2
By rearranging the order of the Member List of a single element
By relocating an element to a different part of the hierarchy
By rearranging the order of the Member List of a single element
By rearranging the order of the Member List of a single element
By relocating an element to a different part of the hierarchy
By relocating an element to a different part of the hierarchy

Database Navigation and Query Syntax
Database Navigation and Query Syntax
Database Navigation and Query Syntax
Lude element_id
INCLude element_id  BEFore list_position
INCLude element_id  AFTer  list_position
Database Navigation and Query Syntax


Copy Attributes from One Element to Another

It is often convenient to create a new element as a copy of an existing element which has the same, or similar, attribute settings or members to those required. You do this in two stages:
When an element is 'cloned' in this way, all attributes are copied from the source element to the target element except NAME (which must be unique) and LOCK (which is always unlocked in the target element). Additionally, and this is what makes the facility so powerful, all offspring of the source element are copied as offspring of the target element.
You may specify automatic renaming of the Current Element and its offspring as part of the copying process. Without this the new elements will be unnamed, since AVEVA E3D Design does not permit two elements in the same Database (DB) hierarchy to have identical names. You may also choose to copy only the members (and their offspring) of the source element, leaving the attributes of the Current Element itself unchanged.
To copy a complete element and all of its offspring, after creating a new Current Element of an appropriate type, enter
where element_id identifies the source element to be copied.
For example, to create a new item of Equipment which is an exact replica of a previously-defined Equipment, you might use the command sequence (at Zone level)
This creates /EQUIPB as the Current Element and then turns it into an exact copy of /EQUIPA. All attributes and members of /EQUIPB now have the same settings as those of /EQUIPA, including its position, orientation etc., and so you will probably now want to move one of the Equipments to a different location.
To copy all offspring of an element, so that they create duplicate offspring for the Current Element, enter
The position, orientation, etc., of the Current Element now remain unchanged, but it acquires new members which are derived from the specified source element and which are correctly positioned relative to the Current Element.
To copy selected offspring of an element, so that they create duplicate offspring for the Current Element, enter
For example, the command sequence
creates a new Branch named /SIDEARM whose components replicate that part of the existing Branch /MAINLINE between the specified list positions. The attributes of the Branch /SIDEARM itself are unaffected by the COPY command, so that its position, orientation, etc. (as defined by its Head and Tail settings) remain unchanged by the addition of its new members.
To copy attributes from an identified element into the current element, type
This causes all attributes (except for references to elements in DESI databases and OWNER) to be copied to the current element. Or:
This is similar to the ATTRIBUTES option, except that as well as DESI references not being copied, neither are any position, direction, orientation or angle attributes.
In both cases, the Specification Reference (SPREF) and Catalog Reference (CATREF) are also not copied between elements of different types.
To copy elements alongside their original positions, type
This option causes a list of elements, defined by the selection criterion select, to be copied alongside their original positions in the database. So if the list includes a SCTN and a PNOD (for example) then each of these items would be copied so that the new SCTN shares the same owner as the old SCTN and the new PNOD shares the same owner as the old PNOD. As this option copies elements, rather than just attributes, other COPY options, such as RENAME, are valid.
To copy all or part of an element and rename the copies, append the command
to the corresponding COPY command line.
For example, the command
copies all attributes and offspring of /FRACT1/PIPE into the Current Element. Where /FRACT1 occurs as the name or part of the name, it is changed to /FRACT2 in the Current Element and its offspring. Thus the Current Element itself is now named /FRACT2/PIPE, and so on.
DACCOH
BOOL

True if DAC allows element hierarchy to be copied to another DB
DACCOP
BOOL

True if DAC allows element to be copied to another DB
DACCRE
BOOL
NOUN
True if DAC allows element to be created
DACDEL
BOOL

True if DAC allows element to be deleted
DACERR
STRING(120)
ATTR
Returns the DAC error
MODATT
BOOL
ATTR
True if attribute of element can be modified
MODDEL
BOOL
ATTR
True if element can be deleted

Attribute Name
Data Type
Qualifier
Description
DACCOH
BOOL
True if DAC allows element hierarchy to be copied to another DB
DACCOP
BOOL
True if DAC allows element to be copied to another DB
DACCRE
BOOL
NOUN
True if DAC allows element to be created
DACDEL
BOOL
True if DAC allows element to be deleted
DACERR
STRING(120)
ATTR
Returns the DAC error
MODATT
BOOL
ATTR
True if attribute of element can be modified
MODDEL
BOOL
ATTR
True if element can be deleted
COPY element_id
NEW EQUI /EQUIPB
COPY /EQUIPA
COPY MEMbers OF element_id
COPY MEMbers integer TO integer OF element_id
NEW BRAN /SIDEARM
COPY MEMBERS 12 TO 20 OF /MAINLINE
COPY ATTributes OF element_id
COPY LIKE element_id
COPY ADJ/ACENT select
... REName    old_name   new_name
COPY  /FRACT1/PIPE  RENAME  /FRACT1  /FRACT2
Note:
If the Current Element already has members, it is not possible to make it a copy of another element in this way.

Create a New Element
Create a New Element
Note
:


SAVEWORK saves the current Model changes without leaving Model. It is good practice to use this command on a regular basis during a long session to make sure maximum data security.
As well as a comment, an optional number n can be used to specify a particular database for the command. The number is the number of the database in the order output by the STATUS command (refer to Project). If no number is given, the SAVEWORK applies to the whole Multiple Database (MDB). An example of Savework syntax is SAVEWORK ‘comment’ 1.
GETWORK refreshes the view of all READ databases to pick up any changes that other users may have made since you first opened them. The optional n works in the same way as for SAVEWORK. You would normally only use GETWORK if you know of specific changes you wish to pick up and use. Please note that GETWORK slows up subsequent database access, as the information has to be re-read from disk. Therefore, you should use this command sparingly.

Project
n
Project
n


Each time you enter Model or save your design changes, a new session is created for each database changed. You can then query when specific items of design data were modified by reference to the corresponding session number(s). Sessions can be used by the System Administrator to backtrack changes to a given date or session if necessary.


You can add a comment for each session, which can help identify the work done in each session.
Lets you associate comment text with the current Model session. You can query this text later to help you identify a particular session in which modifications were made to elements and/or attribute settings. You can enter the session comment before you issue a SAVEWORK command, or as part of a SAVEWORK command for example SAVEWORK ‘MY COMMENTS’.
SESSION COMMENT ’Addition of upper platform’
where integer is the session number.
Each time you enter Model or save your design changes, a new session is created for each database changed. You can then query when specific items of design data were modified by reference to the corresponding session number(s). Sessions can be used by the System Administrator to backtrack changes to a given date or session if necessary.
Example
SESSION COMMENT ’Addition of upper platform’
>-- SESSION COMMENT -- text -->

Q SESSComment integer
Note:
Sessions 1 and 2 are created in ADMIN (when the MODEL DB and its World element, respectively, are created), so the first true session will be Session 3.
Example
SESSION COMMENT ’Addition of upper platform’

before
Note
:
Session 3
SESSION COMMENT ’Addition of upper platform’
text
integer
integer


Multiwrite Databases Claims and Extracts

If a Model or Draw Database (DB) has been created as a multiwrite database, several users can write to it simultaneously, although they cannot change the same element.
Multiwrite databases can either be Standard multiwrite databases, or Extract databases. In both types, an element must be claimed before it can be modified. Claiming an element prevents other users claiming (and modifying) the element; the element must be released before another user can change it.
Claiming can be either explicit, where you must use the CLAIM command before attempting to modify the element, or implicit, where the claim is made automatically when you try to modify the element. The claim mode is set when the DB is created. Refer to Administrator Command Reference Manual for further information.

multiwrite
Standard
Extract
claimed
released
explicit
implicit
Administrator Command Reference Manual
Administrator Command Reference Manual
.


In a Standard multiwrite database, you must claim an element before changing it. This is known as a user claim. If the claim mode is explicit (see below for details of how to check this), you must first claim each element that you want to modify using the CLAIM command. If the claim mode is implicit, the claim will be made automatically (although you can still give explicit CLAIM commands if you want to prevent other users claiming specific elements).
Only primary elements can be claimed, these are listed in the Data Model Reference Manual.
You can claim a specified element only, or a specified element plus all of the significant elements below it in the hierarchy. If the claimed element is not a significant element, the significant element above it in the hierarchy will be claimed.
An element must be unclaimed before another user can claim it and change it. User claims are always unclaimed when you change modules or leaves AVEVA E3D Design, and you can also unclaim elements at any time during an AVEVA E3D Design session using the UNCLAIM command.
CLAIM /ZoneA /EQUIP100 /PIPE-100-A

Claims named elements
CLAIM /ZoneA HIERARCHY

Claims named element and all of its owned hierarchy
CLAIM /ELBOW-33

Claims Branch which owns named component, since ELBO is not a significant element
UNCLAIM /PIPE-100 /PIPE-200

Unclaims named elements
UNCLAIM ALL
Unclaims all elements currently claimed
Examples
CLAIM /ZoneA /EQUIP100 /PIPE-100-A
Claims named elements
CLAIM /ZoneA HIERARCHY
Claims named element and all of its owned hierarchy
CLAIM /ELBOW-33
Claims Branch which owns named component, since ELBO is not a significant element
UNCLAIM /PIPE-100 /PIPE-200
Unclaims named elements
UNCLAIM ALL
Unclaims all elements currently claimed
                .---------------.
               /                |
>-- CLAIM ----*-- elementname --+-- HIERARCHY ---.
                                |                |
                                ‘----------------+-->
                 .---------------.
                /                |
>-- UNCLAIM ---*-- elementname --+-- HIERARCHY ---.
               |                 |                |
               ‘-- ALL ----------+----------------+-->

Data Model Reference Manual
user claim
primary
Data Model Reference Manual
unclaimed
CLAIM /ZoneA /EQUIP100 /PIPE-100-A
CLAIM /ZoneA HIERARCHY
CLAIM /ELBOW-33
UNCLAIM /PIPE-100 /PIPE-200
UNCLAIM ALL


Elements cannot be claimed if recent changes have been made to them by other users. You must issue a GETWORK command first.
Elements cannot be unclaimed if there are updates outstanding. You must issue a SAVEWORK command first.
You can insert/remove primary elements in a members list without claiming the owner. For example, you can add a Branch to a Pipe without claiming the Pipe. Thus two users can add different Branches to the same Pipe: any discrepancies will be resolved when a SAVEWORK is attempted.
Before an element can be deleted, that element and all of its sub-hierarchy must be claimed.
The following potential problems may not be revealed until you try to save changes:
Elements cannot be claimed if recent changes have been made to them by other users. You must issue a GETWORK command first.
Elements cannot be claimed if recent changes have been made to them by other users. You must issue a GETWORK command first.
Elements cannot be unclaimed if there are updates outstanding. You must issue a SAVEWORK command first.
Elements cannot be unclaimed if there are updates outstanding. You must issue a SAVEWORK command first.
You can insert/remove primary elements in a members list without claiming the owner. For example, you can add a Branch to a Pipe without claiming the Pipe. Thus two users can add different Branches to the same Pipe: any discrepancies will be resolved when a SAVEWORK is attempted.
You can insert/remove primary elements in a members list without claiming the owner. For example, you can add a Branch to a Pipe without claiming the Pipe. Thus two users can add different Branches to the same Pipe: any discrepancies will be resolved when a SAVEWORK is attempted.
Before an element can be deleted, that element and all of its sub-hierarchy must be claimed.
Before an element can be deleted, that element and all of its sub-hierarchy must be claimed.
The following potential problems may not be revealed until you try to save changes:
The following potential problems may not be revealed until you try to save changes:


Unlike standard multiwrite databases, extracts allow users to keep elements claimed when they exit from AVEVA E3D Design or change to another module. They can also be used, together with Data Access Control (DAC), to manage workflow. Refer to Administrator User Guide for more information.
An Extract is created from an existing Database. When an Extract is created, it will be empty, with pointers back to the owing or master database . Extracts can only be created from Multiwrite databases. An extract can be worked on by one User at the same time as another user is working on the master or another extract.
When a user works on the extract, an extract claim is made as well as a user claim.
If the claim mode is explicit, the extract claim will be made automatically when you make a user claim using the CLAIM command. You can also claim to the extract only using the EXTRACT CLAIM command.
If an element is claimed to an extract, only users with write access to the extract will be able to make a user claim and start work on the element:
When an extract user does a SAVEWORK, the changed data will be saved to the Extract. The unchanged data will still be read via pointers back to the master Database (DB). The changes made to the extract can be written back to the master, or dropped. Also, the extract can be refreshed with changes made to the master.
EXTRACT CLAIM /STRU1 /STRU2 /STRU3

Claims named elements to the extract
EXTRACT CLAIM /STRU1 /STRU2 /ZONE-A HIERARCHY

Claims the named elements, and all the elements in the hierarchy to the extract
The HIERARCHY keyword must be the last on the command line. It will attempt to claim to the extract all members of the elements listed in the command which are not already claimed to the extract.
EXTRACT FLUSH DB PIPE/PIPE ‘Description of flush’

Writes all changes to the database back to the owing extract. The Extract claim is maintained.
EXTRACT FLUSH /STRU1 /STRU2 /STRU3 ‘Flushing three  structures’

Writes the changes to the named elements back to the owing extract. The Extract claim is maintained.
EXTRACT ISSUE DB PIPE/PIPE ‘Issuing /pipe’

Writes all the changes to the database back to the owning extract and releases the extract claim
EXTRACT ISSUE /ZONE-A HIERARCHY ‘Issuing /zone’

Writes all the changes to the named element and all elements under it in the hierarchy back to the owning extract and releases the extract claim
EXTRACT ISSUE /STRU1 /STRU2 /STRU3 ‘Issuing three structures’

Writes the changes to the named elements back to the owning extract and releases the extract claim
EXTRACT RELEASE DB PIPE/PIPE

Releases the extract claim: this command can only be given to release changes that have already been flushed.
EXTRACT RELEASE /STRU1 /STRU2 /STRU3

Releases the extract claim: this command can only be given to release changes that have already been flushed.
EXTRACT RELEASE /ZONE-A HIERARCHY

Releases the extract claim to the named element and all: elements under it in the hierarchy.
EXTRACT DROP DB PIPE/PIPE ‘Dropping /Pipe’

Drops changes that have not been flushed or issued. Your claim must have been unclaimed before this command can be given.
EXTRACT REFRESH DB MYTEAMPIPING

This will refresh the extract MYTEAMPIPING with changes made on the parent extract,
The elements required can be specified by selection criteria, using a Programmable Macro Language (PML) expression. For example:
Examples
EXTRACT CLAIM /STRU1 /STRU2 /STRU3
Claims named elements to the extract
EXTRACT CLAIM /STRU1 /STRU2 /ZONE-A HIERARCHY
Claims the named elements, and all the elements in the hierarchy to the extract
The HIERARCHY keyword must be the last on the command line. It will attempt to claim to the extract all members of the elements listed in the command which are not already claimed to the extract.
EXTRACT FLUSH DB PIPE/PIPE ‘Description of flush’
Writes all changes to the database back to the owing extract. The Extract claim is maintained.
EXTRACT FLUSH /STRU1 /STRU2 /STRU3 ‘Flushing three  structures’
Writes the changes to the named elements back to the owing extract. The Extract claim is maintained.
EXTRACT ISSUE DB PIPE/PIPE ‘Issuing /pipe’
Writes all the changes to the database back to the owning extract and releases the extract claim
EXTRACT ISSUE /ZONE-A HIERARCHY ‘Issuing /zone’
Writes all the changes to the named element and all elements under it in the hierarchy back to the owning extract and releases the extract claim
EXTRACT ISSUE /STRU1 /STRU2 /STRU3 ‘Issuing three structures’
Writes the changes to the named elements back to the owning extract and releases the extract claim
EXTRACT RELEASE DB PIPE/PIPE
Releases the extract claim: this command can only be given to release changes that have already been flushed.
EXTRACT RELEASE /STRU1 /STRU2 /STRU3
Releases the extract claim: this command can only be given to release changes that have already been flushed.
EXTRACT RELEASE /ZONE-A HIERARCHY
Releases the extract claim to the named element and all: elements under it in the hierarchy.
EXTRACT DROP DB PIPE/PIPE ‘Dropping /Pipe’
Drops changes that have not been flushed or issued. Your claim must have been unclaimed before this command can be given.
EXTRACT REFRESH DB MYTEAMPIPING
This will refresh the extract MYTEAMPIPING with changes made on the parent extract,
EXTRACT CLAIM ALL STRU WHERE (:OWNER EQ 'USERA') HIERARCHY
>- EXTRACT -+- FLUSH ---------------.
            |                       |
            |- FLUSHWithoutrefresh -|
            |                       |
            |- RELEASE -------------|
            |                       |
            |- ISSUE ---------------|
            |                       |
            |- DROP ----------------|    .-------<-------.
            |                       |   /                |
            ‘- REFRESH -------------+--*-- elementname --+- HIERARCHY -.
                                    |                                  |
                                    |                                  |
                                    |                                  |
                                    ‘-- DB dbname ---------------------+->
If the databases are set up with implicit claim, when you modify the element, the element will be claimed both to the extract and then to you. If the element is already claimed to the extract, then the claim will only be made to you.
If the databases are set up with explicit claim, then you will need to use the CLAIM command before modifying the element.
Once you have made a user claim, no other users will be able to work on the elements claimed, as in a normal multiwrite database.
If you unclaim an element, it will remain claimed to the extract until the extract claim is released or issued.
If the databases are set up with implicit claim, when you modify the element, the element will be claimed both to the extract and then to you. If the element is already claimed to the extract, then the claim will only be made to you.
If the databases are set up with implicit claim, when you modify the element, the element will be claimed both to the extract and then to you. If the element is already claimed to the extract, then the claim will only be made to you.
If the databases are set up with explicit claim, then you will need to use the CLAIM command before modifying the element.
If the databases are set up with explicit claim, then you will need to use the CLAIM command before modifying the element.
Once you have made a user claim, no other users will be able to work on the elements claimed, as in a normal multiwrite database.
Once you have made a user claim, no other users will be able to work on the elements claimed, as in a normal multiwrite database.
If you unclaim an element, it will remain claimed to the extract until the extract claim is released or issued.
If you unclaim an element, it will remain claimed to the extract until the extract claim is released or issued.

Administrator User Guide
master
released
issued
EXTRACT CLAIM /STRU1 /STRU2 /STRU3
EXTRACT CLAIM /STRU1 /STRU2 /ZONE-A HIERARCHY
HIERARCHY
EXTRACT FLUSH DB PIPE/PIPE ‘Description of flush’
EXTRACT FLUSH /STRU1 /STRU2 /STRU3 ‘Flushing three  structures’
EXTRACT ISSUE DB PIPE/PIPE ‘Issuing /pipe’
EXTRACT ISSUE /ZONE-A HIERARCHY ‘Issuing /zone’
EXTRACT ISSUE /STRU1 /STRU2 /STRU3 ‘Issuing three structures’
EXTRACT RELEASE DB PIPE/PIPE
EXTRACT RELEASE /STRU1 /STRU2 /STRU3
EXTRACT RELEASE /ZONE-A HIERARCHY
EXTRACT DROP DB PIPE/PIPE ‘Dropping /Pipe’
EXTRACT REFRESH DB MYTEAMPIPING


This section explains what different users will see as a result of Q CLAIMLIST commands.

For this example, take the case of a database PIPE/PIPE, accessed by USERA, with two extracts. Users USERX1 and USERX2 are working on the extracts.
USERA creates a Pipe and flushes the database back to the owning database, PIPE/PIPE. The results of various Q CLAIMLIST commands by the three Users, together with the extract control commands which they have to give to make the new data available, are shown in the the image.

When you create an element, AVEVA E3D Design only sees it as a user claim, not an extract claim, until the element is flushed. It will then be reported as an extract claim (as well as a user claim, if it has not been unclaimed).
Note that a change in the claim status of an existing element will be shown by the appropriate Q CLAIMLIST command as soon as appropriate updates take place, but a user will have to GETWORK as usual to see the changes to the Model model data.
We recommend that:
Q DBNAME
Returns the name of the database which you are actually writing to.
Q CLAIMLIST
Outputs a list of all elements currently claimed by yourself:
Q CLAIMLIST OTHE
Outputs a list of all elements currently claimed by other users who are accessing the same DB:
Q CLAIMLIST EXTRACT
Shows the extract claimlist for all the writable extracts in the MDB.
Q CLAIMLIST EXTRACT DB dbname
Shows the extract claimlist for the named extract DB.
Q CLAIMLIST EXTRACT FREE DB dbname
Shows the elements claimed to the current extract and not claimed to another extract or user. That is, the elements which can be released.
Q CLAIMLIST EXTRACT OTHER DB dbname
Shows the elements claimed to the current extract and claimed to another extract or user.
Q CLAIMLIST CONTROL DB dbname
Shows the extract claimlist for a CONTROLLED named extract DB.
Q DBAC
Queries the access mode of the database. DBAC can have the text settings CONTROL, UPDATE or MULTIWRITE.
Q DBCL
Queries the claim mode of the database. DBCL can have the text settings EXPLICIT or IMPLICIT.
Q LCLM
Queries whether or not the current element is claimed by another user. Returns TRUE or FALSE.
Q DBNAME
Returns the name of the database which you are actually writing to.
Q CLAIMLIST
Outputs a list of all elements currently claimed by yourself:
Q CLAIMLIST OTHE
Outputs a list of all elements currently claimed by other users who are accessing the same DB:
Q CLAIMLIST EXTRACT
Shows the extract claimlist for all the writable extracts in the MDB.
Q CLAIMLIST EXTRACT DB dbname
Shows the extract claimlist for the named extract DB.
Q CLAIMLIST EXTRACT FREE DB dbname
Shows the elements claimed to the current extract and not claimed to another extract or user. That is, the elements which can be released.
Q CLAIMLIST EXTRACT OTHER DB dbname
Shows the elements claimed to the current extract and claimed to another extract or user.
Q CLAIMLIST CONTROL DB dbname
Shows the extract claimlist for a CONTROLLED named extract DB.
Q DBAC
Queries the access mode of the database. DBAC can have the text settings CONTROL, UPDATE or MULTIWRITE.
Q DBCL
Queries the claim mode of the database. DBCL can have the text settings EXPLICIT or IMPLICIT.
Q LCLM
Queries whether or not the current element is claimed by another user. Returns TRUE or FALSE.
Q DBNAME
Returns the name of the database which you are actually writing to.
Q CLAIMLIST
Outputs a list of all elements currently claimed by yourself:
Q CLAIMLIST OTHE
Outputs a list of all elements currently claimed by other users who are accessing the same DB:
Q CLAIMLIST EXTRACT
Shows the extract claimlist for all the writable extracts in the MDB.
Q CLAIMLIST EXTRACT DB dbname
Shows the extract claimlist for the named extract DB.
Q CLAIMLIST EXTRACT FREE DB dbname
Shows the elements claimed to the current extract and not claimed to another extract or user. That is, the elements which can be released.
Q CLAIMLIST EXTRACT OTHER DB dbname
Shows the elements claimed to the current extract and claimed to another extract or user.
Q CLAIMLIST CONTROL DB dbname
Shows the extract claimlist for a CONTROLLED named extract DB.
Q DBAC
Queries the access mode of the database. DBAC can have the text settings CONTROL, UPDATE or MULTIWRITE.
Q DBCL
Queries the claim mode of the database. DBCL can have the text settings EXPLICIT or IMPLICIT.
Q LCLM
Queries whether or not the current element is claimed by another user. Returns TRUE or FALSE.
EXTRACT CLAIM ALL FROM !COLL
>-- Q CLAIMLIST --+- OTHER -----.
                  |             |
                  |- EXTRACT ---+- OTHER --.
                  |             |          |
                  |             |- FREE ---|
                  |             |          |
                  |             ‘----------|
                  |                        |
                  |------------------------+-- DB dbname --.
                  |                                        |
                  ‘----------------------------------------+-->
Before you make a user or extract claim, you should do an EXTRACT REFRESH and GETWORK.
If you need to claim many elements to an extract, it improves performance if the elements are claimed in a single command, for example, by using a collection:
EXTRACT CLAIM ALL FROM !COLL
Before you make a user or extract claim, you should do an EXTRACT REFRESH and GETWORK.
Before you make a user or extract claim, you should do an EXTRACT REFRESH and GETWORK.
If you need to claim many elements to an extract, it improves performance if the elements are claimed in a single command, for example, by using a collection:
EXTRACT CLAIM ALL FROM !COLL
If you need to claim many elements to an extract, it improves performance if the elements are claimed in a single command, for example, by using a collection:
Note:
Q CLAIMLIST EXTRACT
tells you what you can flush
Q CLAIMLIST OTHERS
tells you want you can't claim

Note
:
Q CLAIMLIST EXTRACT
Q CLAIMLIST OTHERS
Q DBNAME
Q CLAIMLIST
Q CLAIMLIST OTHE
Q CLAIMLIST EXTRACT
Q CLAIMLIST EXTRACT DB dbname
Q CLAIMLIST EXTRACT FREE DB dbname
Q CLAIMLIST EXTRACT OTHER DB dbname
Q CLAIMLIST CONTROL DB dbname
Q DBAC
Q DBCL
Q LCLM


Attribute Name
Data Type
Qualifier
Description
DACCLA
BOOL
True if DAC allows element to be claimed
DACERR
STRING(120)
ATTR
Returns the DAC error
DACISS
BOOL
True if DAC allows element to be issued
Attribute Name
Data Type
Qualifier
Description
DACCLA
BOOL

True if DAC allows element to be claimed
DACERR
STRING(120)
ATTR
Returns the DAC error
DACISS
BOOL

True if DAC allows element to be issued
CLMID
STRING(120)

Unique system ID of user claiming element
CLMNUM
INTEGER

User or extract number claiming element. Extract num\-bers are negative
CLMTIE
ELEMENT(4)

Reference to elements that are automatically claimed along with this element
EXCLFR
BOOL

True if element claimed from this extract. Only True for Primary elements
EXCLHI
ELEMENT(5000)

Primary elements in descendant hierarchy claimed to this extract (includes this element)
EXCLTO
BOOL

True if element claimed to this extract. Only True for Pri\-mary elements
EXNCLH
ELEMENT(5000)

Primary elements in descendant hierarchy not claimed to this extract
EXTRC
STRING(120)

Name of extract claiming element
NPDESC
ELEMENT(5000)

List of non primary offspring
OKCLA
BOOL

True if element may be claimed
OKCLH
BOOL

True if element and hierarchy may be claimed
OKREL
BOOL

True if element may be released
OKRLH
BOOL

True if element and hierarchy may be released
PRIMTY
BOOL

True if element is primary
PRMMEM
BOOL

True if there are any primary elements amongst descendants
PRMOWN
ELEMENT

Primary owning element (will be itself if primary)
USCLHI
ELEMENT(5000)

Elements in descendant hierarchy claimed to this user
USERC
STRING(120)

User name of user claiming element
USNCLH
ELEMENT(5000)

Elements in descendant hierarchy not claimed to this user
EXHCNC
ELEMENT(5000)

As EXTCNC, but repeat test for all descendants
EXHCNN
ELEMENT(5000)

As EXTCNN, but repeat test for all descendants
EXHCON
ELEMENT(5000)

As EXTCON, but repeat test for all descendants
EXHRCN
ELEMENT(5000)

As EXRCN, but repeat test for all descendants
EXHRCO
ELEMENT(5000)

As EXTRCO, but repeat test for all descendants
EXMOC
BOOL

As EXMOD but ignoring changes to "noclaim" attributes and member lists
EXPMOC
BOOL

As EXPMOD but ignoring changes to "noclaim" attributes and member lists
EXPMOD
BOOL

True if primary and element or non-primary descendants have been modified in this extract
EXTCNC
ELEMENT(5000)

As EXTCON but excluding non modified elements
EXTCNN
ELEMENT(5000)

As EXTCON but excluding modified elements
EXTCON
ELEMENT(5000)

Primary elements connected/disconnected from ele\-ment or non primary descendants in extract
EXTRCN
ELEMENT(5000)

As EXTCNN, but applied recursively to each connection
EXTRCO
ELEMENT(5000)

As EXTCON, but applied recursively to each connection
OKDROP
BOOL

True if element may be dropped
OKDRPH
ELEMENT(5000)

Primary elements preventing hierarchy drop
OKRLEH
ELEMENT(5000)

Primary elements preventing hierarchy release
OKRLEX
BOOL

True if element may be extract released

Attribute Name
Data Type
Qualifier
Description
DACCLA
BOOL
True if DAC allows element to be claimed
DACERR
STRING(120)
ATTR
Returns the DAC error
DACISS
BOOL
True if DAC allows element to be issued
Attribute Name
Data Type
Qualifier
Description
CLMID
STRING(120)
Unique system ID of user claiming element
CLMNUM
INTEGER
User or extract number claiming element. Extract num\-bers are negative
CLMTIE
ELEMENT(4)
Reference to elements that are automatically claimed along with this element
EXCLFR
BOOL
True if element claimed from this extract. Only True for Primary elements
EXCLHI
ELEMENT(5000)
Primary elements in descendant hierarchy claimed to this extract (includes this element)
EXCLTO
BOOL
True if element claimed to this extract. Only True for Pri\-mary elements
EXNCLH
ELEMENT(5000)
Primary elements in descendant hierarchy not claimed to this extract
EXTRC
STRING(120)
Name of extract claiming element
NPDESC
ELEMENT(5000)
List of non primary offspring
OKCLA
BOOL
True if element may be claimed
OKCLH
BOOL
True if element and hierarchy may be claimed
OKREL
BOOL
True if element may be released
OKRLH
BOOL
True if element and hierarchy may be released
PRIMTY
BOOL
True if element is primary
PRMMEM
BOOL
True if there are any primary elements amongst descendants
PRMOWN
ELEMENT
Primary owning element (will be itself if primary)
USCLHI
ELEMENT(5000)
Elements in descendant hierarchy claimed to this user
USERC
STRING(120)
User name of user claiming element
USNCLH
ELEMENT(5000)
Elements in descendant hierarchy not claimed to this user
Attribute Name
Data Type
Qualifier
Description
EXHCNC
ELEMENT(5000)
As EXTCNC, but repeat test for all descendants
EXHCNN
ELEMENT(5000)
As EXTCNN, but repeat test for all descendants
EXHCON
ELEMENT(5000)
As EXTCON, but repeat test for all descendants
EXHRCN
ELEMENT(5000)
As EXRCN, but repeat test for all descendants
EXHRCO
ELEMENT(5000)
As EXTRCO, but repeat test for all descendants
EXMOC
BOOL
As EXMOD but ignoring changes to "noclaim" attributes and member lists
EXPMOC
BOOL
As EXPMOD but ignoring changes to "noclaim" attributes and member lists
EXPMOD
BOOL
True if primary and element or non-primary descendants have been modified in this extract
EXTCNC
ELEMENT(5000)
As EXTCON but excluding non modified elements
EXTCNN
ELEMENT(5000)
As EXTCON but excluding modified elements
EXTCON
ELEMENT(5000)
Primary elements connected/disconnected from ele\-ment or non primary descendants in extract
EXTRCN
ELEMENT(5000)
As EXTCNN, but applied recursively to each connection
EXTRCO
ELEMENT(5000)
As EXTCON, but applied recursively to each connection
OKDROP
BOOL
True if element may be dropped
OKDRPH
ELEMENT(5000)
Primary elements preventing hierarchy drop
OKRLEH
ELEMENT(5000)
Primary elements preventing hierarchy release
OKRLEX
BOOL
True if element may be extract released


It is possible to undo and redo many operations. The undo mechanism is managed by AVEVA E3D Design using a stack of transaction objects.
Each transaction object records the change in the state across the transaction.
The new descriptions are then:
MARKDB ‘comment’ - Complete the current transaction and starts a new transaction.
UNDODB - Undo the last transaction. If there is a current transaction then this is completed. Multiple Undos are allowed.
REDODB - Redo to next mark. Multiple Redos are allowed. A redo is only valid after an UNDO. Any database change after an UNDO invalidates a REDO.


Every time you select an undo operation an entry is taken off the undo stack. The state saved in this transaction is restored, and the transaction object is placed on the redo stack.
When the undo stack is empty, then the Undo button and the Undo menu option will be greyed out indicating that there are no operations remaining that can be undone.
If the operation of undo involves moving into or out of model editing mode, then the switch into that mode will happen automatically, and the model editor button and menu option will reflect the change.
The selection set and handle appropriate to the editing operation that was being used will also be restored.
There are also a number of ways that you can perform an undo:
The undo stack is automatically cleared after a SAVEWORK or GETWORK.
A similar process to the one described above occurs for redo.
When a transaction is taken off the redo stack, it is put back onto the undo stack.
If you perform any operation that changes the database after doing an undo, then the redo stack will be cleared.
Refer to for controlling the undo stack from user defined Programmable Macro Language (PML).
MARKDB 'comment'
Set a Database mark. Multiple marks may be set.
UNDODB
Undo database to last mark. Multiple undos are allowed.
REDODB
Redo to next mark. Multiple Redos are allowed. A redo is only valid after an UNDO. Any database change after an UNDO invalidates a REDO.
MARKDB 'comment'
Set a Database mark. Multiple marks may be set.
UNDODB
Undo database to last mark. Multiple undos are allowed.
REDODB
Redo to next mark. Multiple Redos are allowed. A redo is only valid after an UNDO. Any database change after an UNDO invalidates a REDO.
The list of marks can be obtained from PML function MARKDB.
The system will always create an initial mark the first time the database is changed.
MARKDB 'comment'
Set a Database mark. Multiple marks may be set.
UNDODB
Undo database to last mark. Multiple undos are allowed.
REDODB
Redo to next mark. Multiple Redos are allowed. A redo is only valid after an UNDO. Any database change after an UNDO invalidates a REDO.
AREA 0
MARKDB 'First Mark'
AREA 100
MARKDB 'Second Mark'
AREA 200
MARKDB 'Third Mark'
AREA 300
!MARKS = MARKDB
Q VAR !MARKS
UNDODB
Q AREA - value will be 200
UNDODB
Q AREA - value will be 100
UNDODB
Q AREA - value will be 0
REDODB
Q AREA - value will be 100
REDODB
Q AREA - value will be 200
AREA 99
UNDODB
Q AREA - value will be 200
REDODB
Q AREA - value will be 99
By clicking on the Undo button on the appropriate toolbar.
By selecting the Undo option on the Edit pulldown menu on the main toolbar.
By entering the command UNDODB n where n indicates how many steps are to be undone.
By clicking on the Undo button on the appropriate toolbar.
By clicking on the Undo button on the appropriate toolbar.
By selecting the Undo option on the Edit pulldown menu on the main toolbar.
By selecting the Undo option on the Edit pulldown menu on the main toolbar.
By entering the command UNDODB n where n indicates how many steps are to be undone.
By entering the command UNDODB n where n indicates how many steps are to be undone.

Undo
Undo
Undo
Undo
Edit
UNDODB n
n

Example


Shared Collections (Groups) and Secondary Hierarchies

A shared collection can hold in its members list a number of design elements from any combination of hierarchic levels, they may also span Multiple Databases (MDBs). You can use any appropriate design operation to act upon all of these individual elements simply by carrying out the operation on the shared collection.
Shared collections are particularly useful when there is a need to create a secondary hierarchy of elements. For example a set of elements for a project may span more that one site, if this is the case it is difficulty to identify where in the hierarchy these elements occur. With a shared collection you can easily query its members and see the hierarchy of elements contained within it.
A shared collection is a Model database element in its own right, and is therefore stored automatically for use in later sessions when you save database changes.
The Elements which make up a shared collection within the Model database are shown below:

GPWL (Group World) Is a top level administrative element. A GPWL may hold multiple GPSET (Group Set) elements.
GPSET contains groups of items (GPITEM). A GPSET element has Name, DESC, and FUNCTION attributes.
GPITEM These are elements within a database which are to be grouped under a Group Set (GPSET). Elements from different databases can all be grouped into the same Group Set. A GPITEM has the following attributes Name, DESC and SITEM.
It is possible to nest Group Sets within other Group Sets. To achieve this structure a GPSET can own another GPSET or a GPITEM can point back onto a GPSET. The following figure illustrates this:

GPWL
GPSET
GPITEM


The contents of a shared collection are defined by adding or removing references to or from the list part of the shared collection.
In order to use the commands described in this section, the current element must be the shared collection whose member list you wish to modify. Specified elements are then added to the list part of the current element starting from the current list position or are removed from the list part of the current element such that the current list position becomes the Head position.
The elements to be added to, or removed from, the shared collection’s member list may be specified in any of the following ways:
GADD /ZONE1 /VALVE2

Adds /ZONE1 and /VALVE2 to the current shared collection, starting from the current list position
GREMOVE /ZONE1 /BOX3

Removes /ZONE1 and /BOX3 from the current shared collection and moves the current list position pointer to the Head position
GADD MEM OF /BRANCH1 /BRANCH2

Adds all the pipe Components in Branches /BRANCH1 and /BRANCH2 to the current shared collection, starting from the current list position
GREM MEM OF /PIPE100 MEM OF /EQUI-B

Removes all Branches of the Pipe /PIPE100 and all members of Equipment /EQUI-B from the current shared collection
GREM ITEMS OF /ZONE2

Removes from the current shared collection all occurrences of those offspring of /ZONE2 which are items
GADD ALL EQU BRAN OF /ZONE1 /ZONE2

Adds all offspring of /ZONE1 and /ZONE2 which are of types Equip or Branch to the current shared collection, starting from the current list position
Examples
GADD /ZONE1 /VALVE2
Adds /ZONE1 and /VALVE2 to the current shared collection, starting from the current list position
GREMOVE /ZONE1 /BOX3
Removes /ZONE1 and /BOX3 from the current shared collection and moves the current list position pointer to the Head position
GADD MEM OF /BRANCH1 /BRANCH2
Adds all the pipe Components in Branches /BRANCH1 and /BRANCH2 to the current shared collection, starting from the current list position
GREM MEM OF /PIPE100 MEM OF /EQUI-B
Removes all Branches of the Pipe /PIPE100 and all members of Equipment /EQUI-B from the current shared collection
GREM ITEMS OF /ZONE2
Removes from the current shared collection all occurrences of those offspring of /ZONE2 which are items
GADD ALL EQU BRAN OF /ZONE1 /ZONE2
Adds all offspring of /ZONE1 and /ZONE2 which are of types Equip or Branch to the current shared collection, starting from the current list position
>--+-- GADD -----.     .-------------.
   |             |    /              |
   ‘-- GREMove --+---*-- <selatt> ---+--->
Explicitly, by name or (system-assigned) reference number.
As members of specified elements, where a member of an element is defined as any element immediately below it in the DB hierarchy
As items of specified elements, where an item of an element is any element anywhere below it in the hierarchy which has no list part (such as a Valve, Point, Box, etc.)
By type (such as Equipment, Branch, Pipe, etc.)
Explicitly, by name or (system-assigned) reference number.
Explicitly, by name or (system-assigned) reference number.
As members of specified elements, where a member of an element is defined as any element immediately below it in the DB hierarchy
As members of specified elements, where a member of an element is defined as any element immediately below it in the DB hierarchy
As items of specified elements, where an item of an element is any element anywhere below it in the hierarchy which has no list part (such as a Valve, Point, Box, etc.)
As items of specified elements, where an item of an element is any element anywhere below it in the hierarchy which has no list part (such as a Valve, Point, Box, etc.)
By type (such as Equipment, Branch, Pipe, etc.)
By type (such as Equipment, Branch, Pipe, etc.)

or
member
immediately
item
no
GADD /ZONE1 /VALVE2
GREMOVE /ZONE1 /BOX3
GADD MEM OF /BRANCH1 /BRANCH2
GREM MEM OF /PIPE100 MEM OF /EQUI-B
GREM ITEMS OF /ZONE2
GADD ALL EQU BRAN OF /ZONE1 /ZONE2


The action of this command differs from normal behaviour if the current element is a shared collection.
DELETE GPSET

Only the current element and any Offspring that are GPSETs will be deleted.
DELETE GPWLD

Only the current element and any Offspring that are GPSETs will be deleted.

Examples
DELETE GPSET
Only the current element and any Offspring that are GPSETs will be deleted.
DELETE GPWLD
Only the current element and any Offspring that are GPSETs will be deleted.

DELETE GPSET
DELETE GPWLD


Shared collections can be copied with a slightly different effect to normal elements.
COPY /GROUP21 (At a Group)

The Current shared collection will contain exactly the same Members as /GROUP21. No new elements have been created.

Examples
COPY /GROUP21 (At a Group)
The Current shared collection will contain exactly the same Members as /GROUP21. No new elements have been created.

COPY /GROUP21 (At a Group)


You may specify a dynamic selection for a GPSET. The dynamic selection consists of a PML1 collection expression.
For example:
The selection must be set against the SCOSEL attribute.
For example:
The selection is evaluated dynamically whenever the shared collection is used. Depending on the selection used there is a performance overhead in evaluating the selection.
ALL PIPE WHERE (BORE GT 80)
ALL BRAN MEMBERS WHERE (SPREF EQ /MYSPEC ) for SITE /SITE1

SCOSEL ALL EQUI FROM CLAIMLIST

RE (BORE GT 80)
ALL BRAN MEMBERS WHERE (SPREF EQ /MYSPEC
.


This section explains the PML 1 expressions package. These facilities are needed within AVEVA products, for example, to define report templates in AVEVA E3D Design.
Expressions have types. For example, you can have numeric expressions, text expressions and logical expressions. All the elements in an expression must be of the correct type. For example, if you have a two numbers, x and y, and two text strings text1 and text2, the following expression is meaningless:
x + text1
$
x + text1
$
However, both of the following expressions are valid:
x + y
$ adds the values of the numeric variables.
Text1 + text2
$ concatenates the two text strings.
x + y
$ adds the values of the numeric variables.
Text1 + text2
$ concatenates the two text strings.
Real expressions also have a physical dimension. This may be NONE when all values in the expression are purely numerical, but if any value has a physical dimension (such as being a length or mass) then all other values must be compatible with it and the result of the expression may have a physical dimension, or it may evaluate to a pure numerical value (1inch / 1mm = 25.4).
The following types of expressions are available:
x + text1
$
x + y
$ adds the values of the numeric variables.
Text1 + text2
$ concatenates the two text strings.
Logical Expressions
Logical Array Expressions
Numeric (Real) Expressions
Numeric (Real) Functions
Text Expressions
Logical Expressions
Logical Expressions
Logical Array Expressions
Logical Array Expressions
Numeric (Real) Expressions
Numeric (Real) Expressions
Numeric (Real) Functions
Numeric (Real) Functions
Text Expressions
Text Expressions
Note:
Generally, all these facilities are compatible with PML 2.

Logical Expressions
Logical Array Expressions
Numeric (Real) Expressions
Numeric (Real) Functions
Text Expressions
Note
:
x + text1
x + y
Text1 + text2
Logical Expressions
Logical Array Expressions
Numeric (Real) Expressions
Numeric (Real) Functions
Text Expressions


The format of an expression, for example the use of brackets, spaces and quotes, is important. If you do not follow the rules given below you will get error messages:
Text must be enclosed in quotes.
There must be a space between each operator and operand. For example:
Use round brackets to control the order of evaluation of expressions and to enclose the argument of a function.
In general, you do not need spaces before or after brackets, except when an AVEVA E3D Design name is followed by a bracket. If there is no space, the bracket will be read as part of the name.
'This is text’
x + y
SIN(30)
(NAME EQ /VESS1 )


Operators are evaluated in the order of the following list: the ones at the top of the list are evaluated first.
BRACKETS
Brackets can be used to control the order in which operators are evaluated, in the same way as in normal arithmetic
FUNCTIONS

* /

+ -

EQ, NEQ, LT, LE, GE, GT

NOT

AND

OR

Operator
Comments
BRACKETS
Brackets can be used to control the order in which operators are evaluated, in the same way as in normal arithmetic
FUNCTIONS
* /
+ -
EQ, NEQ, LT, LE, GE, GT
NOT
AND
OR


Expressions can be nested using brackets.
( (SIN(!angleA) * 2)  /  SIN(!angleB) )

( (SIN(!angleA) * 2)  /  SIN(!angleB) )


Logical expressions can contain:
AVEVA E3D Design attributes of type logical e.g. BUILT.
Logical constants. The constants available are: TRUE, ON, YES for true, and FALSE, OFF, NO for false.
Logical operators.
Logical functions.
AVEVA E3D Design attributes of type logical e.g. BUILT.
AVEVA E3D Design attributes of type logical e.g. BUILT.
Logical constants. The constants available are: TRUE, ON, YES for true, and FALSE, OFF, NO for false.
Logical constants. The constants available are: TRUE, ON, YES for true, and FALSE, OFF, NO for false.
Logical operators.
Logical operators.
Logical functions.
Logical functions.


Logical expressions involving physical quantities.
If the expression contains unit qualified values, or attributes with a physical dimension then these values are converted to consistent units before comparison
If a value is not unit qualified it is assumed to be in current units of the quantity defined by the other value (i.e. the context of the expression). For example if current units of mass (colloquially weight) are oz then
But if current units of mass are kg then expression will return FALSE as 2lb is not equal to 2kg.
If the units are not units of the same physical quantity FALSE will always be returned as the two values are completely incompatible (as are apples and pears) and a warning issued (for example, (2lb equal 32mm).
The logical operators available are:
AND

EQ, NE
The operators EQ and NE may be applied to any pair of values of the same type.
GT, GE, LE, LT
The operators GE, LE, GT and LT may only be used with numbers and positions. For more information, see Positions, Directions and Orientations in Expressions.
NOT

OR

log1 AND log2
-> logical
Perform the logical AND between two logical values. Treats unset values as FALSE.
If one of the values is undefined and the other one is FALSE, the result is FALSE.
TRUE and FALSE -> FALSE
Compare two values. A special feature is used for the positions, only the coordinates specified are compared. Refer to Compare Positions for more information. Unset values result in FALSE across EQ, TRUE across NE.
If two positions have no common coordinate, for example, ’N 10 ne U 10’, the result is undefined. Units are consolidated across comparisons.
( 1.0 eq 2.0) -> FALSE
None.
( number1 GT number2 )
> logical
( pos1 GT pos2 )
> logical
( number1 GE number2 )
> logical
( pos1 GE pos2 )
> logical
( number1 LE number2 )
> logical
( pos1 LE pos2 )
> logical
( number1 LT number2 )
> logical
( pos1 LT pos2 )
> logical
Compare two values. A special feature is used for positions: only the coordinates specified are compared. See Compare Positions for more information. For positions, since comparisons may be performed on more than one value, LT (GT) is not the inverse of GE (LE). Unset values result in false
If two positions have no common coordinate, the result is undefined. For example, ’N 10 gt U 10’.
Units are consolidated across comparisons.
( 1.0 LT 2.0) -> TRUE
( N 0 E 10 GT N 10 E 0 ) -> FALSE
( N 0 E 10 GT N 10 E 0 ) -FALSE
None.
NOT log1
-> logical
Perform the logical NOT on a logical value.
None.
not TRUE -> FALSE
None.
OR log2
-> logical
Perform the logical inclusive OR between two logical values. (The exclusive OR is defined by using NE.)
Allows numbers instead of logical values.
If one of the values is undefined and the other one is TRUE, the result is TRUE.
TRUE or FALSE -> TRUE
None.

Operator
Comments
AND
EQ, NE
The operators EQ and NE may be applied to any pair of values of the same type.
GT, GE, LE, LT
The operators GE, LE, GT and LT may only be used with numbers and positions. For more information, see Positions, Directions and Orientations in Expressions.
NOT
OR
Synopsis
log1 AND log2
-> logical
Description
Perform the logical AND between two logical values. Treats unset values as FALSE.
Side Effects
If one of the values is undefined and the other one is FALSE, the result is FALSE.
Example
TRUE and FALSE -> FALSE
Synopsis
( number1 EQual number2)
-> logical
( text1 EQual text2 )
-> logical
( log1 EQual log2 )
-> logical
( id1 EQual id2 )
-> logical
( pos1 EQual pos2 )
-> logical
( dir1 EQual dir2 )
-> logical
( ori1 EQual ori2 )
-> logical
( pp1 EQual pp2 )
-> logical
( number1 NEqual number2 )
-> logical
( text1 NEqual text2 )
-> logical
( log1 NEqual log2 )
-> logical
( id1 NEqual id2 )
-> logical
( pos1 NEqual pos2 )
-> logical
( dir1 NEqual dir2 )
-> logical
( ori1 NEqual ori2 )
-> logical
( pp1 NEqual pp2 )
-> logical
Description
Compare two values. A special feature is used for the positions, only the coordinates specified are compared. Refer to Compare Positions for more information. Unset values result in FALSE across EQ, TRUE across NE.
Side Effects
If two positions have no common coordinate, for example, ’N 10 ne U 10’, the result is undefined. Units are consolidated across comparisons.
Example
( 1.0 eq 2.0) -> FALSE
Errors
None.
Synopsis
( number1 GT number2 )
> logical
( pos1 GT pos2 )
> logical
( number1 GE number2 )
> logical
( pos1 GE pos2 )
> logical
( number1 LE number2 )
> logical
( pos1 LE pos2 )
> logical
( number1 LT number2 )
> logical
( pos1 LT pos2 )
> logical
Description
Compare two values. A special feature is used for positions: only the coordinates specified are compared. See Compare Positions for more information. For positions, since comparisons may be performed on more than one value, LT (GT) is not the inverse of GE (LE). Unset values result in false
Side Effects
If two positions have no common coordinate, the result is undefined. For example, ’N 10 gt U 10’.
Units are consolidated across comparisons.
Example
( 1.0 LT 2.0) -> TRUE
( N 0 E 10 GT N 10 E 0 ) -> FALSE
( N 0 E 10 GT N 10 E 0 ) -FALSE
Errors
None.
Synopsis
NOT log1
-> logical
Description
Perform the logical NOT on a logical value.
Side Effects
None.
Example
not TRUE -> FALSE
Errors
None.
Synopsis
OR log2
-> logical
Description
Perform the logical inclusive OR between two logical values. (The exclusive OR is defined by using NE.)
Allows numbers instead of logical values.
Side Effects
If one of the values is undefined and the other one is TRUE, the result is TRUE.
Example
TRUE or FALSE -> TRUE
Errors
None.
( number1 EQual number2)
-> logical
( text1 EQual text2 )
-> logical
( log1 EQual log2 )
-> logical
( id1 EQual id2 )
-> logical
( pos1 EQual pos2 )
-> logical
( dir1 EQual dir2 )
-> logical
( ori1 EQual ori2 )
-> logical
( pp1 EQual pp2 )
-> logical
( number1 NEqual number2 )
-> logical
( text1 NEqual text2 )
-> logical
( log1 NEqual log2 )
-> logical
( id1 NEqual id2 )
-> logical
( pos1 NEqual pos2 )
-> logical
( dir1 NEqual dir2 )
-> logical
( ori1 NEqual ori2 )
-> logical
( pp1 NEqual pp2 )
-> logical
Note:
The operators EQ, NE, LT, GT, LE and GE are sometimes referred to as comparator or relational operators; NOT, AND and OR are sometimes referred to as Boolean operators. Refer to Precision of Comparisons for tolerances in comparing numbers.

Positions, Directions and Orientations in Expressions
Precision of Comparisons
Compare Positions
Compare Positions
Positions, Directions and Orientations in Expressions
Note
:
comparator
relational
Boolean
Precision of Comparisons
Synopsis
log1 AND log2
-> logical
Description
Side Effects
Example
TRUE and FALSE -> FALSE
EQ and NE
Synopsis
Description
Compare Positions
Side Effects
’N 10 ne U 10’
Example
( 1.0 eq 2.0) -> FALSE
Errors
Synopsis
( number1 GT number2 )
> logical
( pos1 GT pos2 )
> logical
( number1 GE number2 )
> logical
( pos1 GE pos2 )
> logical
( number1 LE number2 )
> logical
( pos1 LE pos2 )
> logical
( number1 LT number2 )
> logical
( pos1 LT pos2 )
> logical
Description
Compare Positions
Side Effects
’N 10 gt U 10
Example
( 1.0 LT 2.0) -> TRUE
( N 0 E 10 GT N 10 E 0 ) -> FALSE
( N 0 E 10 GT N 10 E 0 ) -FALSE
Errors
Synopsis
NOT log1
-> logical
Description
Side Effects
Example
not TRUE -> FALSE
Errors
Synopsis
OR log2
-> logical
Description
Side Effects
Example
TRUE or FALSE -> TRUE
Errors


The logical functions available are:
BADREF
DEFINED,UNDEFINED
CREATED
DELETED
EMPTY
IFTRUE
MATCHWILD
MODIFIED
UNSET
VLOGICAL
BADREF

DEFINED,UNDEFINED

CREATED

DELETED

EMPTY

IFTRUE

MATCHWILD

MODIFIED

UNSET

VLOGICAL

BADREF (id)
-> logical
TRUE if id is invalid, else FALSE.
None
BADREF(TREF) -> ’true’ if TREF=nulref
None.
DEFined (variable_name)
-> logical
DEFined (variable_name,number)
-> logical
UNDEFined (variable_name)
-> logical
UNDEFined (variable_name , number)
-> logical
With one argument, DEFINED is true only if the scalar variable, the array variable or the array variable element exists.
With two arguments, DEFINED is true only if the first argument is an array variable which has a value for the index denoted by the second argument.
UNDEFINED( !foo ) is equivalent to NOT DEFINED( !foo ).
None.
DEFINED ( !var ) -> TRUE
DEFINED ( !array ) -> TRUE
DEFINED ( !array[1] )) -> TRUE
DEFINED ( !array , 1 ) -> TRUE
DEFINED ( !var) -> FALSE
UNDEFINED ( !array) -> TRUE
DEFINED ( !array , 3 ) -> FALSE
None.
CREATED
-> logical
Returns TRUE if the element has been created since the set date.
None.
CREATED -> TRUE
None.
DELETED
-> logical
Returns TRUE if the element has been deleted since the set date.
None.
DELETED -> TRUE
None.
EMPTY(text)
-> logical
Returns TRUE if text is a zero length string, else FALSE
None.
EMPTY(‘’) -> TRUE
EMPTY(‘not empty’) -> FALSE
None.
IFTrue(logical, anyA, anyB)
-> logical
The first argument is a logical value or expression.
The second and third arguments may be of any type BUT THEY MUST BE OF THE SAME TYPE.
Returns a value that is the SAME TYPE as the second and third arguments.
Returns anyA if logical evaluates to TRUE, anyB if logical evaluates to FALSE.
anyA and anyB can be IFTRUE functions themselves (as long as they return consistent types) so IF constructs can be nested.ds.
None.
IFT (SPREF EQ /A3B/GC50, 'BLUE', 'RED'
iftrue (gwei gt 1tonne, /INSUL/THICK, /INSUL/THIN)
-> BLUE
->INSUL/THICK
Normal number of argument errors and Mismatched second and third arguments:
(2,497) TYPE MISMATCH: unmatched or illegal argument type for IFTRUE function.
MATCHW/ILD( text1, text2)
-> logical
MATCHW/ILD( text1, text2, text3)
-> logical
MATCHW/ILD( text1, text2, text3, text4)
-> logical
Matches string text2 to string text1. If they are the same then returns TRUE, else FALSE. text2 may contain wildcard characters.
The defaults for wildcards are ‘*’ for any number of characters, and ‘?’ for a single character.
With three arguments, the multiple wildcard character ‘*’ may be redefined by text3.
With four arguments the single wildcard character ‘?’ may be redefined by text4.
None
MATCHW/ILD(’** text’,’**!’,’!’) -> TRUE
None.

                                   .-----------------------------------.
                                 /                                    |
>- MODIFIED-(-+- attname -------*- DESCENDANTS ‑-+-+-comma +-attname ‑’
              |                 |                | |
              |- DESCENDANTS -. |- SIGNIFICANT --| |
              |               | |                | |
              |- SIGNIFICANT--| |- PRIMARY ----- | |
              |               | |                | |
              |- PRIMARY -----| |- OFFSPRING-----| |
              |               | |                | |
              |- OFFSPRING ---| ‘----------------’ |
              |               |                    |
              |               |                    |
              |               |                    |
              ‘---------------+--------------------+--+-- ) - OF ‑ id Æ
                                                  |
                                                   ‘-Æ

For sophisticated queries relating to modifications. Returns TRUE if a modification has taken place.
Each attribute name may be followed by the following qualifying keywords:
OFFSPRING, to check this element and members
SIGNIF, to check all elements for which this element represents the significant one;
PRIMARY, check all elements for which this element represents the primary one;
DESCENDANTS, this element and everything below (descendants).
The ‘OF’ syntax may be used as for attributes.
The MODIFIED function or the GEOM, CATTEXT and CATMOD pseudo-attributes.
The MODIFIED, DELETED and CREATED functions may go anywhere within an AVEVA E3D™ PML1 expression. i.e. after Q/VAR and within collections
None
Q (MODIFIED())
Returns TRUE if element has changed at all since the comparison date.
It will also return TRUE if the element has been created since the comparison date.
Q MODIFIED(POS,ORI)
Returns TRUE if POS or ORI modified since the comparison date.
Q MODIFIED(P1 POS)
Returns TRUE if the position of P1 has changed.
Q MODIFIED(GEOM DESCENDANTS
Returns TRUE if any geometry for item or any descendants has changed
Q MODIFIED(PRIMARY)
Returns TRUE if any element for which this element is primary, has changed.
Q MODIFIED() OF /PIPE1
Returns TRUE if /PIPE1 has been modified since the comparison date.
Q (BUIL OR MODIFIED()OR ELECREC OF NEXT )

None.
The MODIFIED, DELETED and CREATED functions are not implemented within PML2 expressions.
UNSET(value)
-> logical
Returns TRUE if value is unset, else FALSE. The value can be of any data type including ARRAYS. Normally it will be an AVEVA E3D™ attribute.
None.
UNSET( DESC )
TRUE where DESC is an unset text attribute
UNSET(CRFA)
FALSE where CRFA contains unset reference attributes
None.
VLOGICAL is used for the late evaluation of variables.
VLOGICAL ( variable_name ))
-> logical
VLOGICAL ( variable_name , number)
-> logical
With one argument, return the value of the scalar variable or the value of the array variable element as a logical.
With two arguments, return the value of the element corresponding to the index number as a logical.
The rules of conversion are:
TRUE for the strings ’T’, ’TR’, ’TRU’ or ’TRUE’ (case insensitive) or any numeric value not equal to zero;
FALSE for the strings ’F’, ’FA’, ’FAL’, ’FALS’ or ’FALSE’ (case insensitive) or a numeric value equal to zero.
Scalar variables may not be indexed. For example, VTEXT(!var[1]) will return an error.
Array variables must have an index. For example, VTEXT (!array) will return an error.
The value cannot be translated into a logical.
See also VTEXT, used for late evaluation when a text result is required; and VVALUE, used for late evaluation when a numeric result is required.
If the scalar variable, the array variable, or the array variable element does not exist, the result is undefined.
VLOG ( !array[1] ) -> TRUE
VLOG ( !array , 2 ) -> FALSE
None.

BADREF
DEFINED,UNDEFINED
CREATED
DELETED
EMPTY
IFTRUE
MATCHWILD
MODIFIED
UNSET
VLOGICAL
Synopsis
BADREF (id)
-> logical
Description
TRUE if id is invalid, else FALSE.
Side Effects
None
Example
BADREF(TREF) -> ’true’ if TREF=nulref
Errors
None.
Synopsis
DEFined (variable_name)
-> logical
DEFined (variable_name,number)
-> logical
UNDEFined (variable_name)
-> logical
UNDEFined (variable_name , number)
-> logical
Description
With one argument, DEFINED is true only if the scalar variable, the array variable or the array variable element exists.
With two arguments, DEFINED is true only if the first argument is an array variable which has a value for the index denoted by the second argument.
UNDEFINED( !foo ) is equivalent to NOT DEFINED( !foo ).
Side Effects
None.
Example
DEFINED ( !var ) -> TRUE
DEFINED ( !array ) -> TRUE
DEFINED ( !array[1] )) -> TRUE
DEFINED ( !array , 1 ) -> TRUE
DEFINED ( !var) -> FALSE
UNDEFINED ( !array) -> TRUE
DEFINED ( !array , 3 ) -> FALSE
Errors
None.
Synopsis
CREATED
-> logical
Description
Returns TRUE if the element has been created since the set date.
Side Effects
None.
Example
CREATED -> TRUE
Errors
None.
Synopsis
DELETED
-> logical
Description
Returns TRUE if the element has been deleted since the set date.
Side Effects
None.
Example
DELETED -> TRUE
Errors
None.
Synopsis
EMPTY(text)
-> logical
Description
Returns TRUE if text is a zero length string, else FALSE
Side Effects
None.
Example
EMPTY(‘’) -> TRUE
EMPTY(‘not empty’) -> FALSE
Errors
None.
Synopsis
IFTrue(logical, anyA, anyB)
-> logical
The first argument is a logical value or expression.
The second and third arguments may be of any type BUT THEY MUST BE OF THE SAME TYPE.
Returns a value that is the SAME TYPE as the second and third arguments.
Description
Returns anyA if logical evaluates to TRUE, anyB if logical evaluates to FALSE.
anyA and anyB can be IFTRUE functions themselves (as long as they return consistent types) so IF constructs can be nested.ds.
Side Effects
None.
Example
IFT (SPREF EQ /A3B/GC50, 'BLUE', 'RED'
iftrue (gwei gt 1tonne, /INSUL/THICK, /INSUL/THIN)
-> BLUE
->INSUL/THICK
Errors
Normal number of argument errors and Mismatched second and third arguments:
(2,497) TYPE MISMATCH: unmatched or illegal argument type for IFTRUE function.
Synopsis
MATCHW/ILD( text1, text2)
-> logical
MATCHW/ILD( text1, text2, text3)
-> logical
MATCHW/ILD( text1, text2, text3, text4)
-> logical
Description
Matches string text2 to string text1. If they are the same then returns TRUE, else FALSE. text2 may contain wildcard characters.
The defaults for wildcards are ‘*’ for any number of characters, and ‘?’ for a single character.
With three arguments, the multiple wildcard character ‘*’ may be redefined by text3.
With four arguments the single wildcard character ‘?’ may be redefined by text4.
Side Effects
None
Example
MATCHW/ILD(’A big bottle of beer’,’*big*’) -> TRUE
MATCHW/ILD(’A big bottle of beer’,’??big*’) -> TRUE
MATCHW/ILD(’A big bottle of beer’,’???*big*’) -> FALSE
MATCHW/ILD(’A big bottle of beer’,’*big*beer’) -> TRUE
MATCHW/ILD(’** text’,’**!’,’!’) -> TRUE
Errors
None.
Synopsis
                                   .-----------------------------------.
                                 /                                    |
>- MODIFIED-(-+- attname -------*- DESCENDANTS ‑-+-+-comma +-attname ‑’
              |                 |                | |
              |- DESCENDANTS -. |- SIGNIFICANT --| |
              |               | |                | |
              |- SIGNIFICANT--| |- PRIMARY ----- | |
              |               | |                | |
              |- PRIMARY -----| |- OFFSPRING-----| |
              |               | |                | |
              |- OFFSPRING ---| ‘----------------’ |
              |               |                    |
              |               |                    |
              |               |                    |
              ‘---------------+--------------------+--+-- ) - OF ‑ id Æ
                                                  |
                                                   ‘-Æ
Description
For sophisticated queries relating to modifications. Returns TRUE if a modification has taken place.
Each attribute name may be followed by the following qualifying keywords:
OFFSPRING, to check this element and members
SIGNIF, to check all elements for which this element represents the significant one;
PRIMARY, check all elements for which this element represents the primary one;
DESCENDANTS, this element and everything below (descendants).
The ‘OF’ syntax may be used as for attributes.
The MODIFIED function or the GEOM, CATTEXT and CATMOD pseudo-attributes.
The MODIFIED, DELETED and CREATED functions may go anywhere within an AVEVA E3D™ PML1 expression. i.e. after Q/VAR and within collections
Side Effects
None
Example
Q (MODIFIED())
Returns TRUE if element has changed at all since the comparison date.
It will also return TRUE if the element has been created since the comparison date.
Q MODIFIED(POS,ORI)
Returns TRUE if POS or ORI modified since the comparison date.
Q MODIFIED(P1 POS)
Returns TRUE if the position of P1 has changed.
Q MODIFIED(GEOM DESCENDANTS
Returns TRUE if any geometry for item or any descendants has changed
Q MODIFIED(PRIMARY)
Returns TRUE if any element for which this element is primary, has changed.
Q MODIFIED() OF /PIPE1
Returns TRUE if /PIPE1 has been modified since the comparison date.
Q (BUIL OR MODIFIED()OR ELECREC OF NEXT )
Errors
None.
Synopsis
UNSET(value)
-> logical
Description
Returns TRUE if value is unset, else FALSE. The value can be of any data type including ARRAYS. Normally it will be an AVEVA E3D™ attribute.
Side Effects
None.
Example
UNSET( DESC )
TRUE where DESC is an unset text attribute
UNSET(CRFA)
FALSE where CRFA contains unset reference attributes
Errors
None.
Synopsis
VLOGICAL ( variable_name ))
-> logical
VLOGICAL ( variable_name , number)
-> logical
Description
With one argument, return the value of the scalar variable or the value of the array variable element as a logical.
With two arguments, return the value of the element corresponding to the index number as a logical.
The rules of conversion are:
TRUE for the strings ’T’, ’TR’, ’TRU’ or ’TRUE’ (case insensitive) or any numeric value not equal to zero;
FALSE for the strings ’F’, ’FA’, ’FAL’, ’FALS’ or ’FALSE’ (case insensitive) or a numeric value equal to zero.
Scalar variables may not be indexed. For example, VTEXT(!var[1]) will return an error.
Array variables must have an index. For example, VTEXT (!array) will return an error.
The value cannot be translated into a logical.
See also VTEXT, used for late evaluation when a text result is required; and VVALUE, used for late evaluation when a numeric result is required.
Side Effects
If the scalar variable, the array variable, or the array variable element does not exist, the result is undefined.
Example
VLOG ( !array[1] ) -> TRUE
VLOG ( !array , 2 ) -> FALSE
Errors
None.

Synopsis
BADREF (id)
-> logical
Description
id
Side Effects
Example
BADREF(TREF) -> ’true’ if TREF=nulref
Errors
Synopsis
DEFined (variable_name)
-> logical
DEFined (variable_name,number)
-> logical
UNDEFined (variable_name)
-> logical
UNDEFined (variable_name , number)
-> logical
Description
Side Effects
Example
DEFINED ( !var ) -> TRUE
DEFINED ( !array ) -> TRUE
DEFINED ( !array[1] )) -> TRUE
DEFINED ( !array , 1 ) -> TRUE
DEFINED ( !var) -> FALSE
UNDEFINED ( !array) -> TRUE
DEFINED ( !array , 3 ) -> FALSE
Errors
Synopsis
CREATED
-> logical
Description
Side Effects
Example
CREATED -> TRUE
Errors
Synopsis
DELETED
-> logical
Description
Side Effects
Example
DELETED -> TRUE
Errors
Synopsis
EMPTY(text)
-> logical
Description
Side Effects
Example
EMPTY(‘’) -> TRUE
EMPTY(‘not empty’) -> FALSE
Errors
Synopsis
IFTrue(logical, anyA, anyB)
-> logical
Description
Side Effects
Example
IFT (SPREF EQ /A3B/GC50, 'BLUE', 'RED'
iftrue (gwei gt 1tonne, /INSUL/THICK, /INSUL/THIN)
-> BLUE
->INSUL/THICK
Errors
Synopsis
MATCHW/ILD( text1, text2)
-> logical
MATCHW/ILD( text1, text2, text3)
-> logical
MATCHW/ILD( text1, text2, text3, text4)
-> logical
Description
text2
text1
text2
text3
text4
Side Effects
Example
MATCHW/ILD(’** text’,’**!’,’!’) -> TRUE
Errors
Synopsis
                                 .-----------------------------------.
                                 /                                    |
>- MODIFIED-(-+- attname -------*- DESCENDANTS ‑-+-+-comma +-attname ‑’
              |                 |                | |
              |- DESCENDANTS -. |- SIGNIFICANT --| |
              |               | |                | |
              |- SIGNIFICANT--| |- PRIMARY ----- | |
              |               | |                | |
              |- PRIMARY -----| |- OFFSPRING-----| |
              |               | |                | |
              |- OFFSPRING ---| ‘----------------’ |
              |               |                    |
              |               |                    |
              |               |                    |
              ‘---------------+--------------------+--+-- ) - OF ‑ id Æ
                                                  |
                                                   ‘-Æ
Description
Side Effects
Example
Q (MODIFIED())
Q MODIFIED(POS,ORI)
Q MODIFIED(P1 POS)
Q MODIFIED(GEOM DESCENDANTS
Q MODIFIED(PRIMARY)
Q MODIFIED() OF /PIPE1
Q (BUIL OR MODIFIED()OR ELECREC OF NEXT )
Errors
Synopsis
UNSET(value)
-> logical
Description
value
Side Effects
None.
Example
UNSET( DESC )
TRUE where DESC is an unset text attribute
UNSET(CRFA)
FALSE where CRFA contains unset reference attributes
Errors
Synopsis
VLOGICAL ( variable_name ))
-> logical
VLOGICAL ( variable_name , number)
-> logical
Description
VTEXT(!var[1])
VTEXT (!array)
Side Effects
Example
VLOG ( !array[1] ) -> TRUE
VLOG ( !array , 2 ) -> FALSE
Errors


Logical array expressions can contain:
AVEVA E3D Design attributes of type logical array. For example, LOGARR where LOGARR is a User Dfined Attribute (UDA) of type logical.
Logical constants. The constants available are: TRUE, ON, YES for true; and FALSE, OFF, NO for false.
Logical operators. Refer to Logical Operators.
Logical functions. Refer to Logical Functions.
AVEVA E3D Design attributes of type logical array. For example, LOGARR where LOGARR is a User Dfined Attribute (UDA) of type logical.
AVEVA E3D Design attributes of type logical array. For example, LOGARR where LOGARR is a User Dfined Attribute (UDA) of type logical.
Logical constants. The constants available are: TRUE, ON, YES for true; and FALSE, OFF, NO for false.
Logical constants. The constants available are: TRUE, ON, YES for true; and FALSE, OFF, NO for false.
Logical operators. Refer to Logical Operators.
Logical operators. Refer to Logical Operators.
Logical functions. Refer to Logical Functions.
Logical functions. Refer to Logical Functions.

Logical Operators
Logical Functions
Logical Operators
.
Logical Functions
.


In AVEVA E3D Design expressions, integers are treated as reals; they are fully interchangeable. Numeric expressions can contain:
Numbers, for example: 32, 10.1.
Numbers can be given as integer exponents, for example: 10 exp 5, and 5 E 6.
Values (numbers) can be qualified by units. This introduces dimensional analysis into the expression. The valid units are any standard appropriate unit qualifiers for example MM, M/etres, IN/ches, FT, FEET, kg, lb, kgf/m3, pascal. These may be preceded by SQU/are, CUBIC, CUB/e to denote non-linear Values, or alternatively they can have power indices appended. For example: 100 mm, 10 exp 5 cubic feet, 10m3, 20newton.m-2. Feet and inches can be shown as, for example, 10'6.
AVEVA E3D Design attributes of type number, for example: XLEN.
Position, direction and orientation attributes which have a subscript to indicate which part of the array is required. For example, POS[2] means the second element of the POSITION attribute; that is, the northing.
Note:
Position, direction and orientation attributes without subscripts can only be used in number array expressions.
The keyword PI (3.142).
Numeric operators.
Numeric functions.
Numbers, for example: 32, 10.1.
Numbers, for example: 32, 10.1.
Numbers can be given as integer exponents, for example: 10 exp 5, and 5 E 6.
Numbers can be given as integer exponents, for example: 10 exp 5, and 5 E 6.
Values (numbers) can be qualified by units. This introduces dimensional analysis into the expression. The valid units are any standard appropriate unit qualifiers for example MM, M/etres, IN/ches, FT, FEET, kg, lb, kgf/m3, pascal. These may be preceded by SQU/are, CUBIC, CUB/e to denote non-linear Values, or alternatively they can have power indices appended. For example: 100 mm, 10 exp 5 cubic feet, 10m3, 20newton.m-2. Feet and inches can be shown as, for example, 10'6.
Values (numbers) can be qualified by units. This introduces dimensional analysis into the expression. The valid units are any standard appropriate unit qualifiers for example MM, M/etres, IN/ches, FT, FEET, kg, lb, kgf/m3, pascal. These may be preceded by SQU/are, CUBIC, CUB/e to denote non-linear Values, or alternatively they can have power indices appended. For example: 100 mm, 10 exp 5 cubic feet, 10m3, 20newton.m-2. Feet and inches can be shown as, for example, 10'6.
AVEVA E3D Design attributes of type number, for example: XLEN.
AVEVA E3D Design attributes of type number, for example: XLEN.
Position, direction and orientation attributes which have a subscript to indicate which part of the array is required. For example, POS[2] means the second element of the POSITION attribute; that is, the northing.
Note:
Position, direction and orientation attributes without subscripts can only be used in number array expressions.
Position, direction and orientation attributes which have a subscript to indicate which part of the array is required. For example, POS[2] means the second element of the POSITION attribute; that is, the northing.
The keyword PI (3.142).
The keyword PI (3.142).
Numeric operators.
Numeric operators.
Numeric functions.
Numeric functions.

POS[2]
Note


The numeric operators available are:
+
Addition.
-
Subtraction.
*
Multiplication.
/
Division.

Operator
Comments
+
Addition.
-
Subtraction.
*
Multiplication.
/
Division.


The add and subtract functions available are
number + number
-> number
number ‑ number
-> number
+ number
-> number
- number
-> number
Add or subtract two numbers. They can also be used as unary operators at the beginning of a parenthesized sub-expression.
Units are consolidated across add and subtract and the result is returned in current units of the physical quantity, for example when current distance units are inches
If only one value has a unit qualifier the other is assumed to be in current units of that physical quantity for example:
If the two values have conflicting units a warning is issued and a value is returned with no units assuming both values are in the database units of their respective quantities which is mm and Kg in the example:
q (1ft + 1kg ) will return 305.8
1 + 2 -> 3.0
1 ‑ 2 -> 1.0
+ 1 -> 1.0
- 1 -> -1.0
Floating point underflow.

Synopsis
number + number
-> number
number ‑ number
-> number
+ number
-> number
- number
-> number
Description
Add or subtract two numbers. They can also be used as unary operators at the beginning of a parenthesized sub-expression.
Side Effects
Units are consolidated across add and subtract and the result is returned in current units of the physical quantity, for example when current distance units are inches
q (1ft + 100mm) will return 15.9in
If only one value has a unit qualifier the other is assumed to be in current units of that physical quantity for example:
q (1ft + 100 ) will return 112in
If the two values have conflicting units a warning is issued and a value is returned with no units assuming both values are in the database units of their respective quantities which is mm and Kg in the example:
q (1ft + 1kg ) will return 305.8
Example
1 + 2 -> 3.0
1 ‑ 2 -> 1.0
+ 1 -> 1.0
- 1 -> -1.0
Errors
Floating point underflow.

Synopsis
number + number
-> number
number ‑ number
-> number
+ number
-> number
- number
-> number
Description
Side Effects
Example
1 + 2 -> 3.0
1 ‑ 2 -> 1.0
+ 1 -> 1.0
- 1 -> -1.0
Errors