Headers
stringlengths
3
162
Content
stringlengths
12
32.8k
Creation of a new element as a copy
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 :
Save Work and Get Work
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
New session
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.
SAVEWORK
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 .
CLAIM command
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
GETWORK
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:
Data Access Control
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
NAmeData
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
Undo and Redo
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.
Undo and 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
Shared Collections (Groups) and Secondary Hierarchies
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
Delete GPSET
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
Copy a shared collection
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)
Selection for GPSET
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 .
Expressions
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
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
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
Expressions can be nested using brackets. ( (SIN(!angleA) * 2) / SIN(!angleB) ) ( (SIN(!angleA) * 2) / SIN(!angleB) )
Logical expressions
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
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
Logical functions
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
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 .
Design expressions
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
Numeric operators
The numeric operators available are: + Addition. - Subtraction. * Multiplication. / Division. Operator Comments + Addition. - Subtraction. * Multiplication. / Division.
Addition
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
Miltiply and divide
The multiply and divide functions available are number * number -> number number / number -> number Multiply or divide two numbers. They can also be used as unary operators at the beginning of a parenthesized sub-expression. Numeric underflow is not considered to be an error and neither is it flagged as a warning. The result returned is zero. Units are consolidated across Multiply and Divide. The result is returned in the current units of the physical quantity of the result for example when current units of pressure are psi then: If one value has no unit it is assumed to be a scaling factor. This also applies to reciprocal physical quantities. For example: for (10 / XLEN) will return 2mm-1 when XLEN is 5mm 2 * 3 -> 6.0 2 / 3 -> 0.666666666 Divide by zero. Synopsis number * number -> number number / number -> number Description Multiply or divide two numbers. They can also be used as unary operators at the beginning of a parenthesized sub-expression. Numeric underflow is not considered to be an error and neither is it flagged as a warning. The result returned is zero. Side Effects Units are consolidated across Multiply and Divide. The result is returned in the current units of the physical quantity of the result for example when current units of pressure are psi then: q (20kgf/ 1 cm2 ) will return 284.47PSI If one value has no unit it is assumed to be a scaling factor. This also applies to reciprocal physical quantities. For example: for (10 / XLEN) will return 2mm-1 when XLEN is 5mm Example 2 * 3 -> 6.0 2 / 3 -> 0.666666666 Errors Divide by zero. Synopsis number * number -> number number / number -> number Description Side Effects (10 / XLEN) Example 2 * 3 -> 6.0 2 / 3 -> 0.666666666 Errors
Numeric function
All referenced units are current units. The numeric functions available are: ABS ( number1 ) Gives the absolute value of a number ACOS ( number1 ) Gives the arc cosine of a number, in degrees. ASIN ( number1 ) Gives the arc sine of a number, in degrees. ATAN ( number1 ) Gives the arc tangent of a number, in degrees. ATANT ( number1, number2 ) Gives the arc tangent of number1/number2, in degrees, with the appropriate sign. ALOG ( number1 ) Gives the exponential function (natural anti-log) of a number. ARRAY(pos or dir or ori) Converts a position, direction or orientation value or attribute into three numbers. ARRAYSIZE ( variable-name ) Gives the size of an array variable. ARRAYWIDTH( variable-name ) Gives the largest display width of any string in array variable-name. COMPONENT dir OF pos2 Gives the magnitude of a vector drawn from E0 N0 U0 to pos2, projected in the direction dir1. INT ( number1 ) Gives the truncated integer value of a number. SIN ( number1 ) Gives the sine, cosine or tangent value of a number (considered to be in current units of angle (degrees) if value is unqualified). COS ( number1 ) Gives the sine, cosine or tangent value of a number (considered to be in current units of angle (degrees) if value is unqualified). TAN ( number1 ) Gives the sine, cosine or tangent value of a number (considered to be in current units of angle (degrees) if value is unqualified). LENGTH ( text1 ) Gives the length of text1. LOG ( number1 ) Gives the natural logarithm of a number. MATCH ( text1, text2 ) Gives the position of the beginning of the leftmost occurrence of text2 in text1. If text2 does not occur in text1, 0 is returned. MAX ( number1, number2[ , number3 [. . .]]) ) Gives the maximum value of the arguments. MIN ( number1, number2[ , number3 [. . .]]) ) Gives the minimum value of the arguments. NEGATE Multiply a number by -1.0. NINT ( number1 ) Gives the nearest integer to a real. NINT(N+0.5) is equal to N+1 if N is positive or equal to zero, to N if N is negative. OCCUR ( text1, text2 ) Gives the number of times string text2 occurs in string text1. REAL ( text1 ) Try to read a number at the beginning of text1. POWER ( number1, number2 ) Gives the value of number1 raised to the power number2. SQRT ( number1 ) Gives the square root of a number. VVALUE ( variable-name ) Used for late evaluation of variables. Gives a real value. ABS ( number1 ) -> number Returns the absolute value of a real. None. ABS ( -3.2 ) -> 3.2 None. All these will return values in current angle units. ASIN ( number1 ) -> number ACOS ( number1 ) -> number ATAN ( number1 ) -> number ATANT ( number1, number2 ) -> number Return the arc-cosine, arc-sine or arc-tangent of a number, in degrees. ATANT returns the arc-tangent of number1/number2 with the appropriate sign. ATANT is useful where the second value is near or equal to zero. For example, (6 0 ATANT) will give the correct result of 90 degrees, but (6 0 D ATAN) will indicate an error when trying to divide by zero. None. ACOS ( 0.8660254 ) -> 30degrees Argument of ACOS or ASIN out of range [-1.0,+1.0] ATANT (0.0,0.0) is undefined. ALOG ( number1 ) -> number Return the exponential function (natural anti-log) of a number. Numeric underflow causes the result to be set to zero. ALOG( -0.7 ) -> 0.4965853 Floating point overflow. ARRAY(pos or dir or ori) -> number Converts a position, direction or orientation value or attribute into three numbers. None ARRAY(e100 ) -> 100 0 0 None. ARRAYSize ( variable-name ) -> number Give the size of an array variable. If the array variable does not exist, the result is undefined. ARRAYSIZE(!array) -> 2.0 The variable is a scalar variable and not an array variable. The variable is an array variable element and not an array variable. ARRAYWIDTH ( variable-name ) -> number Give the largest display with of any string in array variable_name. None. If an array contains the following values: !ARRAY[1] ’Bread’ !ARRAY[2] ’is’ !ARRAY[3] ’for’ !ARRAY[4] ’life,’ !ARRAY[5] ’not’ !ARRAY[6] ’just’ !ARRAY[7] ’for’ !ARRAY[8] ’breakfast’ Then ARRAYWIDTH(!ARRAY -> 9 defines the length of ’breakfast’. The variable is a scalar variable and not an array variable. The variable is an array variable element and not an array variable. COMPonent dir1 OF pos2 -> text Returns the magnitude of a vector drawn from E0 N0 U0 to pos2, projected in the direction dir1. None. COMP E 45 N of N 0 E 100 U 50 -> 70.710 None. DISTConvert ( number ) -> number Returns a distance value cast from the input number. The input value is converted to its database units (if it is a physical quantity) and then cast to database units of distance (i.e. mm) and presented in current units of distance. None. When current distance units are mm distc(1000) distc(10metre) distc( 5pascal) distc (5atm) -> 1000mm -> 10000mm -> 5mm -> 506625mm When current distance units are inch distc(1000) distc(10metre) distc( 5pascal) distc (5atm) -> 39.4in -> 393.7in -> 0.2in -> 19945.9in None. All these will accept values qualified by angle units. If no unit is supplied the value is assumed to be in current angle units (usually degrees). SINe ( number1 ) -> number COSine ( number1 ) -> number TANgent ( number1 ) -> number Return the sine, cosine or tangent value of a number (considered to be in degrees). None. COS ( 0.0 ) returns 1.0 TAN ( 45.0 degrees ) returns 1.0 TAN (0.785 radians) ) returns 0.9992 Division by zero for TAN if the sine is (nearly) equal to zero. INT ( number1 ) -> number Return the truncated integer value of a number. None. INT ( -23.7 ) -> -23.0 Integer overflow. LENgth ( text1 ) -> number Return the length of text1. None. LENGTH ( ’abcdef’ ) -> 6.0 LENGTH ( ’’ ) -> 0.0 None. LOG ( number1 ) -> number Return the natural logarithm of a number. None. LOG( 3 ) -> 1 0986123 Negative arguments. MATch ( text1 , text2) -> number Return the position of the beginning of the leftmost occurrence of text2 in text1. If text2 does not occur in text1, 0 is returned. None. MATCH ( ’abcdef’ , ’cd’ ) -> 3.0 MATCH ( ’abcdef’ , ’x’ ) -> 0.0 MATCH ( ’abcdef’ , ’’ ) -> 1.0 None. MAX ( number1 , number2 [ , number3 [ ... ] ] ) -> number MIN ( number1 , number2 [ , number3 [ ... ] ] ) -> number Return the maximum or minimum value of the arguments. Values being evaluated are assumed to of a common physical quantity. If no unit qualifiers are supplied they are simply numbers. If a physical quantity is defined the result will be in current units of that quantity. If unqualified numbers are mixed with unit values they are assumed to be in the current units of that physical quantity. If quantities are in mixed units they are all compared in comparison to a standard unit. If quantities are of different types of physical quantities a warning is issued and the numeric result compares the values in their database units. Min and Max return a value with the same dimension as that of their arguments. MAX ( 1 , 3.4 ) -> 3.4 MIN ( 7.6 , -12.33 , 2.3 ) -> -12.33 MIN (7.6ft, 12.33inch, 1000mm ) -> 12.3 in (current distance units are inch) MAX (7.6ft, 12.33inch, 1000 ) -> 1000in (current distance units are inch) MAX (7.6ft, 12.33inch, 1kg ) -> 2316.5 (database mm equivalent of 7.6ft) None. NEGate ( number1 ) -> number Multiply a real by -1.0. None. NEG ( 1 ) -> -1.0 None. NINT ( number1 ) -> number Return the nearest integer to a real. NINT(N+0.5) is equal to N+1 if N is positive or equal to zero, to N if N is negative. None. NINT ( 1.1 ) -> 1.0 NINT ( -23.7 ) -> -24.0 NINT ( 1.5 ) -> 2.0 NINT ( -11.5 ) -> -12.0 Integer overflow. OCCUR(text1, text2) -> integer Counts the number of times string text2 occurs in string text1 None. OCCUR (’ABBACCBBBBBAB’, ’BB’) -> 3 OCCUR(’ZZZZZZZZZZZ’, ’A’) -> 0 None. REAL ( text1 ) -> number Try to read a real number at the beginning of text1. Note that if text is in the form of an exponent, (-12E-1 in the third example), there must be no spaces in it. Note: this function was formerly called NUMBER. Numeric underflow causes the result to be set to zero. If the text string contains units they are ignored and the value only is returned. If the test string contains text that is NOT a valid unit it will generate an error. If the text string is space separated from the number it is completely ignored. REAL ( ’12.34’) -> 12.34 REAL ( ’ 7.23 E 3 meters’ ) -> 7.23 REAL ( ’ -12E-1 meters ’ ) -> -1.2 REAL (' 1200 fred ' ) -> 1200 REAL (' 1200fred ' ) -> returns an error This will return the value of the number in the string IGNORING any unit qualifier. The unit qualifier must still be a valid unit qualifier. This is done so that output from $! And VAR ! commands can still be accepted by the REAL function. Unable to convert the text into a real number. POWer ( number1 , number2 ) -> real Return the value of number1 raised to the power number2. If the value being raised to a power is that of a physical quantity the result is also of a physical quantity.(in relevant current units). If the resultant quantity is non physical (for example, by raising to a fractional power, or an extreme power, a warning is given and only the value of quantity is raised to the power. If the power is a physical quantity this also gives a warning. POWER ( -2 , 3 ) -> -8 POWER ( -2inch , 2 ) -> 4in2 POWER ( 2inch, 3.5 ) -> returns 11.314 with an error (i.e. 2**3.5) Floating point overflow. Zero first argument and non-positive second argument (effectively divide by zero). Negative first argument and non-integer second argument. SQrt ( number1 ) -> number Return the square root of a real. Units are consolidated across SQRT. The resultant value will be in current units of that quantity. If the resultant quantity has no recognized physical dimension a warning is given and the value return will be a number relating to the input value in database units. SQRT ( 4 ) -> 2.0 SQRT ( 4inch2 ) -> 2.0inch sqrt ( 4inch3 ) -> a warning and 256.02 which is sqrt (4*25.4mm) Negative argument. VVALUE is used for the late evaluation of PML variables. VVALue( variable_name ) -> number VVALue( variable_name , number ) -> number With one argument, returns value of the scalar variable or value of the array variable element as a number. With two arguments, returns value of the element corresponding to the index number as a number. The value of the variable will be returned, irrespective of its units. This will return the value of the number in the string IGNORING any unit qualifier. The unit qualifier must still be a valid unit qualifier. This is done so that output from $! And VAR ! commands can still be accepted by the VVAL function. If the scalar variable, the array variable or the array variable element does not exist, the result is undefined. VVAL ( !array[1] ) -> 1.0 VVAL ( !array , 2 ) -> 0.0 Scalar variable may not be indexed. For example, VTEXT (!var[1]) ) will return an error. Array variable must have an index. For example, VTEXT ( !array ) ) will return an error. The string can not be converted to a number. Function Comments ABS ( number1 ) Gives the absolute value of a number ACOS ( number1 ) Gives the arc cosine of a number, in degrees. ASIN ( number1 ) Gives the arc sine of a number, in degrees. ATAN ( number1 ) Gives the arc tangent of a number, in degrees. ATANT ( number1, number2 ) Gives the arc tangent of number1/number2, in degrees, with the appropriate sign. ALOG ( number1 ) Gives the exponential function (natural anti-log) of a number. ARRAY(pos or dir or ori) Converts a position, direction or orientation value or attribute into three numbers. ARRAYSIZE ( variable-name ) Gives the size of an array variable. ARRAYWIDTH( variable-name ) Gives the largest display width of any string in array variable-name. COMPONENT dir OF pos2 Gives the magnitude of a vector drawn from E0 N0 U0 to pos2, projected in the direction dir1. INT ( number1 ) Gives the truncated integer value of a number. SIN ( number1 ) Gives the sine, cosine or tangent value of a number (considered to be in current units of angle (degrees) if value is unqualified). COS ( number1 ) Gives the sine, cosine or tangent value of a number (considered to be in current units of angle (degrees) if value is unqualified). TAN ( number1 ) Gives the sine, cosine or tangent value of a number (considered to be in current units of angle (degrees) if value is unqualified). LENGTH ( text1 ) Gives the length of text1. LOG ( number1 ) Gives the natural logarithm of a number. MATCH ( text1, text2 ) Gives the position of the beginning of the leftmost occurrence of text2 in text1. If text2 does not occur in text1, 0 is returned. MAX ( number1, number2[ , number3 [. . .]]) ) Gives the maximum value of the arguments. MIN ( number1, number2[ , number3 [. . .]]) ) Gives the minimum value of the arguments. NEGATE Multiply a number by -1.0. NINT ( number1 ) Gives the nearest integer to a real. NINT(N+0.5) is equal to N+1 if N is positive or equal to zero, to N if N is negative. OCCUR ( text1, text2 ) Gives the number of times string text2 occurs in string text1. REAL ( text1 ) Try to read a number at the beginning of text1. POWER ( number1, number2 ) Gives the value of number1 raised to the power number2. SQRT ( number1 ) Gives the square root of a number. VVALUE ( variable-name ) Used for late evaluation of variables. Gives a real value. Synopsis ABS ( number1 ) -> number Description Returns the absolute value of a real. Side Effects None. Example ABS ( -3.2 ) -> 3.2 Errors None. Synopsis ASIN ( number1 ) -> number ACOS ( number1 ) -> number ATAN ( number1 ) -> number ATANT ( number1, number2 ) -> number Description Return the arc-cosine, arc-sine or arc-tangent of a number, in degrees. ATANT returns the arc-tangent of number1/number2 with the appropriate sign. ATANT is useful where the second value is near or equal to zero. For example, (6 0 ATANT) will give the correct result of 90 degrees, but (6 0 D ATAN) will indicate an error when trying to divide by zero. Side Effects None. Example ACOS ( 0.8660254 ) -> 30degrees Errors Argument of ACOS or ASIN out of range [-1.0,+1.0] ATANT (0.0,0.0) is undefined. Synopsis ALOG ( number1 ) -> number Description Return the exponential function (natural anti-log) of a number. Side Effects Numeric underflow causes the result to be set to zero. Example ALOG( -0.7 ) -> 0.4965853 Errors Floating point overflow. Synopsis ARRAY(pos or dir or ori) -> number Description Converts a position, direction or orientation value or attribute into three numbers. Side Effects None Example ARRAY(e100 ) -> 100 0 0 Errors None. Synopsis ARRAYSize ( variable-name ) -> number Description Give the size of an array variable. Side Effects If the array variable does not exist, the result is undefined. Example ARRAYSIZE(!array) -> 2.0 Errors The variable is a scalar variable and not an array variable. The variable is an array variable element and not an array variable. Synopsis ARRAYWIDTH ( variable-name ) -> number Description Give the largest display with of any string in array variable_name. Side Effects None. Example If an array contains the following values: !ARRAY[1] ’Bread’ !ARRAY[2] ’is’ !ARRAY[3] ’for’ !ARRAY[4] ’life,’ !ARRAY[5] ’not’ !ARRAY[6] ’just’ !ARRAY[7] ’for’ !ARRAY[8] ’breakfast’ Then ARRAYWIDTH(!ARRAY -> 9 defines the length of ’breakfast’. Errors The variable is a scalar variable and not an array variable. The variable is an array variable element and not an array variable. Synopsis COMPonent dir1 OF pos2 -> text Description Returns the magnitude of a vector drawn from E0 N0 U0 to pos2, projected in the direction dir1. Side Effects None. Example COMP E 45 N of N 0 E 100 U 50 -> 70.710 Errors None. Synopsis DISTConvert ( number ) -> number Description Returns a distance value cast from the input number. The input value is converted to its database units (if it is a physical quantity) and then cast to database units of distance (i.e. mm) and presented in current units of distance. Side Effects None. Example When current distance units are mm distc(1000) distc(10metre) distc( 5pascal) distc (5atm) -> 1000mm -> 10000mm -> 5mm -> 506625mm When current distance units are inch distc(1000) distc(10metre) distc( 5pascal) distc (5atm) -> 39.4in -> 393.7in -> 0.2in -> 19945.9in Errors None. Synopsis SINe ( number1 ) -> number COSine ( number1 ) -> number TANgent ( number1 ) -> number Description Return the sine, cosine or tangent value of a number (considered to be in degrees). Side Effects None. Example COS ( 0.0 ) returns 1.0 TAN ( 45.0 degrees ) returns 1.0 TAN (0.785 radians) ) returns 0.9992 Errors Division by zero for TAN if the sine is (nearly) equal to zero. Synopsis INT ( number1 ) -> number Description Return the truncated integer value of a number. Side Effects None. Example INT ( 1.6 ) -> 1.0 INT ( -23.7 ) -> -23.0 Errors Integer overflow. Synopsis LENgth ( text1 ) -> number Description Return the length of text1. Side Effects None. Example LENGTH ( ’abcdef’ ) -> 6.0 LENGTH ( ’’ ) -> 0.0 Errors None. Synopsis LOG ( number1 ) -> number Description Return the natural logarithm of a number. Side Effects None. Example LOG( 3 ) -> 1 0986123 Errors Negative arguments. Synopsis MATch ( text1 , text2) -> number Description Return the position of the beginning of the leftmost occurrence of text2 in text1. If text2 does not occur in text1, 0 is returned. Side Effects None. Example MATCH ( ’abcdef’ , ’cd’ ) -> 3.0 MATCH ( ’abcdef’ , ’x’ ) -> 0.0 MATCH ( ’abcdef’ , ’’ ) -> 1.0 Errors None. Synopsis MAX ( number1 , number2 [ , number3 [ ... ] ] ) -> number MIN ( number1 , number2 [ , number3 [ ... ] ] ) -> number Description Return the maximum or minimum value of the arguments. Side Effects Values being evaluated are assumed to of a common physical quantity. If no unit qualifiers are supplied they are simply numbers. If a physical quantity is defined the result will be in current units of that quantity. If unqualified numbers are mixed with unit values they are assumed to be in the current units of that physical quantity. If quantities are in mixed units they are all compared in comparison to a standard unit. If quantities are of different types of physical quantities a warning is issued and the numeric result compares the values in their database units. Min and Max return a value with the same dimension as that of their arguments. Example MAX ( 1 , 3.4 ) -> 3.4 MIN ( 7.6 , -12.33 , 2.3 ) -> -12.33 MIN (7.6ft, 12.33inch, 1000mm ) -> 12.3 in (current distance units are inch) MAX (7.6ft, 12.33inch, 1000 ) -> 1000in (current distance units are inch) MAX (7.6ft, 12.33inch, 1kg ) -> 2316.5 (database mm equivalent of 7.6ft) Errors None. Synopsis NEGate ( number1 ) -> number Description Multiply a real by -1.0. Side Effects None. Example NEG ( 1 ) -> -1.0 Errors None. Synopsis NINT ( number1 ) -> number Description Return the nearest integer to a real. NINT(N+0.5) is equal to N+1 if N is positive or equal to zero, to N if N is negative. Side Effects None. Example NINT ( 1.1 ) -> 1.0 NINT ( -23.7 ) -> -24.0 NINT ( 1.5 ) -> 2.0 NINT ( -11.5 ) -> -12.0 Errors Integer overflow. Synopsis OCCUR(text1, text2) -> integer Description Counts the number of times string text2 occurs in string text1 Side Effects None. Example OCCUR (’ABBACCBBBBBAB’, ’BB’) -> 3 OCCUR(’ZZZZZZZZZZZ’, ’A’) -> 0 Errors None. Synopsis REAL ( text1 ) -> number Description Try to read a real number at the beginning of text1. Note that if text is in the form of an exponent, (-12E-1 in the third example), there must be no spaces in it. Note: this function was formerly called NUMBER. Side Effects Numeric underflow causes the result to be set to zero. If the text string contains units they are ignored and the value only is returned. If the test string contains text that is NOT a valid unit it will generate an error. If the text string is space separated from the number it is completely ignored. Example REAL ( ’12.34’) -> 12.34 REAL ( ’ 7.23 E 3 meters’ ) -> 7.23 REAL ( ’ -12E-1 meters ’ ) -> -1.2 REAL (' 1200 fred ' ) -> 1200 REAL (' 1200fred ' ) -> returns an error This will return the value of the number in the string IGNORING any unit qualifier. The unit qualifier must still be a valid unit qualifier. This is done so that output from $! And VAR ! commands can still be accepted by the REAL function. Note: The extension of these functions are NOT supported in DARS as they require PML functionality. Errors Unable to convert the text into a real number. Synopsis POWer ( number1 , number2 ) -> real Description Return the value of number1 raised to the power number2. Side Effects If the value being raised to a power is that of a physical quantity the result is also of a physical quantity.(in relevant current units). If the resultant quantity is non physical (for example, by raising to a fractional power, or an extreme power, a warning is given and only the value of quantity is raised to the power. If the power is a physical quantity this also gives a warning. Example POWER ( -2 , 3 ) -> -8 POWER ( -2inch , 2 ) -> 4in2 POWER ( 2inch, 3.5 ) -> returns 11.314 with an error (i.e. 2**3.5) Errors Floating point overflow. Zero first argument and non-positive second argument (effectively divide by zero). Negative first argument and non-integer second argument. Synopsis SQrt ( number1 ) -> number Description Return the square root of a real. Side Effects Units are consolidated across SQRT. The resultant value will be in current units of that quantity. If the resultant quantity has no recognized physical dimension a warning is given and the value return will be a number relating to the input value in database units. Example SQRT ( 4 ) -> 2.0 SQRT ( 4inch2 ) -> 2.0inch sqrt ( 4inch3 ) -> a warning and 256.02 which is sqrt (4*25.4mm) Errors Negative argument. Synopsis VVALue( variable_name ) -> number VVALue( variable_name , number ) -> number Description With one argument, returns value of the scalar variable or value of the array variable element as a number. With two arguments, returns value of the element corresponding to the index number as a number. The value of the variable will be returned, irrespective of its units. This will return the value of the number in the string IGNORING any unit qualifier. The unit qualifier must still be a valid unit qualifier. This is done so that output from $! And VAR ! commands can still be accepted by the VVAL function. Note: The extension of these functions are NOT supported in DARS as they require PML functionality. Side Effects If the scalar variable, the array variable or the array variable element does not exist, the result is undefined. Example VVAL ( !array[1] ) -> 1.0 VVAL ( !array , 2 ) -> 0.0 Errors Scalar variable may not be indexed. For example, VTEXT (!var[1]) ) will return an error. Array variable must have an index. For example, VTEXT ( !array ) ) will return an error. The string can not be converted to a number. Note: The extension of these functions are NOT supported in DARS as they require PML functionality. Note: The extension of these functions are NOT supported in DARS as they require PML functionality. Function Comments ABS ( number1 ) ACOS ( number1 ) ASIN ( number1 ) ATAN ( number1 ) ATANT ( number1, number2 ) number1 number2 ALOG ( number1 ) ARRAY(pos or dir or ori) ARRAYSIZE ( variable-name ) ARRAYWIDTH( variable-name ) COMPONENT dir OF pos2 pos2 dir1 INT ( number1 ) SIN ( number1 ) COS ( number1 ) TAN ( number1 ) LENGTH ( text1 ) LOG ( number1 ) MATCH ( text1, text2 ) text2 text1 text2 text1 MAX ( number1, number2[ , number3 [. . .]]) ) MIN ( number1, number2[ , number3 [. . .]]) ) NEGATE NINT ( number1 ) OCCUR ( text1, text2 ) text2 text1 REAL ( text1 ) text1 POWER ( number1, number2 ) number1 number2 SQRT ( number1 ) VVALUE ( variable-name ) Synopsis ABS ( number1 ) -> number Description Side Effects Example ABS ( -3.2 ) -> 3.2 Errors Synopsis ASIN ( number1 ) -> number ACOS ( number1 ) -> number ATAN ( number1 ) -> number ATANT ( number1, number2 ) -> number Description number1/number2 Side Effects Example ACOS ( 0.8660254 ) -> 30degrees Errors ATANT (0.0,0.0) Synopsis ALOG ( number1 ) -> number Description Side Effects Example ALOG( -0.7 ) -> 0.4965853 Errors Synopsis ARRAY(pos or dir or ori) -> number Description Side Effects Example ARRAY(e100 ) -> 100 0 0 Errors Synopsis ARRAYSize ( variable-name ) -> number Description Side Effects Example Errors Synopsis ARRAYWIDTH ( variable-name ) -> number Description variable_name Side Effects Example If an array contains the following values: !ARRAY[1] ’Bread’ !ARRAY[2] ’is’ !ARRAY[3] ’for’ !ARRAY[4] ’life,’ !ARRAY[5] ’not’ !ARRAY[6] ’just’ !ARRAY[7] ’for’ !ARRAY[8] ’breakfast’ ARRAYWIDTH(!ARRAY -> 9 Errors Synopsis COMPonent dir1 OF pos2 -> text Description pos2 dir1. Side Effects Example COMP E 45 N of N 0 E 100 U 50 -> 70.710 Errors Synopsis DISTConvert ( number ) -> number Description Side Effects Example -> 1000mm -> 10000mm -> 5mm -> 506625mm distc(1000) distc(10metre) distc( 5pascal) distc (5atm) -> 39.4in -> 393.7in -> 0.2in -> 19945.9in Errors Synopsis SINe ( number1 ) -> number COSine ( number1 ) -> number TANgent ( number1 ) -> number Description Side Effects Example COS ( 0.0 ) returns 1.0 TAN ( 45.0 degrees ) returns 1.0 TAN (0.785 radians) ) returns 0.9992 Errors Synopsis INT ( number1 ) -> number Description Side Effects Example Errors Synopsis LENgth ( text1 ) -> number Description text1 Side Effects Example LENGTH ( ’abcdef’ ) -> 6.0 LENGTH ( ’’ ) -> 0.0 Errors Synopsis LOG ( number1 ) -> number Description Side Effects Example LOG( 3 ) -> 1 0986123 Errors Synopsis MATch ( text1 , text2) -> number Description text2 text1 text2 text1 Side Effects Example MATCH ( ’abcdef’ , ’cd’ ) -> 3.0 MATCH ( ’abcdef’ , ’x’ ) -> 0.0 MATCH ( ’abcdef’ , ’’ ) -> 1.0 Errors Synopsis MAX ( number1 , number2 [ , number3 [ ... ] ] ) -> number MIN ( number1 , number2 [ , number3 [ ... ] ] ) -> number Description Side Effects Example MAX ( 1 , 3.4 ) -> 3.4 MIN ( 7.6 , -12.33 , 2.3 ) -> -12.33 MIN (7.6ft, 12.33inch, 1000mm ) -> 12.3 in (current distance units are inch) MAX (7.6ft, 12.33inch, 1000 ) -> 1000in (current distance units are inch) MAX (7.6ft, 12.33inch, 1kg ) -> 2316.5 (database mm equivalent of 7.6ft) Synopsis NEGate ( number1 ) -> number Description Side Effects Example NEG ( 1 ) -> -1.0 Errors Synopsis Description NINT(N+0.5) N+1 N N N Side Effects Example NINT ( 1.1 ) -> 1.0 NINT ( -23.7 ) -> -24.0 NINT ( 1.5 ) -> 2.0 NINT ( -11.5 ) -> -12.0 Errors Synopsis OCCUR(text1, text2) -> integer Description text2 text1 Side Effects Example OCCUR (’ABBACCBBBBBAB’, ’BB’) -> 3 OCCUR(’ZZZZZZZZZZZ’, ’A’) -> 0 Errors Synopsis REAL ( text1 ) -> number Description text1 Side Effects Example REAL ( ’12.34’) -> 12.34 REAL ( ’ 7.23 E 3 meters’ ) -> 7.23 REAL ( ’ -12E-1 meters ’ ) -> -1.2 REAL (' 1200 fred ' ) -> 1200 REAL (' 1200fred ' ) -> returns a Note : Errors Synopsis POWer ( number1 , number2 ) -> real Description number1 number2 Side Effects Example POWER ( -2 , 3 ) -> -8 POWER ( -2inch , 2 ) -> 4in2 POWER ( 2inch, 3.5 ) -> returns 11.314 with an error (i.e. 2**3.5) Errors Synopsis SQrt ( number1 ) -> number Description Side Effects Example SQRT ( 4 ) -> 2.0 SQRT ( 4inch2 ) -> 2.0inch sqrt ( 4inch3 ) -> a warning and 256.02 which is sqrt (4*25.4mm) Errors Synopsis VVALue( variable_name ) -> number VVALue( variable_name , number ) -> number Description Note : Side Effects Example VVAL ( !array[1] ) -> 1.0 VVAL ( !array , 2 ) -> 0.0 Errors VTEXT (!var[1]) ) VTEXT ( !array ) )
Real array expressions
Real array expressions can contain attributes of type real array, for example: DESP.
Real array expressions
In real expressions the dimension of the result is tracked using: If at any time a value with no dimension occurs where a value with a specific dimension is needed then the value is taken to be one of that dimension in the current working units of that dimension (for example, mm for distances, degrees for angles). This will occur in addition and subtraction operations, and arguments for typed functions (for example,. trigonometric). Whenever a clash of physical quantity occurs then either a warning or an error will be raised (for example, SIN(25inch). In all expressions and functions physical quantities are tracked and the result, wherever possible is returned in the current units of the resultant physical quantity (dimension). If the system cannot do this (for example, the expression is not dimensionally sound, or the dimension exceeds the scope which the system can track) then a warning is issued and a simple numeric result is returned. When a user enters a literal value then the type of physical quantity is not known and the decision as to what it is determined to make it consistent with the context with respect to other values in the expression. When it is finally determined the value is then taken to be in the current units of that quantity. The method of this determination is normally straightforward and is described in specific sections above. The units for PML variables are also unknown. Where units are known and handled similarly in expression. To cope with ’unknown’ units each value remembers its original units internally. An attempt is then made to allow for ’unknown’ units across operators and within functions. In general the physical quantity of the result of a function, or expressions, is tracked by the system and the resulting value is one of the resultant physical quantities. For example multiplying 3 distances together gives a result of a volume which will have units such as gallons, litres or cubic ft. On comparison, addition or subtraction of two values then if one has units and the other has none (i.e. not a physical quantity) it is assumed to be the same sort of quantity as the other, and in the current units of that quantity. For example: If we are working in distance units of inches, it is known that XLEN is a distance value. Internally the value is held in mm, but the units are held as INCH. The units for ’10’ are held as unknown. On doing the comparison, the ’10’ is assumed to be inches and thus multiplied by 25.4 to make sure that the comparison works as expected. Special action is also taken to preserve the correct units across multiplication, division, POWER and SQRT, as described in the sections above. (XLEN GT 10). The dimension of any attribute values used (for example, XLEN, BANG, DENS, GVOL) The unit qualifiers of any values supplied The known result of any function (for example, ASIN returns an angle, POW, SQRT return a computed dimension, MIN/MAX that of their arguments etc.) The computed result of multiplication and division operation. (for example, GWEI/GVOL is a density) The need for consistency for addition and subtraction operations The dimension of any attribute values used (for example, XLEN, BANG, DENS, GVOL) The dimension of any attribute values used (for example, XLEN, BANG, DENS, GVOL) The unit qualifiers of any values supplied The unit qualifiers of any values supplied The known result of any function (for example, ASIN returns an angle, POW, SQRT return a computed dimension, MIN/MAX that of their arguments etc.) The known result of any function (for example, ASIN returns an angle, POW, SQRT return a computed dimension, MIN/MAX that of their arguments etc.) The computed result of multiplication and division operation. (for example, GWEI/GVOL is a density) The computed result of multiplication and division operation. (for example, GWEI/GVOL is a density) The need for consistency for addition and subtraction operations The need for consistency for addition and subtraction operations
Ids
IDs can be used in expressions. IDs can be any of the following: SPEC OF SPREF OF FLAN 1 OF NEXT BRAN. HEAD TUBE OF /BRAN1. Element name, for example: /VESS1. Refno, for example: =23/456. Element type further up the hierarchy, for example: SITE. Number within member list, for example: 3. Type and number within member list, for example: BOX 3. NEXT, PREV for next, previous within current list. Optionally with a count and/or element type, for example: NEXT 2 BOX, LAST CYL. NEXT, PREV MEMBER for next, previous within member list. Optionally with a count and/or element type. If the element type given is only valid as a member then MEMBER is assumed. For example, NEXT BOX at an EQUIPMENT will assume MEMBER. FIRST, LAST for first and last in current list. Optionally with a count and/or element type. FIRST, LAST MEMBER for first and last in member list. If the element type given is only valid as a member then MEMBER is assumed. END to navigate up from current list. END is similar to owner but not quite the same. For example, if the current element is a GROUP MEMBER, and it has been reached from the GROUP then END will return to the group but OWNE will go to the true owner. Attribute of type ref, for example: CREF SAME to mean last current element NULREF to mean =0/0 CE for the current element ’OF’ may be used to nest the options indefinitely. For example: SPEC OF SPREF OF FLAN 1 OF NEXT BRAN. This denotes the SPEC element owing the SELE element pointed to by the SPREF attribute on the first FLANGE of the next BRANCH. ILEAVE TUBE, IARRIV TUBE, HEAD TUBE, TAIL TUBE can be added to denote tube. For example: HEAD TUBE OF /BRAN1. An error will occur if there is no implied tube for the element concerned. ID arrays can also be used in expressions. For example, CRFA. Element name, for example: /VESS1. Element name, for example: /VESS1. Refno, for example: =23/456. Refno, for example: =23/456. Element type further up the hierarchy, for example: SITE. Element type further up the hierarchy, for example: SITE. Number within member list, for example: 3. Number within member list, for example: 3. Type and number within member list, for example: BOX 3. Type and number within member list, for example: BOX 3. NEXT, PREV for next, previous within current list. Optionally with a count and/or element type, for example: NEXT 2 BOX, LAST CYL. NEXT, PREV for next, previous within current list. Optionally with a count and/or element type, for example: NEXT 2 BOX, LAST CYL. NEXT, PREV MEMBER for next, previous within member list. Optionally with a count and/or element type. NEXT, PREV MEMBER for next, previous within member list. Optionally with a count and/or element type. If the element type given is only valid as a member then MEMBER is assumed. For example, NEXT BOX at an EQUIPMENT will assume MEMBER. If the element type given is only valid as a member then MEMBER is assumed. For example, NEXT BOX at an EQUIPMENT will assume MEMBER. FIRST, LAST for first and last in current list. Optionally with a count and/or element type. FIRST, LAST for first and last in current list. Optionally with a count and/or element type. FIRST, LAST MEMBER for first and last in member list. If the element type given is only valid as a member then MEMBER is assumed. FIRST, LAST MEMBER for first and last in member list. If the element type given is only valid as a member then MEMBER is assumed. END to navigate up from current list. END to navigate up from current list. END is similar to owner but not quite the same. For example, if the current element is a GROUP MEMBER, and it has been reached from the GROUP then END will return to the group but OWNE will go to the true owner. END is similar to owner but not quite the same. For example, if the current element is a GROUP MEMBER, and it has been reached from the GROUP then END will return to the group but OWNE will go to the true owner. Attribute of type ref, for example: CREF Attribute of type ref, for example: CREF SAME to mean last current element SAME to mean last current element NULREF to mean =0/0 NULREF to mean =0/0 CE for the current element CE for the current element ’OF’ may be used to nest the options indefinitely. For example: SPEC OF SPREF OF FLAN 1 OF NEXT BRAN. ’OF’ may be used to nest the options indefinitely. For example: This denotes the SPEC element owing the SELE element pointed to by the SPREF attribute on the first FLANGE of the next BRANCH. ILEAVE TUBE, IARRIV TUBE, HEAD TUBE, TAIL TUBE can be added to denote tube. For example: HEAD TUBE OF /BRAN1. This denotes the SPEC element owing the SELE element pointed to by the SPREF attribute on the first FLANGE of the next BRANCH. ILEAVE TUBE, IARRIV TUBE, HEAD TUBE, TAIL TUBE can be added to denote tube. For example: An error will occur if there is no implied tube for the element concerned. ID arrays can also be used in expressions. For example, CRFA. An error will occur if there is no implied tube for the element concerned. Note: Some of the ID syntax clashes with other types. To allow for this, an id expression may always be preceded with the keyword ID. For example, ID 3 will mean the third member of the current list rather than a number of value 3. Note :
Defining position
The basic ways of defining a position are: The Cartesian position may optionally be followed by WRT to specify the axis system. Refer to WRT. POS OF /VESS1 WRT /* or P1 POS OF /CYL2 N 45 W 20000 U 1000 N 1000 FROM /ATEST. N 1000 FROM P1 OF /BOX2. N 1000 FROM POSS OF /SCTN1 N (DESP[1] + 10) E Position attribute plus optional WRT. For example: POS OF /VESS1 WRT /* or P1 POS OF /CYL2 Cartesian position. For example: N 45 W 20000 U 1000 Cartesian position from an element. For example: N 1000 FROM /ATEST. Cartesian position from a ppoint. For example: N 1000 FROM P1 OF /BOX2. Cartesian position from an attribute. For example: N 1000 FROM POSS OF /SCTN1 Any numeric value within a position may itself be an expression. For example: the following is a valid position expression N (DESP[1] + 10) E Position attribute plus optional WRT. For example: POS OF /VESS1 WRT /* or P1 POS OF /CYL2 Position attribute plus optional WRT. For example: Cartesian position. For example: N 45 W 20000 U 1000 Cartesian position. For example: Cartesian position from an element. For example: N 1000 FROM /ATEST. Cartesian position from an element. For example: Cartesian position from a ppoint. For example: N 1000 FROM P1 OF /BOX2. Cartesian position from a ppoint. For example: Cartesian position from an attribute. For example: N 1000 FROM POSS OF /SCTN1 Cartesian position from an attribute. For example: Any numeric value within a position may itself be an expression. For example: the following is a valid position expression N (DESP[1] + 10) E Any numeric value within a position may itself be an expression. For example: the following is a valid position expression WRT WRT
WRT keyword
The WRT keyword is used to toggle between absolute and relative units. When we specify an element (or attribute of an element) we are specifying an absolute point in world space. The point can be given in world space or some other axis. Normally the answer is required relative to the owner axis system and this is taken as the default. For example: Q POS $ will return the position of the current element $ relatively to its owner. Q POS OF /EQUIP1 $ will return the position of EQUIP1 relative to its $ owner. Q POS $ will return the position of the current element $ relatively to its owner. Q POS OF /EQUIP1 $ will return the position of EQUIP1 relative to its $ owner. If we require the result in some other axis system then the WRT keyword is used. For example: Q POS WRT /* $.for the position in world coordinates. Q POS WRT /* $.for the position in world coordinates. When we specify a Cartesian coordinate we are dealing with a relative position. For example, ’N 10’ is meaningless until we specify the axis system, or default to an axis system. Again we use WRT to do this, although it is important to note that in this case we are going from a relative position to an absolute position (in the previous example WRT was used to go from an absolute position to a relative one). For example: N 100 WRT /BOX1 $ specifies an absolute position in world space $ which is N100 of /BOX1. N 100 WRT /BOX1 $ specifies an absolute position in world space $ which is N100 of /BOX1. The default is that Cartesian coordinates are in the owning element’s axis system. This absolute position can be expressed in different coordinate systems: the default is again the owner’s axis system. A SITE at (0,0,0) With default (World) orientation A ZONE at (100,0,0) With default (World) orientation An EQUIPMENT at (100,0,0) With orientation ’N IS E A BOX at (-100,0,0) With default (World) orientation The result of Q (N 100 WRT /BOX1), will depend on the current element. World (300,100,0), in World coordinates. Site (300,100,0) in World coordinates because the World is the owner of the current element. Zone (300,100,0) in World coordinates, because the Site is the owner of the current element, and the Site coordinates are the same as the World coordinates. Equipment (200,100,0), which is the position relative to its owner, the Zone. Box (100,100,0) which is the position relative to its owner, the Equipment. WRT can be further qualified by FROM. Q POS $ will return the position of the current element $ relatively to its owner. Q POS OF /EQUIP1 $ will return the position of EQUIP1 relative to its $ owner. Q POS WRT /* $.for the position in world coordinates. N 100 WRT /BOX1 $ specifies an absolute position in world space $ which is N100 of /BOX1. Item Comments A SITE at (0,0,0) With default (World) orientation A ZONE at (100,0,0) With default (World) orientation An EQUIPMENT at (100,0,0) With orientation ’N IS E A BOX at (-100,0,0) With default (World) orientation Location Result World (300,100,0), in World coordinates. Site (300,100,0) in World coordinates because the World is the owner of the current element. Zone (300,100,0) in World coordinates, because the Site is the owner of the current element, and the Site coordinates are the same as the World coordinates. Equipment (200,100,0), which is the position relative to its owner, the Zone. Box (100,100,0) which is the position relative to its owner, the Equipment. Note: The CONSTRUCT syntax uses the world as the default axis. Q POS Q POS OF /EQUIP1 Q POS WRT /* N 100 WRT /BOX1 Note : Q (N 100 WRT /BOX1)
WRT keyword
Two positions can be compared with EQ, NE, GT, LT, GE or LE. The pairs of coordinates are only compared in the coordinate axes for which the two positions are defined. A position attribute always has all three coordinates defined. For positions entered by you, only those coordinates which are given by you are defined. For example: ’N10U3’ $ only the Y and Z coordinates are defined, $ while the X coordinate remains undefined ’N10U3’ $ only the Y and Z coordinates are defined, $ while the X coordinate remains undefined For the EQ operator, all the pairs of defined coordinates should be equal. For NE, only one pair of defined coordinates need be different. For GT (LT,GE,LE), all the defined coordinates of the first position should be greater than (less than, greater than or equal to, less than or equal to) the defined coordinates of the second position. This means that GE is not the opposite of LT and LE is not the opposite of GT. If no coordinate of the two positions are defined for a common axis (e.g. ’N10’ and ’W4D7’), the result of the comparison is undefined. ’POS EQ W1S2D3’ $ This evaluates to true only if POS of the current $ element is (-1,-2,-3). ’POS GT N10’ or ’N10 LE POS’ $ Only the second coordinate of POS is compared; $ if it is greater than 10, then the result is true. ’E10N10 GT E0N0’ $ Is true because the inequality is verified for the X $ and Y axis (both coordinates are undefined for $ the Z axis, so it is ignored). ’E10N0 GT E0N0’ $ Is false because the Y components are different $ axes. ’E10N0 GT E0U100’ $ Is true. Although no comparison can be $ performed n either the Y or the Z axis, because $ the components are not present in both position $ constants, the comparison is true in the X $ component. ’N10 EQ W4D7’ $ Is undefined (no comparison is possible). ’POS EQ W1S2D3’ $ This evaluates to true only if POS of the current $ element is (-1,-2,-3). ’POS GT N10’ or ’N10 LE POS’ $ Only the second coordinate of POS is compared; $ if it is greater than 10, then the result is true. ’E10N10 GT E0N0’ $ Is true because the inequality is verified for the X $ and Y axis (both coordinates are undefined for $ the Z axis, so it is ignored). ’E10N0 GT E0N0’ $ Is false because the Y components are different $ axes. ’E10N0 GT E0U100’ $ Is true. Although no comparison can be $ performed n either the Y or the Z axis, because $ the components are not present in both position $ constants, the comparison is true in the X $ component. ’N10 EQ W4D7’ $ Is undefined (no comparison is possible). Refer to Precision of Comparisons, for tolerances in comparing numbers. ’N10U3’ $ only the Y and Z coordinates are defined, $ while the X coordinate remains undefined ’POS EQ W1S2D3’ $ This evaluates to true only if POS of the current $ element is (-1,-2,-3). ’POS GT N10’ or ’N10 LE POS’ $ Only the second coordinate of POS is compared; $ if it is greater than 10, then the result is true. ’E10N10 GT E0N0’ $ Is true because the inequality is verified for the X $ and Y axis (both coordinates are undefined for $ the Z axis, so it is ignored). ’E10N0 GT E0N0’ $ Is false because the Y components are different $ axes. ’E10N0 GT E0U100’ $ Is true. Although no comparison can be $ performed n either the Y or the Z axis, because $ the components are not present in both position $ constants, the comparison is true in the X $ component. ’N10 EQ W4D7’ $ Is undefined (no comparison is possible). Precision of Comparisons ’N10U3’ ’POS EQ W1S2D3’ ’POS GT N10’ or ’N10 LE POS’ ’E10N10 GT E0N0’ ’E10N0 GT E0N0’ ’E10N0 GT E0U100’ ’N10 EQ W4D7’ Precision of Comparisons ,
POLAR keyword
The POLAR keyword allows positions to be defined in terms of a distance in a particular direction from a point. If FROM is not specified the default is the origin of the owner. POLAR N 45 E DIST 20M FROM U 10 M POLAR AXES PL OF PREV DIST ( ABORE * 10 ) FROM PL OF PRE V POLAR N 45 E DIST 20M FROM U 10 M POLAR AXES PL OF PREV DIST ( ABORE * 10 ) FROM PL OF PRE V POLAR N 45 E DIST 20M FROM U 10 M POLAR AXES PL OF PREV DIST ( ABORE * 10 ) FROM PL OF PRE V POLAR dir DISTance expr -+- FROM -+- pos -----. | | | | ‘- point ---| | | ‘--------------------+---> POLAR dir DISTance expr -+- FROM -+- pos -----. | | | | ‘- point ---| | | ‘--------------------+---> POLAR N 45 E DIST 20M FROM U 10 M POLAR AXES PL OF PREV DIST ( ABORE * 10 ) FROM PL OF PRE V
Database Concepts
This reference manual describes in detail the structure and methods of the internal databases used within AVEVA E3D Design. It is written for System Administrators who may be involved in maintaining projects, and the databases from which they are created.
Project
Information is provided on project organization, the definition of teams and multiple database and the splitting of data across multiple databases.
Project Organization
In order to create data, you must first create a Project. A Project consists of: A project starts with just the System, Comms and Misc DBs. You will then have to create other DBs for users to work on. The various visible DB types are: System Contains details on DBs, Multiple Databases (MDBs), teams etc in the project Dictionary Contains User Defined Attribute (UDA) and User Defined Element Type (UDET) definitions Property Contains units for different properties Catalog Contains Catalog and specification information Model Contains Plant design information Draw Contains drawing information SPOOL Contains spool information Materials Contains hull material information Diagrams Contains Schematic information Transaction Used by Global to record transactions SCHEMATIC Contains PI&D (Schematic) information MANU Contains detailed manufacturing data NSEQ Stores name sequences System Contains details on DBs, Multiple Databases (MDBs), teams etc in the project Dictionary Contains User Defined Attribute (UDA) and User Defined Element Type (UDET) definitions Property Contains units for different properties Catalog Contains Catalog and specification information Model Contains Plant design information Draw Contains drawing information SPOOL Contains spool information Materials Contains hull material information Diagrams Contains Schematic information Transaction Used by Global to record transactions SCHEMATIC Contains PI&D (Schematic) information MANU Contains detailed manufacturing data NSEQ Stores name sequences Typically there will be many DBs of each type within a project. An example of a simple project is as follows: DBs may be included from other projects. Each DB has a unique DB number. User DBs have numbers in the range 1-7000. The range 7000-8000 is reserved for AVEVA supplied databases. The range 8000-8192 is reserved for system databases. The DB number is assigned to the DB on creation. You may specify the DB number. If not specified by you then the next available DB number is used. There may never be two DBs with the same DB number in a single project. Thus to include a DB from another project, that DB number must be unused in the target project. System Contains details on DBs, Multiple Databases (MDBs), teams etc in the project Dictionary Contains User Defined Attribute (UDA) and User Defined Element Type (UDET) definitions Property Contains units for different properties Catalog Contains Catalog and specification information Model Contains Plant design information Draw Contains drawing information SPOOL Contains spool information Materials Contains hull material information Diagrams Contains Schematic information Transaction Used by Global to record transactions SCHEMATIC Contains PI&D (Schematic) information MANU Contains detailed manufacturing data NSEQ Stores name sequences One each of System, Comms, and Misc Databases (DBs) Multiple Design, Catalog, Drawing, and Dictionary DBs Various picture files One each of System, Comms, and Misc Databases (DBs) One each of System, Comms, and Misc Databases (DBs) Multiple Design, Catalog, Drawing, and Dictionary DBs Multiple Design, Catalog, Drawing, and Dictionary DBs Various picture files Various picture files System Dictionary Property Catalog SPOOL Materials Diagrams Transaction
Teams and MDBs
For ease of working DBs are grouped into Teams and Multiple Databases (MDBs). A Database (DB) belongs to one team, but may be in many MDBs. You must specify the MDB to work on when entering AVEVA E3D Design. Details of DBs, teams, and MDBs are stored in the system database. An example is shown below. It can be seen that DB /A is only in MDB /X, whereas DB /B is in both MDB /X and /Y. Team access controls fundamental write access. Members of Team1 will always have write access to DBs /A and /B, and read access to the remainder. For members of Team2 it will be the opposite way around. If a DB is included from another project then it is always read only regardless of team membership. These concepts are discussed in detail in the Administrator User Guide. Administrator User Guide Administrator User Guide
Splitting Data Across Multiple Databases
Theoretically there need only be one Database (DB) of each DB type. The main reasons for there being more are: DBs are used as a fundamental means of access control. DBs are allocated to Teams, and only team members can modify a DB. Whilst the multiwrite facilities allow many writers per DB, it eases contention if the writers are not all accessing the same DB. The easiest way to run a Global project is to have different DBs writable at different locations. The granularity of propagation and distribution in Global is per DB It allows different permutations of Multiple Databases (MDBs). It allows specific DBs to be hidden from sub contractors Inclusion in other projects is done on a DB basis. DBs are used as a fundamental means of access control. DBs are allocated to Teams, and only team members can modify a DB. DBs are used as a fundamental means of access control. DBs are allocated to Teams, and only team members can modify a DB. Whilst the multiwrite facilities allow many writers per DB, it eases contention if the writers are not all accessing the same DB. Whilst the multiwrite facilities allow many writers per DB, it eases contention if the writers are not all accessing the same DB. The easiest way to run a Global project is to have different DBs writable at different locations. The easiest way to run a Global project is to have different DBs writable at different locations. The granularity of propagation and distribution in Global is per DB The granularity of propagation and distribution in Global is per DB It allows different permutations of Multiple Databases (MDBs). It allows different permutations of Multiple Databases (MDBs). It allows specific DBs to be hidden from sub contractors It allows specific DBs to be hidden from sub contractors Inclusion in other projects is done on a DB basis. Inclusion in other projects is done on a DB basis.
Database Elements
All data in a Dabacon database is stored in elements. Every element has a type, for example BOX. The type of element determines the attributes available on the element. Each DB type allows a different set of element types. Database attributes are described in Database Attributes The elements are organized in a primary hierarchy. This is described in Database hierarchy. BOX BOX
Reference Number
Every element has a reference number, which is assigned when the element is created, and is unique to that element within the project. The reference number comprises two 32 bit integers. This is displayed in the form: The first integer encodes the database number. This can be queried on the command line using Q DBNUMBER. The second integer is a sequence number, starting at 0, and incrementing each time an element is created. Thus, for example, the element with a reference number of =8193/0 will be the WORLD element (since this is always created first) created in Database (DB) 1. The reference number is never changed once an element has been created.
Name
In AVEVA E3D Design any element may be given a name. The name always starts with a '/'. At the user level, it is this name that is typically used to identify an element. Names may of course be changed, thus there is no guarantee that the element named '/FRED' today is the same as the element named '/FRED' yesterday. An element need not have a name. For these elements AVEVA E3D Design creates a constructed name, consisting of the relative position in the hierarchy up to the first named element. for example, BOX 2 OF SUBEQUIPMENT 1 OF /VESS1 Whilst the constructed name can be used to identify elements, its use is even more volatile than named elements, since the order of an element in a member's list may change. You can duplicate the name of an element in a Design (DESI), Production (MANU), Schematic (SCHE) or Engineering (ENGI) databases in the current MDB. For example an element can be named `/FRED´ in the DESI database and a different element can be named ´/FRED´ in the MANU database. AVEVA E3D Design is case sensitive and AVEVA recommends you stick to UPPERCASE characters. If you create an element named /FRED and at some later time you try to find it by typing /fred or /FreD, it will not be found.
Current Element
At the user level there is a concept of current element. Most AVEVA E3D Design commands act on the current element. This is often referred to as the CE. There is an extensive set of commands to navigate around the database changing the CE.
Change Element Types
For most elements, the element type may never be changed after creation. For example, once created, an element of type SITE will always be of type SITE until deleted. There are a few exceptions to this rule where it makes sense. For example, BENDs may be changed to ELBOs and vice versa.
Primary Database Hierarchy
Information is provided on the hierarchical data model, the user defined hierarchies, the element instances and the use case of primary hierarchy.
Hierarchical Data Model
Each database consists of a hierarchy of elements. The allowed hierarchy is defined in a Database Schema. The database schema is the 'meta data', i.e. it is data about data. Database Schemas cannot be modified by users. The Database Schema for each database type is listed in the data model reference manual. An example of part of the Database Schema for Model databases is shown below: This schema shows which elements are allowed where. For example, a WORLD may own a SITE, or GROUPWORLD, whereas a SITE may own a ZONE, BOUNDARY, DRAWING or GROUND model. The same element type may occur in more than one place in the schema. In the above example it can be seen that a BOUNDARY element may occur below a SITE or a ZONE. All database schemas have a WORLD element at the root.
User Defined Hierarchies
The database schemas in AVEVA E3D Design are fixed by AVEVA. You may, however, customize the allowed hierarchy using User Defined Element Types (UDETs). A UDET must be based on an existing system type. For example, you may define a UDET :PUMP which is based on an Equipment. By default, a UDET will have the same allowed members and allowed owners as a base type. This can be customised to be a subset of that allowed on the base type, for example, you might decide that SUBE are not allowed under a :PUMP even though they are allowed under an Equipment (EQUI). UDETs based on zones may own other UDETs based on zones. This allows very flexible data models to be built.
Element Instances
A new database (DB) starts with a single world element with name '/*'. Users will then create instances of other element types. For example, a system user might create an initial hierarchy of sites and zones in a Model DB, leaving it to other users to create the actual Plant items. An element instance will always be created within the primary hierarchy. For example, a new ZONE element must be created under an existing SITE. It cannot be created as a 'freestanding' element outside the existing hierarchy. The actual element hierarchy can be viewed with the AVEVA E3D Design explorer. All element instances within a multiple Database (MDB) are accessible at all times.
Where the Primary Hierarchy is Used
The primary hierarchy is used as follows: It is used to create the 'constructed' name for unnamed elements. When an element is deleted, all descendants in the primary hierarchy are deleted. The COPY command will copy an element and all its primary descendants. Claiming elements relies on the primary hierarchy. Collections work on the primary hierarchy. Most commands assume that the action is to be performed on the given element and its descendants in its primary hierarchy, for example,. adding a ZONE to a 3D view will add everything below that ZONE. In the Design Database (DB), world positions and orientations are concatenated according to the primary hierarchy. It is used to create the 'constructed' name for unnamed elements. It is used to create the 'constructed' name for unnamed elements. When an element is deleted, all descendants in the primary hierarchy are deleted. When an element is deleted, all descendants in the primary hierarchy are deleted. The COPY command will copy an element and all its primary descendants. The COPY command will copy an element and all its primary descendants. Claiming elements relies on the primary hierarchy. Claiming elements relies on the primary hierarchy. Collections work on the primary hierarchy. Collections work on the primary hierarchy. Most commands assume that the action is to be performed on the given element and its descendants in its primary hierarchy, for example,. adding a ZONE to a 3D view will add everything below that ZONE. Most commands assume that the action is to be performed on the given element and its descendants in its primary hierarchy, for example,. adding a ZONE to a 3D view will add everything below that ZONE. In the Design Database (DB), world positions and orientations are concatenated according to the primary hierarchy. In the Design Database (DB), world positions and orientations are concatenated according to the primary hierarchy.
Secondary Hierarchies
An element can only exist once in the primary data hierarchy. Secondary hierarchies, such as Group Sets (GPSETs), allow elements to appear more than once in the overall hierarchy. For example a PIPE will appear below a ZONE in the primary hierarchy. The same PIPE may also be added to a GPSET element. This is useful for collecting elements according to different criteria. The diagram below shows a typical multi hierarchy where the secondary links are dotted. Most commands will work on secondary hierarchies. For example, if /GPSET1 is added to a 3D view then this is equivalent to adding both /VESS1 and /PUMP2 to the 3D view. However, there are exceptions to this. In particular deleting a GROUP will not delete the GROUP members; thus deleting /GPSET1 will not delete /VESS1 and /PUMP2. Unlike the Primary hierarchy, secondary hierarchies may span different databases (DBs).
Database Attributes
Every element may have a number of attributes. All elements have the following attributes: NAME the element's name TYPE the element's type LOCK if set, then the element may not be modified OWNER the element's owner MEMBERS the current members of the element NAME the element's name TYPE the element's type LOCK if set, then the element may not be modified OWNER the element's owner MEMBERS the current members of the element The remaining attributes vary depending on the element type. The Database Schema defines which attributes are available on an element type. The allowed attributes for an element type may be ascertained using Programmable Macro Language (PML) objects and other command queries. Attributes may be one of the following types: Ref Ref Array Position Direction Orientation Attribute ElementType (or Noun) A 'Ref' type is a pointer to another element. For example, on a BRANCH element the Connection Reference (CREF) attribute points to the connected NOZZLE. The use of Ref attributes enables AVEVA E3D Design to model networks and other cross relationships. The attribute type dictates how the attribute can be set with PML or specific syntax. NAME the element's name TYPE the element's type LOCK if set, then the element may not be modified OWNER the element's owner MEMBERS the current members of the element Integer Ref Integer Array Ref Array Real Position Real Array Direction Bool (or Logical) Orientation Bool (or Logical) Array Attribute String (or Text) ElementType (or Noun) NAME TYPE LOCK OWNER MEMBERS
User Defined Attributes
You can extend the allowed attributes for any element type, including a /ser Defined Element Type (UDET), by defining User Defined Attributes (UDAs). For example, you could define a UDA called :SUPPLIER of type string on all piping components. The newly defined UDA will then exist on all applicable elements, existing and new. If the definition of a UDA is changed then this will also apply to all existing instances. Having defined a UDA, it is accessed in the same way as any other attribute.
Pseudo Attributes
In addition to the attributes stored on the database, there are a large number of pseudo attributes. The value of pseudo attributes is calculated at the time of making the query. For example, the CUTLENGTH attribute on SCTN elements is a pseudo attribute calculated at the point of doing the query. There is a lot of functionality presented via pseudo attributes. Currently there are over 1200 pseudo attributes. Since the value of a pseudo attribute is calculated from other attributes, it is not generally possible to set their value directly.
Global Namespace for Attribute and Element Type Names
Attributes and element types have a global name space. This means that an attribute such as XLEN will have an identical meaning wherever it exists. Similarly if an element type is valid in more than one database type, the definition of the element type will be identical in each.
Attributes of Physical Quantities
Some real attributes are simply numbers, counts, quantities etc. Others represent real physical quantities such as distances, areas, densities, angles etc. The type of physical quantity is called its physical dimension, often shortened in unambiguous contexts to its dimension. Real attributes (stored, derived, user defined etc.) can all be assigned a physical dimension and this determines the type of data stored in these attributes wherever and whenever they occur in the database. The most common dimensions of attributes are of length (internally set to either DIST or BORE). There are many others supported including density, mass, pressure, temperature, area, volume and angle. The dimension of an attribute is held in the database in its (ambiguously named) UNIT field. It may be queried directly using the VAR ATTDEF attributeName UNIT syntax, and the !attribute.units() PML ATTRIBUTE object method, refer to PML ElementType Class. PML ElementType Class PML ElementType Class
Database Expressions and Rules
Information is provided on database expressions and rules to define a database.
Expressions
Database expressions can be of the following types: The contents of an expression may contain the standard operator and mathematical functions along with the names of attributes and element identification. This expression simply multiplies the three attributes XLEN, YLEN, ZLEN together and then multiplies by two. The attributes refer to the current element. If attributes of other elements are required then the OF syntax is used. The 'OF' keyword makes sure that the AREA attribute is obtained from the owner of the current element rather than the current element itself. The main uses of expressions are: Database expressions are very similar to Programmable Macro Language (PML) expressions. The major difference is that database expressions may not contain other PML variables or functions. For example, (XLEN * !MYVAR) is not a valid database expression. (XLEN * YLEN * ZLEN * 2) (PURP EQ 'HS' AND AREA OF OWNER EQ 1) algebraic boolean (or logical) text Element ID position direction orientation algebraic algebraic boolean (or logical) boolean (or logical) text text Element ID Element ID position position direction direction orientation orientation Catalog parameterization Template parameterization Rules Drafting line styles User level collections and report Catalog parameterization Catalog parameterization Template parameterization Template parameterization Rules Rules Drafting line styles Drafting line styles User level collections and report User level collections and report
Rules
An attribute may be defined as a rule. For example, the attribute XLEN may be defined as a rule by the expression (YLEN * 2). The OF syntax is often used in Rule expressions to refer to other elements, for example, (YLEN OF /FRED * 2) The result of the rule is stored against the attribute as for other attributes. There are commands to recalculate the rule. Rules may be either static or dynamic. If static, then the rule result will only be recalculated on demand. If dynamic, then the result will be recalculated every time an attribute within the expression changes, for example, for the above rule, if YLEN is modified, then XLEN will be recalculated automatically. The dynamic linkage of rules may be across elements and across Databases (DBs).
Dumping out the Database
Information is provided on the possibilities to dump out the database using data listings and the Reconfigurer.
Data Listings
Data listings (DATALs) capture the state of the database in the form of AVEVA E3D Design commands. All element data including all attributes, User Defined Attributes (UDAs) and rules will be captured. They are similar in concept to Extensible Markup Language (XML) output. These files can then be read back in via the command line. Data listings are used as follows: Long term archiving Copying parts of a Database (DB) between projects For general information. Long term archiving Long term archiving Copying parts of a Database (DB) between projects Copying parts of a Database (DB) between projects For general information. For general information.
Reconfigurer
Reconfigurer is similar to Data Listing (DATAL) in that it dumps out the state of the data. The data can be dumped to either binary or text file. Using binary files is quickest. Reconfigurer is faster than DATAL and is recommended if whole DBs or world level elements are to be transferred. DATAL or the copy facilities is recommended if lower level elements are to be transferred.
Database Modifications
The fundamental modifications allowed are: Element creation Element deletion Element copy Element move Attribute modification Element creation Element creation Element deletion Element deletion Element copy Element copy Element move Element move Attribute modification Attribute modification
Data Access Control (DACs)
Data Access Control (DAC) is the mechanism that protects information handled by the system from accidental or unauthorised manipulation. The basic access control available is known as 'Team Owning Databases'. It implements access control on database level by simply giving the members of the team owning the database full access and others read-only to data held in particular databases. A more sophisticated access control is implemented in the form of Access Control Rights (ACRs). ACR allows the administrator of the system to apply a more fine grained access control over the model. The following figure illustrates the DAC database hierarchy. An ACR is defined through two entities: A PEROP defines the access rights given for a number of pre-defined operations for one or more elements. One or more ACRs may be assigned to a user granting and denying access to the model. For a user to gain update access to a particular element two rules apply: Management tools are available for DAC through the Admin module. Control of DAC is also available through Programmable Macro Language (PML). A PEROP consists of three parts: The PEROP may further restrict the elements it applies to by a qualifying condition. The qualifying conditions is an AVEVA E3D Design statement that should evaluate to true to qualify the PEROP. The following operations are available through PEROPs Each of these operations may be set to Allow The operation is permitted Disallow The operation is not permitted Ignore The PEROP does not define whether this operation is permitted or not Allow The operation is permitted Disallow The operation is not permitted Ignore The PEROP does not define whether this operation is permitted or not Optionally the PEROP may further restrict which attributes it allows modification to by specifying a list of attributes that it either includes or excludes from allowing modification to. The PEROP also holds the message that the system will issue if the PEROP denies attempted operation. Allow The operation is permitted Disallow The operation is not permitted Ignore The PEROP does not define whether this operation is permitted or not A ROLE, which is a collection of rules called Permissible Operations (PEROPs). A SCOPE, which defines to what part of the model the ROLE applies. The SCOPE may be an expression, for example, all ZONE WHERE (FUNC eq 'TEAMA') A ROLE, which is a collection of rules called Permissible Operations (PEROPs). A ROLE, which is a collection of rules called Permissible Operations (PEROPs). A SCOPE, which defines to what part of the model the ROLE applies. The SCOPE may be an expression, for example, all ZONE WHERE (FUNC eq 'TEAMA') A SCOPE, which defines to what part of the model the ROLE applies. The SCOPE may be an expression, for example, all ZONE WHERE (FUNC eq 'TEAMA') At least one PEROP in a ROLE assigned to a USER must grant the update operation. No one PEROP must explicitly deny the operation. At least one PEROP in a ROLE assigned to a USER must grant the update operation. At least one PEROP in a ROLE assigned to a USER must grant the update operation. No one PEROP must explicitly deny the operation. No one PEROP must explicitly deny the operation. The Element it applies to The operations which can be performed on those elements Optionally the Attributes that may be modified. The Element it applies to The Element it applies to The operations which can be performed on those elements The operations which can be performed on those elements Optionally the Attributes that may be modified. Optionally the Attributes that may be modified. Create Modify Delete Claim Issue Drop Output Export Copy Create Create Modify Modify Delete Delete Claim Claim Issue Issue Drop Drop Output Output Export Export Copy Copy Allow Disallow Ignore
Errors Applicable to all Modifications
The following checks are applied to all modifications: The claiming process is described in Claiming Elements. Check access control Check that the DB is open in write Check that the element's LOCK flag is false If a multiwrite Database (DB) then do a claim check, and claim if needed Check access control Check access control Check that the DB is open in write Check that the DB is open in write Check that the element's LOCK flag is false Check that the element's LOCK flag is false If a multiwrite Database (DB) then do a claim check, and claim if needed If a multiwrite Database (DB) then do a claim check, and claim if needed
Integrity of Modifications
The engineering integrity is always maintained for any database modification. The integrity checks are applied below the database interface. Thus modifying the database is always safe whether done via PML commands or C#. The checks are applied to individual attributes and element types. For example the OBST attribute can only ever be set to 0,1 or 2. AVEVA E3D Design will always check that this is the case prior to allowing the modification.
Element Creation
Elements may be created. They are always created one at a time, and may only be created at a legitimate point in the primary hierarchy. On creation, a unique reference number will be assigned. The method by which the default reference number is generated is described in User Defined Hierarchies. It is possible to create an element with a specified reference number, provided it is unused and valid for the Database (DB). This functionality is provided for certain specialized situations (such as recreating an exact copy of a DB, so that all references to elements from other DBs remain valid), and is not recommended for general use. The attributes will be set to their default values. In some cases the default attribute values are cascaded down from the owning element. User Defined Hierarchies User Defined Hierarchies
Element Deletion
Elements may be deleted. All elements below the deleted element in the primary hierarchy will also be deleted. Reference numbers of deleted elements are never reused.
Element Copy
Elements may be copied. There are options to copy a single element or an element and all its descendants. Elements may be copied between Databases (DBs). Any cross references entirely within the copied structure will be updated to point to the newly created elements. Elements are always copied on top of an existing element of the same type. There are various options on the copy command to allow: Additional potential errors at create are: The copied elements to be renamed according to a given criteria Whether any attribute rules are to be rerun on the copied element. (Rules are described in Reconfigurer) The copied elements to be renamed according to a given criteria The copied elements to be renamed according to a given criteria Whether any attribute rules are to be rerun on the copied element. (Rules are described in Reconfigurer) Whether any attribute rules are to be rerun on the copied element. (Rules are described in Reconfigurer) The element may not be copied to an element of a different type The element may not be copied to an element of a different type The element may not be copied to an element of a different type Reconfigurer Reconfigurer
Element Move
Elements may be moved to a different point in the Database (DB) or to a different DB. The Element and all its descendants will be moved. If the element is moved to a different DB, then its reference number is changed. All reference attributes pointing to the moved structure will be updated. Additional potential errors at move are: The element is not allowed in the members list of the new owner The element is not allowed in the members list of the new owner The element is not allowed in the members list of the new owner
Attribute Modification
The following checks are applied when modifying attributes: Sometimes modifying one attribute will actually cause a number of attributes to change. There are two main cases where this might happen: The integrity of cross referenced attributes is maintained when one end of the connection is changed. Changing one end of a connection will also change the following: In essence, changing one value may result in four elements being updated. For example, consider the following: After setting the CREF on /N1 to /B1, the end result is:
Effect of Modifications on Dynamic Rules
A dynamic rule will automatically respond to changes which affect the attributes referred to in the rule. For example, we set a rule on YLEN of /MYBOX to be (YLEN OF /FRED * 2). Thus if YLEN on /FRED changes then YLEN on /MYBOX will be updated automatically. However there are reasons why the automatic propagation of dynamic rules may fail, as follows: Note also that only static rules are not automatically updated. For these reasons there are commands to verify that rule results are up to date.
Database Sessions
Information is provided on the handling of a session, for example, defining a session by saving or getting the work, creating a stamp, displaying the session history, setting a comparison date and merging changes.
Savework/Getwork
Data is only saved to the database on demand. Similarly you will only see changes made by others on demand. In order to make changes visible to other users two steps must occur: For most applications, the save-work/get-work actions are totally in the hands of the user. Save work Get work
Sessions
When a savework is made a new session will be created on the database. The changed data will always be written to the end of the file. This represents the 'delta' from the previous session. Details such as date, user, session description are stored as part of the session data. There is always a pointer from the database header to the last session on the database. Internally there is a linked list between sessions. It is worth reiterating that once a session is written, it will never be changed. Thus if a user is looking at session 19, then his view of the data will never change in any way regardless of any sessions created by other users. If you do want to see the changes made by others then you must do a 'Getwork'. 'Getwork' will always reposition you to view the latest session. Thus in the above example if a user originally looking at session 19 did a Getwork then he would now be looking at session 39.
Session History
The Database will preserve the full session history. Thus at any point it is possible to find out what was changed when and by whom. The system can report on changes down to the attribute level. The list of facilities include: The DIFF command can be used to report on changes. For example, if you were to modify a couple of attributes on an equipment, and add a new primitive, then the DIFF command could be used to report on the changes. The output from the command might be: By default, the DIFF command will report the changes made by you in the current working session, that is to say, since the last savework. It is also possible to specify a given session number, a date and time, or a stamp (refer to Create a Stamp) in order to see the differences since then. The OUTPUT command may be used to record changes since a given session. The Data Listing (DATAL) file will then contain the commands that reproduce the updates made since the given session. The file can then be read back in to reproduce the changes. This is convenient where bits of data have been copied between projects, and the copied data needs to be updated with changes made to the original. Reverse changes can also be output. The DATAL file will then contain the commands that remove the updates made since the given session. This is a convenient way for restoring part of a model back to how it was at an earlier point. /VESS1 /VESS1 [=15752/201] has been modified List member /EXTRACYL created Comparing elements to an old session Dataling out changes since a given session Setting a comparison session Creating a stamp Various pseudo attributes Comparing elements to an old session Comparing elements to an old session Dataling out changes since a given session Dataling out changes since a given session Setting a comparison session Setting a comparison session Creating a stamp Creating a stamp Various pseudo attributes Various pseudo attributes Local comparison for Database items /VESS1 /VESS1 [=15752/201] has been modified Member list has changed List member /EXTRACYL created Description has changed Old value= my description New value= my new description Area has changed Old value= 999 New value= 100 /EXTRACYL [=15752/1326] has been created 2 changed elements found Local comparison for Database items /VESS1 /VESS1 [=15752/201] has been modified Local comparison for Database items Member list has changed List member /EXTRACYL created Member list has changed Description has changed Old value= my description New value= my new description Description has changed Area has changed Old value= 999 New value= 100 Area has changed /EXTRACYL [=15752/1326] has been created 2 changed elements found /EXTRACYL [=15752/1326] has been created Create a Stamp Create a Stamp
Create a Stamp
It is often convenient to mark a set of Databases (DBs) at particular milestones in the project. The 'Stamp' functionality allows this. It is then straight forward to find out what has changed since the stamp, or to view the data as it was at that time. Stamps can only be created within Admin.
Set a Comparison Date
Within AVEVA E3D Design a comparison date can be set. A convenient way of doing this is to use a stamp. However the comparison date may also be set to an explicit session on a particular extract. If the comparison session is on a different extract then the extract must be an ascendant of the current extract. Any query may then be done at the old session using the 'OLD' keyword. for example: This would return the value of XLEN at the comparison session. There are a number of pseudo attributes that can be used to do comparisons. These are listed in the database reference manual. Q OLD XLEN
Merge Changes
As a result of storing all changes, AVEVA E3D Design databases will grow relatively quickly. You may compress a Database (DB) to reduce its size by merging multiple sessions together using the MERGE CHANGES command in Admin. You may compress all sessions, or a range of sessions. Any sessions used in stamps will always be preserved. Thus before compressing a DB you should create stamps to preserve any comparison points that might be needed. Sessions 1,2 and the last session are also always preserved. Thus for the previous example, if you decide to do a MERGE CHANGES on a database having set a stamp on session 10, the resultant DB will look like: It can be seen that as well as sessions 10, sessions 1,2 and 39 are kept. The changes in session 10 now hold the accumulated changes for sessions 3-10, and Session 39 actually holds the accumulated changes for sessions 11 to 39. The MERGE CHANGES command is discussed in the ADMIN manual. MERGE CHANGES
Multiwrite Working
Database Constructor (Dabacon) DBs may be either 'UPDATE' or 'MULTIWRITE. UPDATE DBs allow only one user to have write access at any given time, although multiple users may still have simultaneous read access. MULTIWRITE DBs allow multiple simultaneous users with write and read access.
Multiwrite Strategy
The Database employs two techniques to allow multiple writers. A claiming mechanism - User must claim an element at the point of making a modification. This will lock the element preventing other users making modifications. A Last Back Wins strategy- For some changes a 'last back win' strategy is used rather than claim locks. With this strategy two users may change the same element. Any changes are merged back in. The merging is done at the attribute level. If two users change the same attribute then the last save wins. Places where this strategy is used are: Some connection attributes. for example, changing a TREF attribute on a branch does not require the BRANCH to be claimed. Member lists containing primary elements are always merged back. For example, creating a ZONE below a SITE doe NOT require the SITE to be claimed, Changes issued from variant extracts are always merged back in. Dynamic rule linkage Spatial map values Some connection attributes. for example, changing a TREF attribute on a branch does not require the BRANCH to be claimed. Some connection attributes. for example, changing a TREF attribute on a branch does not require the BRANCH to be claimed. Member lists containing primary elements are always merged back. For example, creating a ZONE below a SITE doe NOT require the SITE to be claimed, Member lists containing primary elements are always merged back. For example, creating a ZONE below a SITE doe NOT require the SITE to be claimed, Changes issued from variant extracts are always merged back in. Changes issued from variant extracts are always merged back in. Dynamic rule linkage Dynamic rule linkage Spatial map values Spatial map values
Claim Elements
The level of claiming is at the 'primary' element level. Examples of primary element types are SITE, ZONE, EQUI, SUBE. Examples of non primary elements are primitives such as BOX. When you need to modify a non primary element then the first primary element up the hierarchy must be claimed out. For example, to modify a BOX, then the owning EQUI or SUBE must be claimed. When working on multiwrite Databases (DBs), users may either explicitly claim elements to work on, or let the system implicitly claim elements for them. The implicit claim will occur at the point of making a modification. There are a number of reasons why an element may not be claimed: If a list of elements is claimed, and some in the list fail, then the remaining elements will still be claimed.
Release Elements
Having claimed an element, a user may release it, thus allowing others to change it. An element may not be released if changes are outstanding. You must do a SAVEWORK first. On leaving a module all elements will be released for that user. If a list of elements is released, and some in the list fail, then the remaining elements will still be released.
Performance Considerations
Every time a claim/release is made the underlying Database (DB) is accessed. To minimize such access, as many elements as possible should be done in one go.
Potential Conflicts at SAVEWORK/GETWORK in a Multiwrite Environment
There are a number of potential problems which are not discovered until SAVEWORK or GETWORK. If any error occurs at SAVEWORK or GETWORK then the entire operation is aborted.
Extracts
Extracts are an extension of the multiwrite facilities. The extra functionality offered by extracts is: They allow long term claims, that means, elements are not released on module switch. The issuing of data is separated from SAVEWORK. A partial set of changes may be issued, rather than the whole lot. A partial set of changes may be dropped, hence losing the changes. Allows variants to be tried and maintained. Allows a 'last back wins' when issuing from variants Users may have their own private work space. Users can use extracts to implement an approval/work cycle, so that. the issuing of data from one extract to another could correspond to given criteria being met. Other users could then read the approved data rather than the working data. They allow long term claims, that means, elements are not released on module switch. They allow long term claims, that means, elements are not released on module switch. The issuing of data is separated from SAVEWORK. The issuing of data is separated from SAVEWORK. A partial set of changes may be issued, rather than the whole lot. A partial set of changes may be issued, rather than the whole lot. A partial set of changes may be dropped, hence losing the changes. A partial set of changes may be dropped, hence losing the changes. Allows variants to be tried and maintained. Allows variants to be tried and maintained. Allows a 'last back wins' when issuing from variants Allows a 'last back wins' when issuing from variants Users may have their own private work space. Users may have their own private work space. Users can use extracts to implement an approval/work cycle, so that. the issuing of data from one extract to another could correspond to given criteria being met. Other users could then read the approved data rather than the working data. Users can use extracts to implement an approval/work cycle, so that. the issuing of data from one extract to another could correspond to given criteria being met. Other users could then read the approved data rather than the working data.
Create Extracts
Extracts are created from existing multiwrite Databases (DBs). The existing DB then becomes the Master DB. Many extracts may be created off the same Master DBs. Extracts may also be created from other extracts. The term extract family is used to refer to all extracts created directly or indirectly off a Master DB. Example of an extract family: In this extract family, three extracts were created below the Master DB. Two further extracts were then created below Extract1. There may be up to 8000 extracts in an extract family. Extracts may be included in an Multiple Database (MDB) as for any other DB. Two extracts from the same extract family cannot be included in the same MDB.
Restrictions on Extracts
It is not be possible to: COPY an extract INCLUDE an extract from a foreign project without its parent extract being included first. EXCLUDE an extract/DB unless all child extracts have been excluded. COPY an extract COPY an extract INCLUDE an extract from a foreign project without its parent extract being included first. INCLUDE an extract from a foreign project without its parent extract being included first. EXCLUDE an extract/DB unless all child extracts have been excluded. EXCLUDE an extract/DB unless all child extracts have been excluded.
Extract Sessions
An extract will have its own set of sessions. This is illustrated below: In this example the extract Database (DB) was created when the Master DB had 19 sessions. The extract thus represents a branching of the model from session 19. Changes were then made to the Master and to the Extract. The Extract has had nine more sessions created (sessions 2-10). The Master has had 20 more sessions added (sessions 20 - 39). Changes made to an extract can be flushed back to the Master DB. Similarly the extract may be refreshed with changes made to the Master.
MERGE CHANGES on Extracts
When a 'MERGE CHANGE' operation is performed on a DB with extracts, all the lower extracts have to be changed to take account of this. Thus doing a 'MERGE CHANGE' on a DB with extracts should not be undertaken lightly. The opposite is not needed, i.e. MERGE CHANGES on a child does not require the parent extract to be merged. The following restrictions apply to MERGE CHANGES: To minimize the sessions preserved in (1) it is suggested that a bottom up approach is followed when doing 'MERGE CHANGES'.
Extract Claims/Releases
In order to modify an element in an extract, the element must be claimed to the extract. The principals of extract claiming are exactly the same as standard claiming, i.e, the granularity of extract claims is at the level of primary elements. Extract claims will work up through the extract levels, extract claiming as necessary, i.e, you need not do a separate claim for each level of extract. For example, consider a three level extract as follows: If a user does an extract claim to the Working Extract the following logic will be used: Is element claimed out to WORKING already? -if YES do nothing -if NO Is element claimed to APPROVED extract? -if NO Claim from ASBUILT to APPROVED Then claim from APPROVED to WORKING -if YES- Claim from APPROVED to WORKING Is element claimed out to WORKING already? -if YES do nothing -if NO Is element claimed to APPROVED extract? -if NO Claim from ASBUILT to APPROVED Then claim from APPROVED to WORKING -if YES- Claim from APPROVED to WORKING The extract claim may fail for the same reasons that a user claim may fail, i.e.: Unlike user claims, extract claims stay with the extract across SAVEWORKs. If a list of elements is extract claimed, and some in the list fail, then the remaining elements will still be extract claimed. Is element claimed out to WORKING already? -if YES do nothing -if NO Is element claimed to APPROVED extract? -if NO Claim from ASBUILT to APPROVED Then claim from APPROVED to WORKING -if YES- Claim from APPROVED to WORKING Another user/extract has the item claimed The element is modified in a later version, hence a refresh is needed first. Another user/extract has the item claimed Another user/extract has the item claimed The element is modified in a later version, hence a refresh is needed first. The element is modified in a later version, hence a refresh is needed first.
Extract Release
Extract claims may be released in the same way as user claims. An extract release will not be permitted if: If a list of elements is extract released, and some in the list fail, then the remaining elements will still be extract released.
User Claims/Releases on an Extract
An extract is itself a multiuser Database (DB), thus more than one user may work on an extract. Standard user claims and releases are thus also applicable to extracts
Variants
Variants are like standard extracts except that there is no extract claiming of elements between the variant and its parent extract. Any elements may thus be modified. This has the advantage that many users can potentially change the same element at the same time in a different variant. The disadvantage is that conflicts are not discovered until the time of flush. There are no restrictions on where variants are located in the extract tree, for example, variants may own other normal extracts or other variant extracts. If a variants owns standard extracts, then the variant acts as a root for subsequent extract claims.
Extract Operations
The following operations are allowed: Drop This is the process of losing modifications done locally on an extract combined with the transfer of write extract back to the parent extract. Partial Drop This is the process of losing modifications done locally on a subset of elements, combined with the transfer of write extract back to the parent extract. Issue The local changes are copied to the parent extract, and the elements are released. Flush This term is used for issuing without doing a release. Partial Issue The Issuing of a subset of the modifications made in the current extract to the parent extract. Refresh The mechanism by which an extract is updated with changes made in the parent Database (DB). Drop This is the process of losing modifications done locally on an extract combined with the transfer of write extract back to the parent extract. Partial Drop This is the process of losing modifications done locally on a subset of elements, combined with the transfer of write extract back to the parent extract. Issue The local changes are copied to the parent extract, and the elements are released. Flush This term is used for issuing without doing a release. Partial Issue The Issuing of a subset of the modifications made in the current extract to the parent extract. Refresh The mechanism by which an extract is updated with changes made in the parent Database (DB). The refresh functionality is needed since users work on a constant view of the parent extract DB. Thus they will not see other users' issues until they do a REFRESH. It is akin to the GETWORK functionality in a single multiwrite DB. All flushing, issuing, releasing and dropping operations work on one level of extract only. A Refresh can be done all the way up the tree using just one command. If an extract operation fails, then the entire operation is aborted. Drop This is the process of losing modifications done locally on an extract combined with the transfer of write extract back to the parent extract. Partial Drop This is the process of losing modifications done locally on a subset of elements, combined with the transfer of write extract back to the parent extract. Issue The local changes are copied to the parent extract, and the elements are released. Flush This term is used for issuing without doing a release. Partial Issue The Issuing of a subset of the modifications made in the current extract to the parent extract. Refresh The mechanism by which an extract is updated with changes made in the parent Database (DB). Drop Partial Drop Issue Flush Partial Issue Refresh
Merge Algorithm
On issue or flush, changes made in an extract will be merged back to the parent extract. The basic approach is that any changes made to the extract are applied to the parent extract, as shown below: The granularity of this merge is at the attribute level, which means, two users can change different attributes on the same element and merge their changes together. If they modify the same attribute then a 'last back win' strategy is used. AVEVA E3D Design makes sure that all merges are valid at the raw database level, so that, the data will be Database Integrity Checker (DICE) clean. However it is not possible to make sure that the data is consistent in engineering terms. Thus it is highly recommended that when variant data is flushed back, Data Consistency Checking Utility (DATACON) checks and Clasher checks are run on the resulting version. The definition of the different sessions for issue and flush are: Session on parent when Refresh was last done From session on child extract New session on parent The definition of the different sessions for refresh are: Session on parent when Refresh was last done From session on child extract New session on parent The definition of the different sessions for drop are: Session on parent when Refresh was last done From session on child extract New session on child The drop command compares the elements that are NOT to be dropped and applies the changes to create a new session. The same algorithm is used for SAVEWORK and GETWORK. There are two exceptions to the merge criteria as follows: Base Session Session on parent when Refresh was last done From Session From session on child extract To Session New session on parent Base Session Session on parent when Refresh was last done From Session From session on child extract To Session New session on parent Base Session Session on parent when Refresh was last done From Session From session on child extract To Session New session on child Note: The standard flush and issue commands also do a refresh. This makes sure that there is a suitable base session for the next extract operation. Base Session From Session To Session Base Session From Session To Session Base Session From Session To Session Note :
Dealing with Deleted Elements
There are three ways of denoting deleted items for a partial operation.
Flushing Connected Items
For two way connections, it is often desirable to flush both ends of the connection in order to preserve engineering consistency. There are addition options that allow the connected items to be flushed.
Errors for Extract Operations
Potential problems at issue and refresh are the same as for SAVEWORK and GETWORK on multiwrite DBs, i.e. there could be a name clash, or an owning element could be deleted. Such problems will need to resolved in the extract prior to issuing being allowed. If doing a partial issue or flush or if issuing from an extract, then extra checks are applied as follows: Where an element has not been claimed, then Drop can still be used to lose the local changes. Where a non primary element has changed owner, then the old primary owner and the new primary owner must both be issued back at the same time. If an element has been unnamed, and the name reused, then both elements must be flushed back together. If an element and its owner have been created then: 1. if it is included in a partial flushback, then so must its owner. if the owner is include in a partial drop, then so must the element itself if an element and its owner have been deleted then: 1. if it is included in a partial drop, then so must it's owner. if the owner is included in a partial flush, then so must it. Where a non primary element has changed owner, then the old primary owner and the new primary owner must both be issued back at the same time. Where a non primary element has changed owner, then the old primary owner and the new primary owner must both be issued back at the same time. If an element has been unnamed, and the name reused, then both elements must be flushed back together. If an element has been unnamed, and the name reused, then both elements must be flushed back together. If an element and its owner have been created then: If an element and its owner have been created then: 1. if it is included in a partial flushback, then so must its owner. if the owner is include in a partial drop, then so must the element itself 1. if it is included in a partial flushback, then so must its owner. if an element and its owner have been deleted then: if an element and its owner have been deleted then: 1. if it is included in a partial drop, then so must it's owner. if the owner is included in a partial flush, then so must it. 1. if it is included in a partial drop, then so must it's owner. Note: When a partial issue or drop is made there is no guarantee that the data is 'Engineering correct'. Users are advised to run Clasher and/or Datacon on the resultant version. Note :