Database Management Reference Manual
Database Management Reference Manual
Reference Manual
Disclaimer
Information of a technical nature, and particulars of the product and its use, is given by AVEVA
Solutions Ltd and its subsidiaries without warranty. AVEVA Solutions Ltd and its subsidiaries disclaim
any and all warranties and conditions, expressed or implied, to the fullest extent permitted by law.
Neither the author nor AVEVA Solutions Ltd, or any of its subsidiaries, shall be liable to any person or
entity for any actions, claims, loss or damage arising from the use or possession of any information,
particulars, or errors in this publication, or any incorrect use of the product, whatsoever.
Copyright
Copyright and all other intellectual property rights in this manual and the associated software, and every
part of it (including source code, object code, any data contained in it, the manual and any other
documentation supplied with it) belongs to AVEVA Solutions Ltd or its subsidiaries.
All other rights are reserved to AVEVA Solutions Ltd and its subsidiaries. The information contained in
this document is commercially sensitive, and shall not be copied, reproduced, stored in a retrieval
system, or transmitted without the prior written permission of AVEVA Solutions Ltd. Where such
permission is granted, it expressly requires that this Disclaimer and Copyright notice is prominently
displayed at the beginning of every copy that is made.
The manual and associated documentation may not be adapted, reproduced, or copied, in any material
or electronic form, without the prior written permission of AVEVA Solutions Ltd. The user may also not
reverse engineer, decompile, copy, or adapt the associated software. Neither the whole, nor part of the
product described in this publication may be incorporated into any third-party software, product,
machine, or system without the prior written permission of AVEVA Solutions Ltd, save as permitted by
law. Any such unauthorised action is strictly prohibited, and may give rise to civil liabilities and criminal
prosecution.
The AVEVA products described in this guide are to be installed and operated strictly in accordance with
the terms and conditions of the respective licence agreements, and in accordance with the relevant
User Documentation. Unauthorised or unlicensed use of the product is strictly prohibited.
First published September 2007
AVEVA Solutions Ltd, and its subsidiaries
AVEVA Solutions Ltd, High Cross, Madingley Road, Cambridge, CB3 0HB, United Kingdom
Trademarks
AVEVA and Tribon are registered trademarks of AVEVA Solutions Ltd or its subsidiaries. Unauthorised
use of the AVEVA or Tribon trademarks is strictly forbidden.
AVEVA product names are trademarks or registered trademarks of AVEVA Solutions Ltd or its
subsidiaries, registered in the UK, Europe and other countries (worldwide).
The copyright, trade mark rights, or other intellectual property rights in any other product, its name or
logo belongs to its respective owner.
Contents
Page
Reference Manual
Introduction to PDMS Database Concepts . . . . . . . . . . . . . . . . . . . . 1:1
PDMS Project . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1:1
Project Organisation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1:1
Teams and MDBs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1:2
Splitting Data Across Multiple DBs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1:3
1:3
1:3
1:4
1:4
1:4
1:4
1:5
1:5
1:6
12.0
Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1:8
Rules
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1:9
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1:9
1:11
1:11
1:12
1:12
1:12
1:12
1:12
1:14
1:14
1:14
1:15
1:16
1:16
1:16
Extracts
1:17
1:17
1:18
1:18
1:18
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1:18
Extracts
.............................................................
Creating Extracts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Restrictions on Extracts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Extract Sessions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
MERGE CHANGES on Extracts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Extract Claims/Releases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Extract Release . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
User Claims/Releases on an Extract . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Variants
.............................................................
ii
1:18
1:19
1:19
1:19
1:20
1:20
1:21
1:21
1:22
12.0
Extract Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Merge Algorithm . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Dealing with Deleted Elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Flushing Connected Items . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Errors for Extract Operations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Performance Considerations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
1:22
1:22
1:24
1:24
1:24
1:25
1:25
1:25
1:25
1:26
1:27
ID Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2:8
iii
12.0
3:5
3:5
3:5
3:6
3:6
iv
4:1
4:3
4:4
4:6
12.0
6:2
6:2
6:5
6:7
Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9:1
Format of Expressions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9:1
Operator Precedence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9:2
Nesting Expressions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9:2
9:12
9:12
9:13
9:13
9:22
12.0
FROM
.............................................................
Comparing Positions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
POLAR
.............................................................
Direction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Orientations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9:25
9:26
9:27
9:28
9:29
Collections . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11:1
Comparisons Across Sessions and Stamps . . . . . . . . . . . . . . . . . 12:1
Change Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12:1
Querying the Last Modification to an Element or Attribute . . . . . . . . . . . . . . . . . . . . . . . . .
Querying the Session History for an Element or Attribute . . . . . . . . . . . . . . . . . . . . . . . . .
Querying Details of a Specific Session . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Querying Session Number for a Given Time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
12:1
12:2
12:2
12:2
vi
12:3
12:4
12:4
12:6
12:6
12.0
vii
15:2
15:2
15:2
15:3
12.0
15:4
15:4
15:5
15:6
15:6
15:6
viii
12.0
1.1
PDMS Project
1.1.1
Project Organisation
In order to create data, a user must first create a PDMS Project.
A PDMS Project consists of:
A project starts with just the System, Comms and Misc DBs.
The user will then have to create other DBs for users to work on. The various visible DB
types are:
System
Dictionary
Property
Catalogue
DESIGN
DRAFT
SPOOLER
Materials
Diagrams
Transaction
1:1
12.0
1.1.2
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.
1:2
12.0
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.
1.1.3
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.
1.2
Database Elements
1.2.1
Introduction
All data in a Dabacon database is stored in elements. Every element has a type, e.g. 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 organised in a primary hierarchy. This is described in Database hierarchy.
1.2.2
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:
=1234/6789
The first integer is composed from the database number and a bucket number. The bucket
number allows for multiple users to access a database simultaneously without the risk of
generating the same reference number; bucket numbers are allocated to users on a
temporary bases starting at 1. In single write databases, the bucket number is always 1.
The second integer is a sequence number, starting at 0, and incrementing each time an
element is created within that database and bucket.
The algorithm for allocating a reference number is:
1st part - DB number plus (bucket number * 8192)
2nd part - Increment starting from 0.
Thus, for example, for DB 1, the first element created will have a reference number of
=8193/0 (this will be the world element since this is always created first).
1:3
12.0
The reference number is never changed once an element has been created.
1.2.3
Name
In PDMS 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. Names must be unique within a project.
An element need not have a name. For these elements PDMS creates a constructed name,
consisting of the relative position in the hierarchy up to the first named element.
e.g. 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.
1.2.4
Current Element
At the user level there is a concept of current element.
Most PDMS 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.
1.2.5
1.3
1.3.1
1:4
12.0
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.
1.3.2
1.3.3
Element Instances
A new database 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 DESIGN DB, leaving it to other users to create the actual
plant items.
1:5
12.0
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 PDMS explorer.
All element instances within an MDB are accessible at all times.
Give an example here showing an explorer form plus explanation of what it is showing
1.3.4
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.
Most commands assume that the action is to be performed on the given element and
its descendants in its primary hierarchy, e.g. adding a ZONE to a 3D view will add
everything below that ZONE.
In the DESIGN DB, world positions and orientations are concatenated according to the
primary hierarchy.
1.4
Secondary Hierarchies
1.4.1
Introduction
An element can only exist once in the primary data hierarchy. Secondary hierarchies, such
as 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.
1:6
12.0
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 DBs.
1.5
Database Attributes
Every element may have a number of attributes. All elements have the following attributes:
NAME
TYPE
LOCK
OWNER
MEMBERS
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 PML objects and other command queries.
PDMS attributes may be one of the following types:
Integer
Ref
Integer Array
Ref Array
Real
Position
Real Array
Direction
Orientation
Attribute
A 'Ref' type is a pointer to another element. For example, on a BRANCH element the CREF
attribute points to the connected NOZZLE. The use of Ref attributes enables PDMS to
model networks and other cross relationships.
The attribute type dictates how the attribute can be set with PML or specific syntax.
1.5.1
1.5.2
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.
1:7
12.0
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.
1.5.3
1.6
1.6.1
Expressions
Database expressions can be of the following types:
algebraic
text
Element ID
position
direction
orientation
The contents of an expression may contain the standard operator and mathematical
functions along with the names of attributes and element identification.
Examples of expressions are:
Real Expression: (XLEN * YLEN * ZLEN * 2)
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.
Boolean expression: (PURP EQ 'HS' AND AREA OF OWNER EQ 1)
The 'OF' keyword ensures 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:
Catalogue parameterisation
Template parameterisation
Rules
1:8
12.0
Database expressions are very similar to PML expressions. The major difference is that
database expressions may not contain other PML variables or functions. E.g. (XLEN *
!MYVAR) is not a valid database expression.
1.6.2
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, e.g. (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, E.g. 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 DBs.
1.7
1.7.1
Data Listings
Data listings (DATALs) capture the state of the database in the form of PDMS commands.
All element data including all attributes, UDAs and rules will be captured. They are similar in
concept to XML output. These files can then be read back in via the command line.
Data listings are used as follows:
1.7.2
Reconfigurer
Reconfigurer is similar to 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.
1.8
Database Modifications
1.8.1
Overview
The fundamental modifications allowed are:
Element creation
Element deletion
1:9
12.0
Element copy
Element move
Attribute modification
1.9
A SCOPE, which defines to what part of the model the ROLE applies. The SCOPE may
be an expression, E.g. all ZONE WHERE (FUNC eq 'TEAMA')
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:
At least one PEROP in a ROLE assigned to a USER must grant the update operation.
Management tools are available for DAC through the ADMIN module. Control of DAC is also
available through PML.
A PEROP consists of three parts:
1:10
12.0
The PEROP may further restrict the elements it applies to by a qualifying condition. The
qualifying conditions is a PDMS statement that should evaluate to true to qualify the
PEROP.
The following operations are available through PEROPs
Create
Modify
Delete
Claim
Issue
Drop
Output
Export
Copy
Each of these operations may be set to
Allow
Disallow
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.
1.9.1
1.9.2
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. PDMS will always check that this is the case prior
to allowing the modification.
1:11
12.0
1.9.3
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 DB. This functionality is provided for certain specialised 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.
1.9.4
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.
1.9.5
Element Copy
Elements may be copied. There are options to copy a single element or an element and all
its descendents. Elements may be copied between 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:
Whether any attribute rules are to be rerun on the copied element. (Rules are
described in Reconfigurer)
1.9.6
Element Move
Elements may be moved to a different point in the 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:
1.9.7
The element is not allowed in the members list of the new owner
Attribute Modification
The following checks are applied when modifying attributes:
1. the attribute value is the right type
2. the attribute is valid for the given element
1:12
12.0
After setting the CREF on /N1 to /B1, the end result is:
1:13
12.0
1.9.8
1.10
Database Sessions
1.10.1
Savework/Getwork
Data is only saved to the database on demand. Similarly a user will only see changes made
by others on demand. In order to make changes visible to other users two steps must occur:
1. The user making the changes must do a Savework
2. The reader must do a Getwork
For most applications, the savework/getwork actions are totally in the hands of the user.
1.10.2
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 the
1:14
12.0
user does want to see the changes made by others then he must do a 'Getwork'. 'Getwork'
will always reposition the user 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.
1.10.3
Session History
Overview
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:
Creating a stamp
1:15
12.0
1.10.4
Creating a Stamp
It is often convenient to mark a set of 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.
1.10.5
1.10.6
Merging Changes
As a result of storing all changes, PDMS databases will grow relatively quickly. The user
may compress a DB to reduce its size by merging multiple sessions together using the
MERGE CHANGES command in ADMIN. The user may compress all sessions, or a range
of sessions.
Any sessions used in stamps will always be preserved. Thus before compressing a DB the
user 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 the user decides to do a MERGE CHANGES on a database having set a stamp
on session 10, the resultant DB will look like:
1:16
12.0
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.
1.11
Multiwrite Working
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.
1.11.1
Multiwrite Strategy
The PDMS 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:
1.11.2
Some connection attributes. e.g changing a TREF attribute on a branch does not
require the BRANCH to be claimed.
Member lists containing primary elements are always merged back. e.g. creating a
ZONE below a SITE doe NOT require the SITE to be claimed,
Changes issued from variant extracts are always merged back in.
Claiming 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. E.g. to modify a BOX, then the owning EQUI or SUBE must
be claimed.
When working on multiwrite 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:
1:17
12.0
1.11.3
Releasing 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. The user 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.
1.11.4
Performance Considerations
Every time a claim/release is made the underlying DB is accessed. To minimise such
access, as many elements as possible should be done in one go.
1.11.5
1.12
Extracts
1.12.1
Extracts
Extracts are an extension of the multiwrite facilities.
The extra functionality offered by extracts is:
They allow long term claims, i.e. Elements are not released on module switch.
A partial set of changes may be issued, rather than the whole lot.
1:18
12.0
1.12.2
Users can use extracts to implement an approval/work cycle, i.e. 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.
Creating Extracts
Extracts are created from existing multiwrite 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 MDB as for any other DB. Two extracts from the same
extract family cannot be included in the same MDB.
1.12.3
Restrictions on Extracts
It is not be possible to:
1.12.4
COPY an extract
INCLUDE an extract from a foreign project without its parent extract being included
first.
Extract Sessions
An extract will have its own set of sessions. This is illustrated below:
1:19
12.0
In this example the extract 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.
1.12.5
1.12.6
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, the
user need not do a separate claim for each level of extract.
For example, consider a three level extract as follows:
1:20
12.0
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 YESClaim 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.
1.12.7
Extract Release
Extract claims may be released in the same way as user claims.
An extract release will not be permitted if:
1. Updates are outstanding on that extract
2. The element is currently claimed out to a user or to a lower level extract
If a list of elements is extract released, and some in the list fail, then the remaining elements
will still be extract released.
1.12.8
1:21
12.0
1.12.9
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, e.g. 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.
Partial Drop
Issue
The local changes are copied to the parent extract, and the elements
are released.
Flush
Partial Issue
Refresh
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.
1:22
12.0
The granularity of this merge is at the attribute level, i.e. 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.
PDMS ensures that all merges are valid at the raw database level, i.e. the data will be DICE
(Database Integrity Checker) clean. However it is not possible to ensure that the data is
consistent in engineering terms. Thus it is highly recommended that when variant data is
flushed back, Datacon checks and Clasher checks are run on the resulting version.
The definition of the different sessions for issue and flush are:
Base Session
From Session
To Session
From Session
To Session
From Session
To Session
Note: The standard flush and issue commands also do a refresh. This ensures that there is
a suitable base session for the next extract operation.
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:
1:23
12.0
1. Once an element is deleted, then it stays deleted regardless of any conflicts in merging.
For example, user 1 deletes /BOX, whereas user 2 changes an attribute of /BOX. If
user 1 issues his change before user 2, then user 2's change will have no affect.
2. If the element type is changed, then the merge is done at the element level rather than
the attribute level, i.e. all the current attribute values are taken regardless of whether
they have changed. Any attribute changes made by other users will thus be lost.
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.
Where an element has not been claimed, then Drop can still be used to lose the local
changes.
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.
1:24
12.0
1.13
Global Working
1.13.1
Overview
Global allows DBs to be spread across different locations. Global propagates changes from
one location to another. The Global daemon does the propagation.
With global, there may be copies of a database or extract at multiple locations, but only one
copy may be writeable. A database is said to be primary at a given location if it is writeable
there, and secondary if it is not. A DB may be made primary at any location.
Different extracts from the same extract family may be primary at different locations. This
allows multiple different locations to modify the same DB.
1.13.2
Global Propagation
Changes made to a primary DB are propagated to the read only secondary DBs. The
propagation algorithm just sends the new sessions. For example:
If this case the propagation algorithm will send the sessions 20 to 39 to the secondary
location.
1.13.3
1:25
12.0
The extract claim operation is thus asynchronous. The user has to wait to discover if the
claim succeeded or not.
1.13.4
1:26
12.0
Step 2 could fail for normal reasons, e.g. a name clash. If so the primary child extract needs
to be informed so that next time it uses the correct base session for comparison purposes.
At the command level this is the 'EXTRACT FLUSH RESET' command.
1.13.5
1.14
Undo Capabilities
1.14.1
1.14.2
Backtrack/Rewind
The system administrator may remove the last one or many sessions from the DB.
1:27
12.0
1:28
12.0
2.1
Current Element
The database has a concept of current element. This is often referred to as the CE. The
current element is highlighted in the explorer. In the 3D view the current element is shown in
a different colour.
Many PML commands work on the current element.
The current element can be changed in the following ways:
2.2
Current Position
There is also a concept of a current position. The concept of current position is only used
when creating elements or when navigating down to the next level.
By default the current position is before the first member.
This is described further in Climb Up.
2.3
2.4
2:1
12.0
2.5
2.6
the OF keyword
If the constructed name is given, that element will become the CE.
e.g.
BOX 2 OF /PUMP99
NBOX 1 of CYL 2 of EQUI 4 of ZONE 9 of /MYSITE
If the element is a UDET then the UDET name must be used instead of the system type.
e.g. NBOX 1 OF :MYCYL 1 OF :PUMP 3 of ZONE 9 of /MYSITE
2.7
2.8
2.9
Climb up
2:2
12.0
2.9.1
Climb Up
The following syntax is valid:
OWNER
climb to owning element. The owning element becomes the CE. The
current position is then before the first member
END
climbs to owning element. The owning element becomes the CE. The
current position is at the previous element
<Element type>
climb to element of that type. This element becomes the new CE. This
leaves the current position at the immediate member element that
was climbed through.
2.9.2
OWNER
END
EQUI
SITE
Next int
Prev
Prev int
First
First int
Last
2:3
12.0
Last int
Moves CE to /MyBoxB
NEXT 3
Moves CE to /MyCylD
NEXT CYL
Moves CE to /MyCylD
NEXT 3 BOX
Moves CE to /MyBoxD
PREV
Moves CE to /MyRtorA
PREV 2
Moves CE to /MyCylB
PREV BOX
Moves CE to /MyBoxA
PREV 2 CYL
Moves CE to /MyCylA
FIRST
Moves CE to /MyBoxA
FIRST 2
Moves CE to /MyCylA
FIRST CYL
Moves CE to /MyCylA
FIRST 3 CYL
Moves CE to /MyCylC
BOX 2
LAST
Moves CE to /MyBoxD
LAST 2
Moves CE to /MyCylD
LAST CYL
Moves CE to /MyCylD
LAST 3 CYL
Moves CE to /MyCylB
2:4
12.0
2.9.3
First Member
Last Member
Example
We can use the same example as before but in this case we are positioned at the owning
equipment, say /MYEQUI. The current position is defaulted to the start of the list. The
member list being:
1 BOX /MyBoxA
2 CYL /MyCylA
3 CYL /MyCylB
4 RTOR /MyRtorA
5 CYL /MyCylC
6 BOX /MyBoxB
7 BOX /MyBoxC
8 CYL /MyCylD
9 BOX /MyBoxD
FIRST MEMBER
Moves CE to /MyBoxA
LAST MEMBER
Moves CE to /MyBoxD
FIRST CYL
Moves CE to /MyCylA
FIRST 3 CYL
Moves CE to /MyCylC
2:5
12.0
LAST CYL
Moves CE to /MyCylD
LAST 2 CYL
Moves CE to /MyCylC
NEXT CYL
NEXT 2 CYL
PREV CYL
BOX 4
Moves CE to /MYBoxD
In the above examples, the use of NEXT had the same result as using FIRST. The use of
PREV was invalid. This is because the current position was off the start. We can change the
current position using the END syntax to give more meaningful examples
e.g.
/MyCylB
END
The CE is /MyEqui as before, but with the current position at /MyCylB
2.10
NEXT CYL
Moves CE to /MyCylC
NEXT 2 CYL
Moves CE to /MyCylD
PREV CYL
Moves CE to /MyCylA
2:6
12.0
2.11
BOX 1
NEXT BOX
LAST BOX
Climbing up by Default
The commands to move to an element at the same level, may also be used for elements at
any higher level. i.e. if the command is invalid at the CE, PDMS will keep on climbing until
the command becomes valid.
e.g. for the previous example, with the CE at /BoxY:
2.12
SUBE 2
Moves CE to /SUBE2
LAST SUBE
Moves CE to /SUBE2
FIRST ZONE
2.13
Other Syntax
2.13.1
Pseudo attributes can be specified after GOTO. A particularly useful pseudo attribute is
FRSTW. This goes to first world of a given type.
e.g.
2:7
12.0
2.13.2
2.14
ID Expressions
The above commands are all examples of an ID(identification) expression. The one
exception is the GOTO syntax. This keyword is omitted within an ID expression. ID
expressions should be enclosed in brackets, although in most cases, they will work without
the brackets. An ID expression may itself be queried or assigned to a PML variable.
Querying an expression or assigning it to a PML variable dos NOT change the CE.
Q ( NEXT BOX)
!MyEle = ( next box )
!MyEle = ( next box of /VESS1 )
!MyEle = (SPRE )
Assigning an ID expression to a PML variable is a common way to write PML.
2.15
Special Cases
2.15.1
UDETs
A UDET may be used wherever an element type is valid.
e.g.
(:MYBOX 1 OF /VESS1 )
NEXT :MYBOX
FIRST 2 :MYBOX
The following exception applies:
When climbing, either the UDET or the base type may be specified.
e.g.
At a BOX below /VESSEL which is a :MYEQUIP
:MYEQUIP - will climb to /VESSEL
EQUIP - will also climb to /VESSEL
2.15.2
Trace Command
If in TTY mode, the TRACE ON/OFF command can be turned on track changes in current
element. The default is on.
2:8
12.0
2.16
Data Type
Qualifier
Description
ALLELE
DBREF
ElementType
CONNECTIONS
DBREF array
Connections
CONNECTIONSH
DBREF array
CONNER
String
DDEP
Int
FRSTW
DBREF
MAXD
Int
MBACK
DBREF array
*ElementType
MCOU
Int
*ElementType
MEMB
DBREF array
*ElementType
OWNLST
DBREF array
PARENT
DBREF
SEQU
Int
TYSEQU
Int
Int
String
Owning hierarchy
*ElementType
Reference of
specified type
ascendant
element
of
*- qualifier is optional
2:9
12.0
2:10
12.0
PDMS Attributes
3.1
3.1.1
Creation
A PML attribute instance may be created for a system attribute or a UDA.
e.g.
!AXLEN = object attribute('XLEN')
!UINT = object attribute(':UINT')
The class should not be confused with the attribute value. The actual Attribute value for a
particular Element can only be accessed via the DBREF class or via the QUERY command.
Comparing two Attributes just compares whether they identify the same attribute, the
comparison does not look at attribute values in any way.
3.1.2
Methods
The Attribute instance can then be used for querying the meta data. i.e. data about data.
The methods of the class allow the following to be queried.
String Type()
Attribute type
String Name()
Attribute name
String Description()
Attribute description
Int Hash()
int Length()
Attribute length
bool IsPseudo()
bool IsUda()
string querytext()
string units
bool Noclaim()
ElementType array
ElementTypes
String array
List of valid for text attributes. The list may vary with element
ValidValues(ElementType) type
3:1
12.0
string DefaultValue
(ElementType)
string Category()
bool hyperlink()
bool connection()
bool hidden()
bool protected()
Note: We do yet not support direct usage of this class in other syntax.
3.1.3
Attribute Type
Attributes can be the following type:
INT
REAL
LOGICAL
TEXT
REFERENCE
POSITION
DIRECTION
ORIENTATION
WORD
3.2
3.2.1
Creation
An ElementType instance may be created for a system Element type or a UDET.
e.g.
!EQUI = object elementtype('EQUI')
!UEQUI = object elementtype(':MYEQUI')
The ElementType instance can then be used for querying the meta data. i.e. data about
data. The methods of the class allow the following to be queried.
3.2.2
Methods
string Name()
string Description()
int Hash()
Hash value
bool IsUdet()
3:2
12.0
Attribute array
systemAttributes()
string ChangeType()
ElementType
SystemType()
ElementType array
bool Primary()
ElementType array
MemberTypes()
ElementType array
ParentTypes()
Note: We do yet not support direct usage of this class in other syntax.
3.2.3
Data Type
Qualifier
HLIS
WORD(2000)
LIST
WORD(2000)
LLIS
WORD(2000)
OLIS
WORD(2000)
REPTXT
STRING
3.3
Querying Attributes
3.3.1
Description
The attributes available for an element will depend on its type. E.g. a site will have different
attributes to a branch. The lists of valid attributes can be obtained as follows:
1. The ATTLIS attribute returns the list of all non pseudo attributes for that element. This
list includes UDAs and hidden attributes. The same list is used for the PML DBREF
ATTRIBUTES method.
2. The ATTOUT attributes is as for ATTLIS but excludes hidden attributes. This list is used
when doing a Q ATT and by the attribute utility form. Attributes that are hidden can still
be queried individually in the normal way.
3. The valid UDAs can be queried using the UDALIS attribute. This includes hidden
UDAs.
4. The PSATTS attribute returns the list of valid pseudo attributes. Typically this list is
large, running into the hundreds. N.B. querying PSATTS can be slow.
3:3
12.0
3.3.2
3.4
PML1 Syntax
PML1 syntax allows an attribute to be passed to a PML variable without the = operator. If
this is done then the value will always be formatted to a TEXT using the current units if
applicable.
e.g.
VAR !RESULT XLEN
!RESULT will be of type TEXT
3.5
Querying Arrays
If the attribute is an array, the query will return a list of values. Individual elements can be
queried by passing in the index number.
e.g.
!VALUE = !!CE.DESP[2]
!VALUE = DESP[2]
Alternatively, the NUM keyword can be used for PML 1 syntax. A range of values can be
returned using the TO keyword.
3:4
12.0
e.g.
VAR !VALUE DESP NUM 3 - to retrieve the 3rd value
VAR !VALUE DESP NUM 3 TO 5 - to retrieve 3rd to 5th values
Q DESP NUM 3 TO 5
An error will occur if attempting to query off the end of the array.
Within a PML1 expression, a position attribute may be queried as an array in order to
access the individual coordinates.
e.g.
VAR !X (POS[1] ) - This will return the X coordinate.
3.5.1
3.5.2
3.5.3
Qualifier
Many pseudo attributes take a qualifier. The qualifier is the extra information required to
make the query. Examples of where a qualifier is used are:
1. Querying a ppoint position (PPOS) requires the ppoint number
2. The ATTMOD attribute can be used to query when an attribute was modified. The
qualifier is the attribute to test for modification.
3. A direction/position may be queried wrt another element.
The definition of what pseudo attributes take what qualifier is described in the data model
reference manual.
The qualifier follows the attribute name in brackets. Attribute qualifiers must be preceded by
the keyword ATTNAME and element types must be preceded by the keyword TYPENAME.
e.g.
Q PPOS(1) - PPOS has an int qualifier
Q LASTMOD(ATTNAME XLEN) - LASTMOD has an attribute qualifier
Q MEMBER(TYPENAME BOX) - MEMBER has an optional element type qualifier
3:5
12.0
For PML variables, the qualifier should be assigned to a PML array object and passed to the
Attribute method as the second argument:
e.g. to query PPOS 1
!q=object array()
!q[1] = 1
q var !!ce.attribute('PPOS', !q)
e.g. to query list of nominal bores:
!q=object array()
!q[1] = 'BORE'
q var !!ce.attribute('NOMBMM', !q)
e.g. to query Equipment members:
!q=object array()
!q[1] = object elementtype('EQUI')
q var !!ce.attribute('MEMBER, !q)
3.5.4
3.5.5
Attribute
Name
Data Type
Qualifier
Description
ATTLIST
WORD(300)
PSATTS
WORD(500)
UDALIS
WORD(300)
List of UDAs
UDASET
WORD(300)
Attribute
Name
Data Type
Qualifier
Description
CUTNAM
STRING(700)
NUMBER
Full name
characters
CUTNMN
STRING(700)
NUMBER
3:6
of
element,
truncated
to
12.0
Attribute
Name
Data Type
Qualifier
Description
FLNM
STRING(700)
FLNN
STRING(700)
ISNAMED
BOOL
NAMESQ
STRING(700)
NAMETY
STRING(700)
NAMN
STRING(500)
NAMTYP
STRING(700)
Attribute
Name
Data Type
ACTTYPE
WORD
AHLIS
WORD(200)
OSTYPE
WORD
TYPE
WORD
3.6
Setting Attributes
3.6.1
Standard Syntax
Qualifier
Description
The value assigned must be the correct type for the attribute type (see examples
below)
PML variables can not be directly used if using method (2). The PML variable must be
expanded using the late evaluation syntax, i.e. XLEN !A is invalid but XLEN $!A is
OK. This also applies to any PML variables within expressions.
3:7
12.0
TCON FLGD
3:8
12.0
3.6.2
3.6.3
:MYUDA DEFAULT
Setting an Array
If assigning via a PML variable, an array attribute must be assigned from a PML array
object.
e.g.
!!CE.DESP = !MYARRAY
If assigning via the attribute name, then a list of values must be given.
e.g.
3.6.4
DESP 1 2 3 4 5
!!CE.DESP[2] = 99
If assigning via the attribute name, a single value of an array may be set using the NUMB
keyword. The NUMB keyword follows the attribute name, and is followed by the index
number.
e.g.
DESP NUMB 2 99
This would set the 3rd value to 99, the 4th to 100 and the 5th to 101.
3:9
12.0
The new values may go off the end of the existing array, but the start point must not be more
than one beyond the existing end point.
e.g.
DESP 1 2 3 - set up initial values
DESP NUMB 4 99 - OK, as at end
DESP NUMB 6 100 - Error, as would leave a gap
3.6.5
Examples:
NAME /ZONE5D
UNN
The current element loses its name (it is still identifiable by its
automatically allocated reference number).
Command Syntax:
Example:
Command Syntax:
3:10
12.0
3.6.6
Examples:
LOCK ALL
UNLOCK
Command Syntax:
3.6.7
Data Type
Qualifier
Description
DACMOD
BOOL
ATTR
MODATT
BOOL
ATTR
MODERR
STRING(120)
ATTR
3:11
12.0
3:12
12.0
Database Modification
This chapter describes the commands to create, copy and modify database elements.
4.1
4.1.1
Create a new element at an appropriate level of the DB hierarchy; see Creating a New
Element
Define the attributes and offspring of a new element by copying the corresponding
attribute
settings and member lists from another element; see Copying Attributes from One
Element to Another
(element_name is optional)
For example, if the Current List Position is at member 4 (/VALV1) of the Member List.
4:1
12.0
Figure 4:1.
Current Element and its Member List (illustrating movement along list)
the command
Figure 4:2.
To insert the new Tee as the first or last component in the Member List, access the Branch
Head or Tail, respectively, before giving the NEW TEE command.
element_type
element_name
BEFore
NEW
element_type
element_name
AFTer
list_position
list_position
where element_name is again optional and where list_position may be specified in any of
the ways described in Database Navigation and Query Syntax.
Consider the following examples. Starting from the configuration shown, any of these
commands creates a new Tee between /ELBO3 (list position 7) and /FLAN2 (list position 8):
4:2
12.0
NEW TEE BEFORE LAST FLAN Specify first or last member of a given type
The new Tee, which is unnamed, becomes list member 7, /ELBO3 becomes list member 8, /
FLAN2 becomes list member 9, and so on.
4.1.2
Deleting an Element
You can delete either the entire Current Element or some or all of its offspring. When you
delete the Current Element, you also delete all of its offspring (that is, its members, their
members, etc.) from the hierarchy. The command must therefore be used with care. When
an element has been deleted, its Owner becomes the new Current Element.
As a safeguard against accidental deletion of parts of a DB, the deletion function operates
only on the Current Element. As further safeguards, the DELETE command word must be
entered in full and the command syntax requires that you confirm the generic type of the
Current Element. Furthermore, access to the required element and its subsequent deletion
must be specified in two separate command lines.
To delete the Current Element and all its offspring, enter
DELETE
element _type
For example, to delete a Nozzle, make the Nozzle the Current Element and then enter
DELETE NOZZ
The Equipment which owned the Nozzle becomes the Current Element.
To delete a complete Zone, including all Equipment, Piping, Structures etc. owned by it,
make the Zone the Current Element and then enter
DELETE ZONE
The Site which owned the deleted Zone becomes the Current Element.
To delete only specified members of the Current Element, use one of the following forms of
the command syntax:
DELETE element_type MEMbers
4:3
12.0
4.1.3
In both cases elements and their offspring are transferred to new positions in the hierarchy.
In the first case the element's owner remains unchanged, while in the second case the
element's owner changes.
To rearrange the Member List of the Current Element, use one of the commands:
REOrder
REOrder
REOrder
element_id
element_id
element_id
BEFore list_position
AFTer list_position
Figure 4:3.
the command
REORDER
/ELBO3
moves /ELBO3 to position 5, immediately following the Current List Position, giving the new
Member List
Figure 4:4.
Example of REORDER
4:4
12.0
Figure 4:5.
Example of REORDER
To insert an existing element into the Member List of the Current Element, when it is not
already a member of that list, use one of the commands
INCIude
element_id
INCIude
element_id
BEFore
list_position
INCIude
element_id
AFTer
list_position
Figure 4:6.
Example Hierarchy
the command
INCLUDE /PIPE2
4:5
12.0
moves /PIPE2 (and all its offspring) to the position immediately following the Current List
Position. Ownership of /PIPE2 passes from /ZONE2 to /ZONE1, resulting in the new
hierarchy
Figure 4:7.
4.1.4
4:6
12.0
old_name new_name
4:7
12.0
COPY
/FRACT1/PIPE
RENAME
/FRACT1
/FRACT2
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.
Attribute
Name
Data Type
Qualifier
DACCOH
BOOL
DACCOP
BOOL
DACCRE
BOOL
DACDEL
BOOL
DACERR
STRING(120)
ATTR
MODATT
BOOL
ATTR
MODDEL
BOOL
ATTR
NOUN
Description
4:8
12.0
5.1
Sessions
Each time you enter DESIGN 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.
5.2
Session Comments
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 DESIGN 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.
Note: Sessions 1 and 2 are created in ADMIN (when the DESIGN DB and its World
element, respectively, are created), so the first true DESIGN session will be Session
3.
Example:
5:1
12.0
Command Syntax:
Q SESSComment integer
where integer is the session number.
Each time you enter DESIGN 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.
5.2.1
Session Comments
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 DESIGN 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 should enter the session comment before you issue a
SAVEWORK command.
Note: Sessions 1 and 2 are created in ADMIN (when the DESIGN DB and its World
element, respectively, are created), so the first true DESIGN session will be Session
3.
Example:
Q SESSComment integer
where integer is the session number.
5:2
12.0
6.1
User Claims
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 PDMS, and you can also
unclaim elements at any time during a PDMS session using the UNCLAIM command.
Examples:
CLAIM /ELBOW-33
Claims Branch which owns named component, since ELBO is not
a significant element
6:1
12.0
Examples:
UNCLAIM ALL
Unclaims all elements currently claimed
Command Syntax:
.---------------.
/
|
>-- CLAIM ----*-- elementname --+-- HIERARCHY ---.
|
|
----------------+-->
.---------------.
/
|
>-- UNCLAIM ---*-- elementname --+-- HIERARCHY ---.
|
|
|
-- ALL ----------+----------------+-->
6.1.1
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:
1. If two concurrent users allocate the same name to different elements, the second user
to attempt a SAVEWORK will show up an error. The second user must rename their
element.
2. If one user inserts a significant element into another elements list, while a concurrent
user deletes the latter element, an attempt to SAVEWORK will show up an error. Either
the first user must delete or move the significant element, or the second user must
QUIT without saving the deletion.
6.1.2
Extract Databases
Unlike standard multiwrite databases, extracts allow users to keep elements claimed when
they exit from PDMS or change to another module. They can also be used, together with
Data Access Control, to manage workflow. See the 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.
6:2
12.0
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:
If the databases are set up with implicit claim, when the user modifies the element, the
element will be claimed both to the extract and then to the user. If the element is
already claimed to the extract, then the claim will only be made to the user.
If the databases are set up with explicit claim, then the user will need to use the CLAIM
command before modifying the element.
Once a user has made a user claim, no other users will be able to work on the
elements claimed, as in a normal multiwrite database.
If a user unclaims an element, it will remain claimed to the extract until the extract claim
is released or issued.
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 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.
Examples:
structures
6:3
12.0
Examples:
FLUSH ---------------.
|
FLUSHWithoutrefresh -|
|
RELEASE -------------|
|
ISSUE ---------------|
|
DROP ----------------|
.-------<-------.
|
/
|
REFRESH -------------+--*-- elementname --+- HIERARCHY -.
|
|
|
|
|
|
-- DB dbname ---------------------+->
6:4
12.0
6.1.3
For this example, take the case of a database PIPE/PIPE, accessed by USERA, with two
extracts. Users USERX1 and USERX2 are working on the extracts.
USERA creates a Pipe and flushes the database back to the owning database, PIPE/PIPE.
The results of various Q CLAIMLIST commands by the three Users, together with the
extract control commands which they have to give to make the new data available, are
shown in the Figure 6:1.: Querying extract claimlists.
Note: Q CLAIMLIST EXTRACT
tells you what you can flush
Q CLAIMLIST OTHERS
tells you want you can't claim
6:5
12.0
Figure 6:1.
When you create an element, PDMS only sees it as a user claim, not an extract claim, until
the element is flushed. It will then be reported as an extract claim (as well as a user claim, if
it has not been unclaimed).
Note that a change in the claim status of an existing element will be shown by the
appropriate Q CLAIMLIST command as soon as appropriate updates take place, but a user
will have to GETWORK as usual to see the changes to the DESIGN model data.
We recommend that:
Before you make a user or extract claim, you should do an EXTRACT REFRESH and
GETWORK.
6:6
12.0
Q DBNAME
Q CLAIMLIST
Q CLAIMLIST OTHE
Q CLAIMLIST
EXTRACT
Q CLAIMLIST
EXTRACT DB dbname
Q CLAIMLIST
EXTRACT FREE DB
dbname
Shows the extract claimlist for all the writable extracts in the
MDB.
Q CLAIMLIST
EXTRACT OTHER DB
dbname
Q CLAIMLIST
CONTROL DB dbname
Q DBAC
Q DBCL
Q LCLM
Command Syntax:
>-- Q CLAIMLIST --+- OTHER -----.
|
|
|- EXTRACT ---+- OTHER --.
|
|
|
|
|- FREE ---|
|
|
|
|
----------|
|
|
|------------------------+-- DB dbname --.
|
|
----------------------------------------+-->
6.1.4
Related Attributes
DAC related:
Attribute
Name
Data Type
DACCLA
BOOL
DACERR
STRING(120)
DACISS
BOOL
Qualifier
Description
True if DAC allows element to be claimed
ATTR
6:7
12.0
Claim related:
Attribute
Name
Data Type
Qualifier
Description
CLMID
STRING(120)
CLMNUM
INTEGER
CLMTIE
ELEMENT(4)
EXCLFR
BOOL
EXCLHI
ELEMENT(5000)
EXCLTO
BOOL
True if element claimed to this extract. Only True for Primary elements
EXNCLH
ELEMENT(5000)
EXTRC
STRING(120)
NPDESC
ELEMENT(5000)
OKCLA
BOOL
OKCLH
BOOL
OKREL
BOOL
OKRLH
BOOL
PRIMTY
BOOL
PRMMEM
BOOL
PRMOWN
ELEMENT
USCLHI
ELEMENT(5000)
USERC
STRING(120)
USNCLH
ELEMENT(5000)
Extract related:
Attribute
Name
Data Type
Qualifier
EXHCNC
ELEMENT(5000)
EXHCNN
ELEMENT(5000)
EXHCON
ELEMENT(5000)
6:8
Description
12.0
Attribute
Name
Data Type
Qualifier
EXHRCN
ELEMENT(5000)
EXHRCO
ELEMENT(5000)
EXMOC
BOOL
EXPMOC
BOOL
EXPMOD
BOOL
EXTCNC
ELEMENT(5000)
EXTCNN
ELEMENT(5000)
EXTCON
ELEMENT(5000)
EXTRCN
ELEMENT(5000)
EXTRCO
ELEMENT(5000)
OKDROP
BOOL
OKDRPH
ELEMENT(5000)
OKRLEH
ELEMENT(5000)
OKRLEX
BOOL
6:9
Description
12.0
6:10
12.0
7.1
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.
7:1
12.0
MARKDB 'comment'
UNDODB
REDODB
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
UNDODB
Q AREA - value will be
UNDODB
Q AREA - value will be
REDODB
Q AREA - value will be
REDODB
Q AREA - value will be
AREA 99
UNDODB
Q AREA - value will be
REDODB
Q AREA - value will be
200
100
0
100
200
200
99
The system will always create an initial mark the first time the database is changed.
7:2
12.0
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:
8:1
12.0
8:2
12.0
By default the form is populated with all GPWLs and GPSETs in the current MDB and
defaults to the first GPSET in the first GPWL, the Group Members grid will be populated with
the contents of the GPSET.
The Groups form has the following parts
Control Pulldown
1. Create Group World - Allows the user to create a new Group World. A Group World is
created in the hierarchy at the point of the currently selected item.
2. Create Group Set - Allows the user to create a new Group Set below the currently
selected Group World.
3. Close - Will close the Groups form
Database Explorer Window
This allows the user to navigate the database hierarchy in exactly the same way as the
standard explorer window in the DESIGN module. The benefit of having this accessible
directly from this form allows the user to quickly select elements to include in a Group set.
Group Worlds Pulldown
This pulldown will expand to hold any Group Worlds created in the database hierarchy.
Changing this pulldown will cause the Groups sub form to display all the Group Sets under
the selected Group World.
8:3
12.0
The Groups sub form displays all the Group Sets which have been created below a Group
World. Selecting a Group Set will cause the Group Members Grid to update.
Group Members Grid
This grid displays all of the elements which have been associated with the currently selected
Group Set (from the Groups sub form).
Maintenance of Groups is carried out through a set of menus accessible through right
clicking the mouse.
Right clicking the mouse in the explorer window will give the following options
8:4
12.0
1. Add Current Element - Add the currently selected element to the Group Set selected in
the Groups Sub Form
2. Add Current Element Members - Add currently selected element and all its members to
the Group Set selected in the Groups Form
3. Remove Current Element - Remove the currently selected element from the Group Set
selected in the Groups sub form
4. Remove Current Element Members - Remove the currently selected element and all its
members from the Group Set selected in the Groups sub form
5. Add From Current List
6. Remove From Current List
Right Clicking the mouse in the Members Grid will give the following options.
1. Remove all - Remove all of the elements and their members from the Group Set
currently selected in the Groups sub form
2. Add All to View - Will add all of the elements and members of the Group Set currently
selected in the Groups sub form into the Design layout of the current project.
3. Remove Selected - Remove the currently selected element from the Group Set
currently selected in the groups form.
4. Add Selected to View - Add the currently selected element into the design layout of the
current project.
5. Navigate - Will move the explorer window to the position in the hierarchy of the
selected element
Command line reference
Groups can be accessed through standard command line syntax. For example typing 'Q
MEM' at a GPSET will return all the GPITEM elements associated with the Group.
The following sections summarise the primary methods of maintaining a Group, afterward
are some examples of creating and querying Groups from the command line.
8:5
12.0
8.1
Examples:
8:6
12.0
Command Syntax:
8.2
Deleting Groups
The action of this command differs from normal behaviour if the current element is a Group.
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.
8.3
Copying a Group
Groups may be copied with a slightly different effect to normal elements.
Examples:
8:7
12.0
8:8
12.0
Expressions
This section explains the PML 1 expressions package. These facilities are needed within
AVEVA products, for example, to define report templates in PDMS.
Note: Generally, all these facilities are compatible with PML 2.
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 + y
Text1 + text2
9.1
Logical Expressions
Text Expressions
Format of 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. For example:
This is text
There must be a space between each operator and operand. For example:
x + y
9:1
12.0
Use round brackets to control the order of evaluation of expressions and to enclose the
argument of a function. For example:
SIN(30)
In general, you do not need spaces before or after brackets, except when a PDMS name is
followed by a bracket. If there is no space, the bracket will be read as part of the name. For
example:
(NAME EQ /VESS1 )
9.1.1
Operator Precedence
Operators are evaluated in the order of the following list: the ones at the top of the list are
evaluated first.
Operator
Comments
BRACKETS
FUNCTIONS
*/
+EQ, NEQ, LT, LE, GE, GT
NOT
AND
OR
9.1.2
Nesting Expressions
Expressions can be nested using brackets. For example:
( (SIN(!angleA) * 2)
9.2
SIN(!angleB) )
Logical Expressions
Logical expressions can contain:
Logical constants. The constants available are: TRUE, ON, YES for true, and FALSE,
OFF, NO for false.
Logical operators.
Logical functions.
9:2
12.0
9.2.1
Logical Operators
The logical operators available are:
Operator
Comments
AND
EQ, NE
NOT
OR
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. See also Precision of Comparisons for tolerances in comparing numbers.
AND
Synopsis
Description
Side Effects
Example
9:3
-> logical
12.0
EQ and NE
Synopsis
-> logical
-> logical
-> logical
-> logical
-> logical
-> logical
-> logical
-> logical
-> logical
-> logical
-> logical
-> logical
-> logical
-> logical
-> logical
-> logical
Description
Side Effects
Example
Errors
None.
9:4
12.0
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
Side Effects
Example
Errors
None.
NOT
Synopsis
NOT log1
Description
Side Effects
None.
Example
Errors
None.
9:5
-> logical
12.0
OR
Synopsis
OR log2
Description
-> logical
9.2.2
Side Effects
Example
Errors
None.
Logical Functions
The logical functions available are:
Function
Comments
BADREF
DEFINED,UNDEFINED
CREATED
DELETED
EMPTY
MATCHWILD
MODIFIED
UNSET
VLOGICAL
BADREF
Synopsis
BADREF (id)
Description
Side Effects
None
Example
BADREF(TREF)
Errors
None.
9:6
-> logical
->
true if TREF=nulref
12.0
Synopsis
Description
DEFined (variable_name)
-> logical
DEFined
(variable_name,number)
-> logical
UNDEFined (variable_name)
-> logical
UNDEFined (variable_name ,
number)
-> logical
Side Effects
None.
Example
DEFINED (
DEFINED (
DEFINED (
DEFINED (
DEFINED (
UNDEFINED
DEFINED (
Errors
None.
CREATED
Synopsis
CREATED
Description
Returns TRUE if the element has been created since the set
date.
Side Effects
None.
Example
Errors
None.
9:7
-> logical
12.0
DELETED
Synopsis
DELETED
Description
Returns TRUE if the element has been deleted since the set
date.
Side Effects
None.
Example
Errors
None.
-> logical
EMPTY
Synopsis
EMPTY(text)
Description
Side Effects
None.
Example
Errors
None.
-> logical
MATCHWILD
Synopsis
Description
-> logical
-> logical
-> logical
Side Effects
None
9:8
12.0
Example
Errors
None.
MODIFIED
Synopsis
.-----------------------------------.
/
|
>- MODIFIED-(-+- attname -------*- DESCENDANTS --+-+-comma +-attname -
|
|
| |
|- DESCENDANTS -. |- SIGNIFICANT --| |
|
| |
| |
|- SIGNIFICANT--| |- PRIMARY ----- | |
|
| |
| |
|- PRIMARY -----| |- OFFSPRING-----| |
|
| |
| |
|- OFFSPRING ---| ---------------- |
|
|
|
|
|
|
|
|
|
---------------+--------------------+--+-- ) - OF - id
|
-
Description
9:9
12.0
None
Example
Q MODIFIED()
Q MODIFIED(POS,ORI)
Q MODIFIED(P1 POS)
Q MODIFIED(GEOM
DESCENDANTS
Returns
TRUE
if
any
geometry for item or any
descendants has changed
Q MODIFIED(PRIMARY)
Q MODIFIED() OF /
PIPE1
Q (BUIL OR
MODIFIED()OR
ELECREC OF NEXT )
Errors
None.
The MODIFIED, DELETED and CREATED functions are not implemented within PML2
expressions.
UNSET
Synopsis
UNSET(value)
Description
Side Effects
None.
9:10
-> logical
12.0
Example
Errors
UNSET( DESC )
UNSET(CRFA)
FALSE
where
CRFA
contains unset reference
attributes
None.
VLOGICAL
VLOGICAL is used for the late evaluation of variables.
Synopsis
Description
VLOGICAL ( variable_name ))
-> logical
VLOGICAL ( variable_name ,
number)
-> logical
9.2.3
Side Effects
Example
Errors
None.
9:11
12.0
9.3
PDMS attributes of type logical array. For example, LOGARR where LOGARR is a
UDA of type logical.
Logical constants. The constants available are: TRUE, ON, YES for true; and FALSE,
OFF, NO for false.
9.3.1
Numbers can contain units. The valid units are MM, M/ETRES, IN/CHES, and FT,
FEET. These may be preceded by SQU/ARE, CUBIC, CUB/E to denote non-linear
values. For example: 100 mm, 10 exp 5 cubic feet. Feet and inches can be shown as,
for example, 106:
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 that position, direction and orientation
attributes without subscripts can only be used in number array expressions.
Numeric operators.
Numeric functions.
9.3.2
Operator
Comments
Addition.
Subtraction.
Multiplication.
Division.
Synopsis
number + number
-> number
number - number
-> number
+ number
-> number
- number
-> number
9:12
12.0
9.3.3
Description
Side Effects
Example
1
1
+
-
Errors
2 -> 3.0
2 -> 1.0
-> 1.0
-> -1.0
Synopsis
9.3.4
+
1
1
number * number
-> number
number / number
-> number
Description
Side Effects
Example
2 * 3 -> 6.0
2 / 3 -> 0.666666666
Errors
Divide by zero.
Function
Comments
ABS ( number1 )
ACOS ( number1 )
ASIN ( number1 )
ATAN ( number1 )
9:13
12.0
Function
Comments
ALOG ( number1 )
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.
INT ( number1 )
SIN ( number1 )
COS ( number1 )
TAN ( number1 )
LENGTH ( text1 )
DLENGTH ( text1 )
LOG ( number1 )
9:14
12.0
Function
Comments
NEGATE
NINT ( number1 )
REAL ( text1 )
SQRT ( number1 )
VVALUE ( variable-name )
ABS
Synopsis
ABS ( number1 )
Description
Side Effects
None.
Example
Errors
None.
-> number
Synopsis
ASIN ( number1 )
-> number
ACOS ( number1 )
-> number
ATAN ( number1 )
-> number
-> number
9:15
12.0
Description
Side Effects
None.
Example
Errors
ALOG
Synopsis
ALOG ( number1 )
Description
Side Effects
Example
Errors
-> number
ARRAY
Synopsis
Description
Side Effects
None
Example
ARRAY(e100 )
Errors
None.
-> 100
-> number
ARRAYSIZE
Synopsis
ARRAYSize ( variable-name )
Description
9:16
-> number
12.0
Side Effects
Example
ARRAYSIZE(!array)
Errors
-> 2.0
ARRAYWIDTH
Synopsis
ARRAYWIDTH ( variable-name )
Description
Side Effects
None.
Example
!ARRAY[1]
!ARRAY[2]
!ARRAY[3]
!ARRAY[4]
!ARRAY[5]
!ARRAY[6]
!ARRAY[7]
!ARRAY[8]
-> number
Bread
is
for
life,
not
just
for
breakfast
Then
ARRAYWIDTH(!ARRAY -> 9
i.e. the length of breakfast.
Errors
Synopsis
Description
Side Effects
None.
Example
Errors
None.
9:17
-> text
12.0
Synopsis
SINe ( number1 )
-> number
COSine ( number1 )
-> number
TANgent ( number1 )
-> number
Description
Side Effects
None.
Example
Errors
INT
Synopsis
INT ( number1 )
Description
Side Effects
None.
Example
INT ( 1.6 )
INT ( -23.7 )
Errors
Integer overflow.
-> number
-> 1.0
-> -23.0
Synopsis
Description
LENgth ( text1 )
-> number
DLENgth ( text1 )
-> number
Side Effects
None.
Example
Errors
None.
9:18
12.0
ALOG
Synopsis
LOG ( number1 )
Description
Side Effects
None.
Example
Errors
Negative arguments.
-> number
Synopsis
Description
-> number
-> number
Side Effects
None.
Example
Errors
None.
Synopsis
-> number
-> number
Description
Side Effects
None.
Example
MAX ( 1 , 3.4 )
-> 3.4
MIN ( 7.6 , -12.33 , 2.3 ) -> -12.33
Errors
None.
9:19
12.0
NEGATE
Synopsis
NEGate ( number1 )
Description
Side Effects
None.
Example
Errors
None.
-> number
NINT
Synopsis
NINT ( number1 )
Description
Side Effects
None.
Example
NINT
NINT
NINT
NINT
Errors
Integer overflow.
(
(
(
(
-> number
1.1 )
-> 1.0
-23.7 ) -> -24.0
1.5 )
-> 2.0
-11.5 ) -> -12.0
OCCUR
Synopsis
OCCUR(text1, text2)
Description
Side Effects
None.
Example
Errors
None..
9:20
-> integer
12.0
REAL
Synopsis
REAL ( text1 )
Description
-> number
Example
Errors
POWER
Synopsis
Description
Side Effects
None.
Example
POWER ( -2 , 3 ) -> -8
Errors
-> real
SQRT
Synopsis
SQrt ( number1 )
Description
Side Effects
Example
Errors
Negative argument.
9:21
-> number
12.0
VVALUE
VVALUE is used for the late evaluation of variables.
Synopsis
Description
VVALue( variable_name )
-> number
VVALue( variable_name ,
number )
-> number
element
Example
Errors
9.3.5
Real Arrays
Real array expressions can contain attributes of type real array, for example: DESP.
9.4
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.
9:22
12.0
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 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.
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.
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.
9.5
9.5.1
N 45 W 20000 U 1000
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
9:23
12.0
The Cartesian position may optionally be followed by WRT to specify the axis system. See
WRT.
9.5.2
WRT
The WRT keyword is used to toggle between absolute and relative units.
When we specify an element (or attribute of an element) we are specifying an absolute point
in world space. The point can be given in world space or some other axis. Normally the
answer is required relative to the owner axis system and this is taken as the default. For
example:
Q POS
Q POS OF /EQUIP1
If we require the result in some other axis system then the WRT keyword is used. For
example:
Q POS WRT /*
The default is that Cartesian coordinates are in the owning elements axis system. This
absolute position can be expressed in different coordinate systems: the default is again the
owners axis system.
Note: The CONSTRUCT syntax uses the world as the default axis
Example
Item
Comments
A SITE at (0,0,0)
A ZONE at (100,0,0)
9:24
12.0
Item
Comments
An EQUIPMENT at (100,0,0)
With orientation N IS E
A BOX at (-100,0,0)
The result of Q (N 100 WRT /BOX1), will depend on the current element.
Location
Result
World
Site
Zone
Equipment
Box
9.5.3
FROM
In some cases we require an offset from a fixed point, other than the position of an item. For
example, a point or attribute.
The FROM syntax is used for this. We may still use WRT in combination with FROM, but in
this case the WRT is only used to determine the axis direction and not the offset, since the
offset is specified by the FROM part.
Consider the following:
Item
Comments
A SITE at (0,0,0)
A ZONE at (100,0,0)
An EQUIPMENT at (100,0,0)
With orientation N IS E
A BOX at (-100,0,0)
9:25
12.0
The result of Q (N 100 WRT /* FROM /BOX1), shown as in , will depend on the
current element.
Location
Result
Equipment
Box
Result
(100,0,0)
Equipment
(0,0,0)
Box
(0, -100, 0), because the axis for the result is the
Equipment.
9.5.4
Location
Result
(0,100,0)
Equipment
Box
(0, -100, 0), because the axis for the result is the
Equipment.
Comparing Positions
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 the user, only those coordinates which are given by the user are
defined. For example:
N10U3
9:26
12.0
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.
Examples
POS EQ W1S2D3
E10N10 GT E0N0
E10N0 GT E0N0
E10N0 GT E0U100
N10 EQ W4D7
9.5.5
POLAR
The POLAR keyword allows positions to be defined in terms of a distance in a particular
direction from a point.
The syntax is:
9:27
12.0
For example:
9.5.6
Direction
The basic ways of defining a direction are:
N 45 W
All Cartesian directions are returned in the axis of the owner of the current element. For
example:
(U WRT CE )
will return the Z axis of the current element relative to its owner.
Q ( Z WRT /SCTN )
will return the Z axis direction of /SCTN relative to the owner of the current element. For
example, if the result is required in world coordinates the current element must be the
World or a Site.
The CLOSEST keyword, which will find the closest element in a particular direction.
The syntax is:
EXTENT, which is how far to search in the direction specified, default 10M
AFTER, or the distance along vector after which to start search, default 0M
FROM, which specifies an alternative start point other than current element. This is of
particular use for a branch where you might want to specify the HPOS or TPOS.
Examples are:
9:28
12.0
CLOSEST DIR E
CLOSEST BOX WITH ( PURP EQ FLOO ) DIR D WRT /
* EXTENT 20M
CLOSEST VALVE DIR N 45 U FROM E100 N200 U300
CLOSEST BRAN HANG AFTER 2M
9.5.7
Orientations
The basic ways of defining an orientation are:
The AXES keyword, which will allow you to use P-points to specify orientations.
----<---------.
/
|
>-- AXES --*--- PArrive ---|
|
|
|--- PLeave ----|
|
|
|--- PTail -----|
|
|
|--- HHead -----|
|
|
|--- HTail -----|
|
|
--- PPOINT n --+-- OF - <gid> ---->
An example is:
9.6
This will orient a branch component, such as a valve, so that it is aligned with the
previous component and its P3 is up.
See also Comparing Positions.
Text Expressions
Text expressions can contain the following:
9:29
12.0
9.6.1
Text operators
Text functions
Text Operator
The text operator available is +, used for concatenation.
9.6.2
Synopsis
Description
Side Effects
None.
Example
Errors
-> text
Text Functions
The text functions available are:
Function
Comments
AFTER
BEFORE
DISTANCE
LOWCASE, UPCASE
PART
REPLACE
STRING
SUBS, DSUBS
TRIM
VTEXT
AFTER
Synopsis
Description
-> text
None.
9:30
12.0
Example
Errors
None.
BEFORE
Synopsis
Description
Side Effects
None.
Example
Errors
None.
-> text
DISTANCE
Synopsis
DISTance ( number1 )
-> text
DISTance( number1,
logical1, logical2,
logical3, number2,
logical4)
-> text
9:31
12.0
Description
PDMS
For both US and PDMS formats the following rules are
observed:
9:32
12.0
Side Effects
None.
Example
15.1/2
->
->
->
->
2-10.1/2.
34.5
34 1/2
1008.1/2
Inches
US
Decimal
DP 1
Zeros
Inches
US
Fraction
128.5
10-_8_1/2___
10-_8_1/2__
128.5
128_1/2
1008.1/2
120.0
10-_0_______
10-_0______
120.0
120____
1000____
11.5
0-11_1/2___
11.5
11_1/2
011.1/2
0.75
0-_0_3/4___
0.8
3/4
001____
0.0
0-_0_______
______
0.0
____
000____
-10.0
-0-10_______
-10______
-10.0
-10____
-010____
Errors
11_1/2__
3/4__
Denom 4
No Zeros
9:33
12.0
Synopsis
UPCase ( text1 )
-> text
LOWCase ( text1 )
-> text
Description
Side Effects
None.
Example
Errors
None.
PART
Synopsis
Description
PART(text1, number1)
-> text
PART(text1, number1 ,
text2)
-> text
Side Effects
None.
Example
Errors
None.
9:34
12.0
REPLACE
Synopsis
Description
Side Effects
None.
Example
Three arguments:
9:35
12.0
B,
AAAAZ
-1,
-1)
->
->
If the search string text2 is longer than the input string text1,
the input string text1 is returned unchanged. For example:
REPLACE(AA, AAAAA , B) -> AA
If no occurrence of the search string text2 is found, the input
string text1 is returned unchanged. For example:
REPLACE( AAAAAA,B,C)
-> AAAAAA
-> AAAAAA
9:36
12.0
STRING
Synopsis
Description
-> text
-> text
-> text
Numeric
Logical
Id
Position
Direction
Orientation
None.
Example
STRING ( 1 ) -> 1
STRING ( 1 , D3 ) -> 1.000
STRING ( 1.23456789 ) -> 1.23457
STRING(1.1230000) ->1.123
STRING ( 1.23456789 , D3 ) -> 1.235
STRING (9*9 LT 100) -> TRUE
STRING (OWN OF CE) -> /PIPE1
STRING(POS) -> W1000 N20000 U18000
STRING(POS, D4 ) -> W10000.1234 N20000.1234
U18000.1234
STRING(HDIR OF /PIPE1-1) -> D
STRING(E 22.0125 N, D2) -> E 22.01 N
STRING (ORI OF NEXT) -> Y IS D AND Z IS U
Errors
9:37
12.0
Synopsis
Description
SUBString ( text1 ,
number1 )
-> text
SUBString ( text1 ,
number1 , number2 )
-> text
DSUBString ( text1 ,
number1 )
-> text
DSUBString ( text1 ,
number1 , number2 )
-> text
Side Effects
None.
Example
SUBSTRING
SUBSTRING
SUBSTRING
SUBSTRING
SUBSTRING
SUBSTRING
SUBSTRING
Errors
None.
(
(
(
(
(
(
(
abcdef
abcdef
abcdef
abcdef
abcdef
abcdef
abcdef
, 3 ) -> cdef
,-3 ) -> abcd
, 3 , 2 ) -> cd
, -3, 2 ) -> de
, 3 , -2 ) -> bc
, 10 ) ->
, -10 , 2 ) -> ab
TRIM
Synopsis
TRIM ( text1 )
-> text
-> text
-> text
9:38
12.0
Description
Side Effects
None.
Example
Errors
None.
VTEXT
VTEXT is used for the late evaluation of variables.
Synopsis
Description
VTEXT ( variable-name )
-> text
VTEXT ( variable-name ,
number )
-> text
Side Effects
Example
Errors
9:39
12.0
9.7
9.8
9.9
Querying Expressions
All expressions may be queried. Arrays are always concatenated into a single variable.
Imperial values are always output as inch to variables. This preserves maximum accuracy.
To output in FINCH, then the DISTANCE function must be used. In general expression do
not have to be enclosed in brackets, but to be sure that other queries are not picked up by
mistake then it is advisable to do so.
Particular queries that could lead to confusion are those available both outside and inside
expressions. These are:
Q PPOINT n
Q POS or cartesian position
Q ORI or cartesian orientation
The functionality may vary between outside and inside expression queries. For example, Q
N 100 FROM /POSS is not valid. It must be entered as Q N 100 FROM /POSS ).
9.10
Units in Expressions
When a user enters a literal value then the units are not necessarily known. The units for
PML variables are also unknown. Where units are known, then all internal values are set to
mm. The value is then converted to the target (local) units on assignment to a variable or on
output.
To cope with unknown units each value remembers its original units internally. An attempt
is then made to allow for unknown units across operators.
The internal settings for units are as follows:
9:40
12.0
Setting
Comments
NONE
UNKN
MM
INCH
SQIN
CUIN
On comparison, addition or subtraction of two values the following assumptions are made. If
one of the units is unknown and the other is anything other than UNKN, then the unknown
value is assumed to have the same units as the known units. A suitable conversion is then
done if the known units is INCH or SQIN or CUIN.
For example:
(XLEN GT 10).
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 ensure that the comparison works as expected.
Special action is also taken to preserve the correct units across multiplication, division,
POWER and SQRT, in particular the maintenance of SQIN and CUIN. In these situations,
units of %UNKN are treated as none. For example, (10 * XLEN) is assumed to result in
INCH rather than SQIN. An exception is made when a reciprocal would result from division.
For example: for (10 / XLEN) we assume that the 10 is in inches rather than none.
9:41
12.0
9.11
Precision of Comparisons
To allow for small losses of accuracy, the following tolerances are used.
Object
Tolerance
Number
9.12
(1.000002 GT 1) is TRUE.
Position
Direction or Orientation
Undefined Values
In order to permit expressions like ((DIAM GT 200.0) OR (TYPE EQ BOX)),
expressions must be able to cope with undefined values. Generally, applying an operator to
one or more undefined arguments has an undefined result.
Two exceptions are: the use of the AND operator with a false argument, will result in FALSE,
regardless of whether or not the remainder of the arguments are defined; and OR which
returns TRUE if any of its arguments is TRUE. For example, consider applying the above
expression when the current element is a box. DIAM is undefined; therefore (DIAM GT
200.0) is also undefined. However, (TYPE EQ BOX) is certainly true and so the final
result of the whole expression evaluates to TRUE.
An undefined result occurs when:
9.13
One of the operands or arguments of a function (except some cases of AND and OR) is
undefined.
An element is undefined (e.g. OWNER when the current element is the WORLD).
Two position constants are compared with GT, GE, LT or LE and they have no common
coordinates (e.g. N10 EQ E5).
Unset Values
A particular class of undefined values are unset values. The concept exists for attributes
which are valid for a given element, but for which no value has been assigned. Typically
9:42
12.0
these may be elements of an array, or word attributes. References of value =0/0 are also
treated as unset.
Unset values are propagated as for undefined values (except for Boolean operations- see
below). Undefined values take precedence over unset. There is a specific logical function
UNSET to test if a values is unset.
Across comparisons, unset values are not propagated, but are treated as follows:
Operator
Results in FALSE.
NE
Results in TRUE.
OR , AND
9:43
12.0
9:44
12.0
10
10.1
Examples:
RULE SET POS (N300 E400 U500) ON ALL BOX FOR /PUMP1
Sets rule for position attribute for all boxes in /PUMP1
10:1
12.0
Querying:
10.2
Q ATT
Displays all attribute values and all rules for the current
element.
Q RULES
Q RUL OF XLEN
Examples:
10.3
10:2
12.0
Examples:
10.4
Examples:
10.5
10:3
12.0
10:4
12.0
11
Collections
You can create an array which includes a number of elements which all satisfy specific
selection criteria, as defined by yourself. This is a useful way of collecting information on
particular elements. You use the syntax:
VAR !Array
!Array is the name of the array that will be created to contain the elements selected.
The following general criteria can be used to define the selection:
A point in the hierarchy below which all selected elements must lie.
All criteria (except for class) are optional.
Class is essentially a list of element types (or possibly of actual elements). This list can be
optionally qualified to indicate whether members should be included, or whether only items
(that is, the lowest level components in the hierarchy below a given element) should be
included.
For example:
Command
Effect
ALL
ALL FRMW
( /PIPE1 /PIPE2 )
The command:
11:1
12.0
would collect all elements for which the attributes XLEN, YLEN and ZLEN match the criteria
in the array !LENGTHS.
A volume is defined by the WITHIN keyword. You can define the volume either in terms of
two diagonally opposite points of an enclosing box, or as a volume around an element (with
an optional clearance around the box which contains the element). For example:
VAR !VOLUME COLLECT ALL WITHIN W800N17000U0 TO W1400N13500U1200
collects all elements in the defined volume into the array !VOLUME.
VAR !P COLLECT ALL PIPE EXCLUSIVE WITHIN VOLUME /PUMP1 1500
collects all piping components within the volume defined by a box drawn 1500 mm around
/PUMP1 and puts them into the array !P. The EXCLUSIVE keyword indicates that only the
chosen elements exclusively within the given volume are to be selected.
In Outfitting there are structural design data, termed DESIGN, and detailed design data,
termed PRODUCTION. These two sets of data represent the same model and occupy the
same 3D space. For a volumetric query you only want one of the sets of data returned.
These two options allow you to choose which set of data will be returned by the volumetric
query.
Example:
Command Syntax
>--- VOLUMEOPTION ---+--- HULL DESIGN ---.
|
|
|
|
- HULL PRODUCTION -+--- ON ---.
|
|
|
|
--- OFF ---+--->
Hierarchy criteria can be defined by the FOR keyword. It identifies a list of elements below
which all selected elements must occur. You can also include an exclusion list. For example:
11:2
12.0
If you specify more than one criteria, the specifications must be in the above order Some
more examples:
ALL
ALL FRMW
( /PIPE1 /PIPE2 )
ALL WITH (XLEN GT 1000 ) Selects all elements where XLEN is greater than
1000mm
ALL WITHIN W8000N17000U1000 TO W1400N13500U1200
Selects all elements within the defined volume
ALL PIPE WITHIN VOLUME /PIPE1 1500
Selects all piping elements within a volume defined as
a box drawn around /PIPE1, with a clearance of
1500mm between the edges of /PIPE1 and the volume
box.
Note: This selection mechanism is a very powerful tool for searching whole databases and
MDBs. However, if you're not careful the selection process could be very time
consuming and tie up a lot of computer resource. Therefore, it is important that
selection is performed as efficiently as possible. PDMS tries to apply the above
criteria so that the fastest condition is applied first and the most expensive is left to
last.
Typically, the expression is the slowest condition to evaluate, so it is important to limit the
selection as much as possible. For instance, take the example which appeared above:
11:3
12.0
IPIPECOMPS [1]
IPIPECOMPS [2]
IPIPECOMPS [3]
.
.
.
IPIPECOMPS [354]
of every piping
= '=20/302'
= '=20/303'
= '=20/304'
= '=25/510'
!TUBING[1]
!TUBING[2]
11:4
12.0
12
12.1
Change Management
You can query the following aspects of the history of modifications to the current database:
12.1.1
A complete history of the sessions in which an element or attribute has been modified.
Examples:
Q LASTMOD
Q SESSMOD
Q USERMOD
Q LASTMOD HIER
Q LASTMOD XLEN
Command Syntax:
12:1
12.0
12.1.2
Examples:
Q HISTORY DIAM
Q HISTORY[2] DIAM
gives second most recent session in which DIAM attribute was modified.
Note: History records are restricted to a maximum of 120 sessions.
Command Syntax:
Q HISTORY attribute_name
12.1.3
Examples:
Q SESSCOMM 58
Q SESSUSER 58
Q SESSDATE 58
12.1.4
12:2
12.0
Examples:
Q SESSION ON <date>
where <date> is a standard syntax graph. Remember that <date> actually specifies a time
(to the nearest minute), so take care if you use any defaults here.
12.2
Comparison Date
It is only by comparing a drawing at two states or sessions that it is possible to determine
what has changed. Using the current state of the drawing as one state we must then
reference an earlier state in order to make the comparison. We do this by specifying a
Comparison Date (COMPDATE), that is, the drawing state at a time that we wish to use as a
baseline or datum.
12.2.1
Examples:
The date subgraph takes the keyword NOW This in effect sets the comparison date to the
start of the session. This can be useful for querying the original value of an attribute.
12:3
12.0
The EXTRACT keyword sets the comparison to an extract DB. This extract DB must be one
further up the extract hierarchy. If the EXTRACT keyword is used by itself, the comparison is
set to the parent extract. Thus this enables you to find out what has been changed in this
extract.
12.2.2
Examples:
Q COMPDATE
to get extract
to get date
Q COMPDATE STAMP
to get stamp
Note: Note that if a stamp is used to set the comparison date, this will set the comparison
session for each database within the stamp. It will also reset any comparison dates
set previously.
The query for the comparison date will only return a value if the COMPDATE was set using
a single date. Otherwise it will return unset. Similarly querying a stamp is only valid if the
COMPDATE was set using a stamp.
Command Syntax:
Q ----------|-COMPDATE-|--SESSION--|--FOR---dbname--->
VAR -vname--
|EXTRACT---
|----DATE--------->
----STAMP-------->
12.2.3
MODIFIED Function
For the more sophisticated queries relating to modifications, the MODIFIED function tells
you if the given element has changed since the comparison date. This function is not
implemented within PML2 expressions.
Examples:
To return true if element has changed at all since the comparison date use:
Q MODIFIED()
It will also return true if the element has been created since the
comparison date.
To return true if POS or ORI have been modified since the comparison date use:
Q MODIFIED(POS,ORI)
12:4
12.0
Examples:
To return true if the position of P1 has changed use.
Q MODIFIED(P1 POS)
You may follow each attribute name with the qualifying keywords below.
To check this element and members use:
OFFSPRING
To check all elements for which this element represents the significant one use:
SIGNIF
To check all elements for which this element represents the primary one use:
PRIMARY
To check this element and everything below (descendants):
DESCENDANTS
You can use the keywords below on their own to test for any attribute change. e.g. to
return true if any geometry for item or any descendants have changed use:
Q MODIFIED(GEOM DESCENDANTS)
To return true if any element for which this element is primary, has changed use:
Q MODIFIED(PRIMARY)
You may use the OF syntax as for attributes. e.g. to return true if /PIPE1 has been
modified since the comparison date use:
Q MODIFIED() OF /PIPE1
You may put the new functions anywhere within a PDMS PML1 expression. i.e. after Q/Var
and within collections. e.g.
12:5
12.0
12.2.4
CREATED Function
Determine if an element has changed since the Comparison Date. The functionality of
CREATED() is identical to using the pseudo attribute ELECREC.
Examples:
Q ( CREATED() )
12.2.5
DELETED Function
Determine if an element has been deleted since the Comparison Date. The functionality of
DELETED() is identical to using the pseudo attribute ELEDELC.
Examples:
returns deleted since comparison date
Q ( DELETED() )-
However if the element has been deleted then you cannot have navigated to it in the first
place, hence DELETED() by itself will always be true. There are two ways around this.
Either include the elements reference number e.g.:
Q (DELETED() of =15752/234 )
Or use it as part of the 'old' syntax. e.g.:
12.2.6
Pos/ori change
The level information used to determine the geometry is set by the REPRE MASS
command. The REPRE MASS command is also available in ISODRAFT.
SPREF
12:6
12.0
Thus it is possible that the geometry element has changed but the GEOM keyword returns
false, e.g. a UDA value may have changed, but this has no effect on the evaluated
geometry.
The CATMOD keyword on the other hand will return true for any change.
You can use the CATMOD keyword on any element. It will return false if the element does
not have a SPREF or CATREF reference pointing into the catalogue database. It will return
true if the element has a SPREF or CATREF attribute and either (a) this reference attribute
has itself changed in value or (b) the catalogue element pointed at, or any catalogue
element owned by or pointed at by this element, either directly or indirectly, has changed in
any way.
The exception is that elements pointed at by UDAs are not compared, although the value of
the UDA itself is checked. Thus if a reference valued UDA has been changed then this will
count as a change, but if only the element pointed at has changed, then this will not count.
12.2.7
Q OLD XLEN
If a name is given, the name will be for the item at the comparison date, not now. Thus
values of deleted items may be accessed. e.g.
12:7
12.0
12.3
12.3.1
Changes in the list order for BRANCH, POGON, DRAWI and BOUND elements.
Keywords:
DIFFERENCE SINCE
Description:
Lets you report all changes to one or more specified database elements since an earlier
version of that database. The output is in the form of a report listing all elements and
attributes which have changed, with their old and new values. The report can be sent to a
file by using the ALPHA FILE or ALPHA LOG commands.
Note: The database states are compared between SAVEWORK operations. For example,
if you last saved your design changes at 9:30 and ask for a comparison since 10:00,
the current settings will be compared with those at 9:30.
Examples:
DIFF /ZONE
Command Syntax:
>- DIFFerence <selele> SINCE -+- <date/time> -+-----------------------.
|
|
|
|- LATEST ------|
|
|
|
|
|--SESSION nn --|
|
|
|
|
---------------+- EXTRACT -+- extname -|
|
|
- extno ---+->
12:8
12.0
13
Output Syntax
The OUTPUT command is used to scan specified parts of the Project DBs and to output, in
the form of a structured list, the data held there. The output is presented in such a way that
it is both easy to interpret and suitable for reinput as design data to appropriate PDMS
modules.
Output takes the form of macro files whose contents precisely recreate the hierarchical
structure of the elements currently listed in the selected DBs, including the settings of all of
their attributes. Facilities are provided for controlling the precise layout of the output files
and the amount of information presented. Element cross-referencing (indexing) is also
available, to assist in interpreting the data. The macro is sent to a file by using the standard
ALPHA FILE or ALPHA LOG commands.
You may view the output lists directly on your screen, or you may send them to text files for
subsequent inspection or printing. The latter files can be read back as input to say a
different constructor module form that from which the data was derived, either in the same
or in a different project. You can include only the elements which have been changed since
a specified time (i.e. those elements which would be listed by the DIFFERENCE command).
The macro files created can be used for the following purposes:
To modify part of a design. The output macro file containing the relevant design data
can be edited using operating system facilities and can then be reinput to the
appropriate DB. You could use this method, for example, to change Nozzle Catalogue
References in a pipework subsection.
To transfer part of a design from one DB to another or from one project to another.
To archive all or part of the Project DB. Listings may be read in at any future revision of
PDMS, making such as archive more secure in some respects than the Project DB
itself.
13:1
12.0
13.1
Attributes and other data which are output for information only, and which cannot be
reinput (such as the time and date of the report, the element owners, etc.) are enclosed
by the delimiter codes $ (and $). They are, in consequence, treated as comments on
reinput and are ignored as data.
Cross-reference attributes (for example HREF, CREF) are enclosed between the
comment delimiters $ (and $) where they occur with their elements, and are output
again collectively at the end of the list. This ensures that all elements which are
referenced in the list are present in the database before any references to them are set.
An END command is output after each new element has been created. This moves the
Current Element pointer up to its original level in the hierarchy, ensuring that those
elements (such as BOX) which may appear at two different levels in the hierarchy are
reinput at the correct level.
The units of measurement used to output dimensional and positional attributes are,
where possible, appropriate to the input requirements of the modules in which they will
be used. For example, the Bolting attributes BDIA and LENG are always in millimetres,
so as to be consistent with the input to PARAGON.
Millimetre coordinates and dimensions are normally listed to three decimal plates (i.e.
to an accuracy of 0.001mm), and so a previous list may be used to check design data
which has been created with a lower precision in another module. This could be useful,
for example, in assessing a misalignment reported by a data consistency check.
Note: Numerical accuracy deteriorates after six significant figures. The number of decimal
places output can be varied using the PRECISION command.
ORI and ANGLE attributes are listed to four decimal plates. Orientations are output as
angles using the ORIANGLE attribute to give more accurate output, and (as comment
text) in XYZENU axis form. For example
Nozzles are treated somewhat differently to other elements in that their positions and
orientations are output twice; first in Owner coordinates (for normal reinput), and
secondly in Zone coordinates. The latter data enables them to be checked directly
against Branch head and Tail positions, which are always stored in Zone coordinates.
(Examples are given later in this section).
Note: The lengths of output lists are normally minimised by omitting all attributes which
have the PDMS default values, since the use of such values in input data generally
has no effect. The omission of data in this way can, however, cause problems under
some circumstances, and so may be overridden if required.
13.2
13:2
12.0
The design to be transferred can include some of all of the following major categories of
data:
PDMS Catalogue items, including Bolt Tables, Connection Compatibility Tables, etc.
To transfer a complete Project you would normally use the ADMIN Module. You would
usually use output lists only for transferring specific parts of the Catalogue, Design, Drawing
(PADD) or Dictionary (UDA) data.
Output cannot be used to transfer the Project Configuration; you must use ADMIN to output
the configuration in a suitable format for transfer. This operation is included in this chapter
simply to show where it fits into the overall operation.
Before any transfer takes place, you should consolidate the Project DB by removing all DB
copies, leaving only the Master versions. You should also ensure that individual DBs have
consistent and unique contents, thus avoiding, for example, an attempt to transfer two
similar (but not identical) copies of the Catalogue.
When a Outfit listing is to be input to a Project DB, it is essential that all elements which are
referred to in the list, but which are specified outside the list, have already been loaded into
that DB. After the transfer of data to a new Project, the element reference numbers will
almost certainly be different from the original and no reliance should be placed on their
meaning. As a general rule, therefore, all items which are reference (such as Catalogue
Components, Specification Components, etc.) should be named.
Note particularly that, if you use Outfit to transfer data from Design, Catalogue or Drawing
(PADD) DBs which include User-defined Attributes (UDAs), the reloading process will fail if
there are any UDSs for which definitions are not available in the target Project of if the
definition in the target project is inconsistent with the definition in the source project. For this
reason, UDA definitions held in the Dictionary DBs should be transferred first.
Note: Cross-references between Branches and attached Nozzles may be lost during the
transfer process. In this case, they must be reset in the newly created DB.
13.3
OUTPUT Command
The following options are available:
OUTPUT CHANGES
Incorporates INCLUDE command for named items. The item must be named in both the
current and referenced session. For unnamed items, a DELETE, CREATE sequence is
followed.
OUTPUT REVERSE CHANGES
This is the opposite of the current OUTPUT CHANGES command: that is the output is
generated can be read back in to restore the given data to how it was at the given session.
13:3
12.0
OUTPUT /ZONE-A
Outputs all elements, whether or not they have ever been changed.
The following options are not available with the OUTPUT CHANGES functionality.
Once one (or more) of these options have been specified then REVERSE, CHANGES,
etc. cannot be specified following the element to be output.
13:4
12.0
COMMENT
This specifies that certain comments will be added to the OUTPUT output. The reference
number of each element will be shown immediately after the NEW (or OLD) command, the
owner of each element will be given, and each reference valued attribute will be output as a
comment during the first pass (normally, reference valued attributes are ignored entirely
during the first pass). In addition, the position and orientation of Nozzles will be written in the
coordinate system of their ZONE. All these comments will be enclosed between the
standard comment delimiters, that is:
$(' comment_text '$)
TABULATE n
This specifies that the output will be tabbed by n*d spaces at the beginning of each line,
where d is the depth of the element. Note that where a logical line is split over more than
one physical line in the file (which can happen very easily when a short line length has been
specified on the 'ALPHA FILE' command) then subsequent physical lines are not tabbed.
n must be between 0 and 6.
TABULATE 0 is equivalent to no tabbing.
INDEX
This specifies that
As with tabulate, only logical lines will be numbered; continuation lines will not be numbered.
BRIEF
This specifies that only the NEW or OLD command line will be written, that is, no attributes
will be written.
NOUDA
This specifies that user defined attributes will not be written.
ONLY NOUN or
ONLY (NOUN . NOUN)
These options specify that only elements of the given types will be output. If more than one
type is to be specified, then the list must be enclosed in brackets. At most 10 types may be
specified.
PASS n
This specifies that only the first pass (element definitions; no reference valued attributes) or
the second pass (reference valued definitions, connections) will be written. n must be 1 or 2.
OLDFORMAT
This specifies that element definitions will be written using the OLD (rather than the NEW)
command, that is, elements are to be updated when the file is re-read.
Locate
If the LOCATE option is used and 'output /VESS1', then the output will contain the following:
13:5
12.0
OUTPUT CE SAMEREF
2. The NEW command has been extended to allow a new keyword 'REF' followed by a
reference number to be specified after the element name. If so specified, and the
reference number is valid, then the element will be created with the reference number
given.
If an invalid reference number is given, the command will be rejected. Two new error
messages may occur:
Examples:
13.4
13:6
12.0
Each example shows the commands used to generate the style of listing following them.
Note: The examples are independent; each starts with all formatting options in their default
states.
13.4.1
Full output
The following example shows a segment of a full output. Output contains all elements and
non-default attribute settings
Command
OUTPUT /HTEST
Output
INPUT BEGIN
NEW SITE /HTEST
POS E 0 N 0 U 1000
NEW ZONE /EQUIP
FUNC 'Equipment - above grade'
PURP EQUI
NEW EQUIPMENT /E1301
POS E 2850 N 5660 U 1470
UCOFG E 0 N 0 U 0
BUIL true
DSCO unset
PTSP unset
INSC unset
NEW CYLINDER
POS E 0 N 3299 U 0
ORI Y is D and Z is N
LEVE 0 4
DIAM 960
HEIG 6598
END
NEW CYLINDER
POS E 0 N 6848 U 0
ORI Y is D and Z is N
LEVE 0 4
DIAM 1020
HEIG 500
13:7
12.0
13.4.2
Comment Option
Will output in the same format as Full Output but will include comments to identify sections
of the output.
Command
OUTPUT COMMENT/HTEST
Output
INPUT BEGIN
NEW SITE /HTEST $(=15772/17197$)
$( OWNE /* $)
POS E 0 N 0 U 1000
NEW ZONE /EQUIP $(=15772/17198$)
$( OWNE /HTEST $)
FUNC 'Equipment - above grade'
PURP EQUI
NEW EQUIPMENT /E1301 $(=15772/17213$)
$( OWNE /EQUIP $)
POS E 2850 N 5660 U 1470
UCOFG E 0 N 0 U 0
BUIL true
DSCO unset
PTSP unset
INSC unset
NEW CYLINDER $(=15772/17214$)
$( OWNE /E1301 $)
POS E 0 N 3299 U 0
ORI Y is D and Z is N
LEVE 0 4
DIAM 960
HEIG 6598
END
NEW CYLINDER $(=15772/17215$)
$( OWNE /E1301 $)
POS E 0 N 6848 U 0
ORI Y is D and Z is N
LEVE 0 4
DIAM 1020
HEIG 500
13:8
12.0
13.4.3
Tabulate Option
Will output with the code tab indenting
Command
INPUT BEGIN
NEW ZONE /PIPES
FUNC 'Piping - above grade'
PURP PIPE
NEW PIPE /100-B-1
BUIL false
SHOP false
TEMP -100000
PRES 0
PSPE /A3B
CCEN 0
CCLA 0
LNTP unset
REV 0
DUTY unset
DSCO unset
PTSP unset
INSC unset
UCOFG E 0 N 0 U 0
DELDSG unset
NEW BRANCH /100-B-1-B1
BUIL false
SHOP false
HPOS E 12490 N 12280 U 1150
TPOS E 4979 N 9887 U 13655
HDIR U
TDIR N
UCOFG E 0 N 0 U 0
LHEA true
LTAI true
HBOR 50
TBOR 100
HCON FBD
TCON FBD
13:9
12.0
DETA true
LNTP unset
TEMP -100000
PRES 0
HSTU /A3B/PA50
CCEN 0
CCLA 0
PSPE /A3B
DUTY unset
DSCO unset
PTSP unset
INSC unset
PTNB 0
DELDSG unset
13.4.4
Index Option
Will include line numbers within comments at the start of each line. At the end of a file an
index of refno/name is also included in comments
Output Syntax
$(
$(
$(
$(
1. $) INPUT BEGIN
2. $) NEW ZONE /EQUIP
3. $) FUNC 'Equipment - above grade'
4. $) PURP EQUI
$(
$(
$(
$(
$(
$(
$(
5.
6.
7.
8.
9.
10.
11.
$)
$)
$)
$)
$)
$)
$)
$(
$(
$(
$(
$(
$(
12.
13.
14.
15.
16.
17.
$)
$)
$)
$)
$)
$)
NEW CYLINDER
POS E 0 N 3299 U 0
ORI Y is D and Z is N
LEVE 0 4
DIAM 960
HEIG 6598
$(
18. $) END
13:10
12.0
$(
19. $) NEW CYLINDER
$(
20. $) POS E 0 N 6848 U 0
$(
21. $) ORI Y is D and Z is N
$(
22. $) LEVE 0 4
$(
23. $) DIAM 1020
$(
24. $) HEIG 500
INPUT FINISH
$(
--- REF INDEX --=15772/17198
...
2
=15772/17213
...
5
=15772/17214
...
12
=15772/17215
...
19
=15772/17216
...
26
=15772/17217
...
33
=15772/17218
...
40
=15772/17219
...
48
=15772/17220
...
56
=15772/17221
...
64
=15772/17222
...
72
=15772/17223
...
80
=15772/17224
...
88
=15772/17225
...
96
=15772/17226
...
104
=15772/17227
...
114
=15772/17228
...
124
=15772/17229
...
134
13.4.5
Brief Option
Will only output element names
Output syntax
INPUT BEGIN
NEW ZONE /STEEL
NEW STRUCTURE /EQUIPRACK
NEW FRMWORK /EQUIPRACK/MAIN
NEW SBFRAMEWORK /EQUIPRACK/MAIN/NODES
NEW PNODE /PNOD-009
NEW PJOINT
END
13:11
12.0
END
NEW
NEW
END
END
NEW
NEW
END
END
NEW
NEW
END
END
NEW
NEW
END
END
NEW
NEW
END
END
NEW
NEW
END
END
13.4.6
PNODE /PNOD-010
PJOINT
PNODE /PNOD-012
PJOINT
PNODE /PNOD-013
PJOINT
PNODE /PNOD-014
PJOINT
PNODE /PNOD-015
PJOINT
PNODE /PNOD-016
PJOINT
NOUDA Option
Will take the format of a full output, but UDA's will be suppressed.
Output syntax
13.4.7
OLDFORMAT Option
Will output old commands only.
Output syntax
INPUT BEGIN
OLD ZONE /CIVIL
FUNC 'Civils'
13:12
12.0
PURP CIV
OLD STRUCTURE /F1.PLANT
UCOFG E 0 N 0 U 0
BUIL false
OLD SUBSTRUCTURE /F1.PLANT.FLR
UCOFG E 0 N 0 U 0
POS E 0 S 2000 U 0
BUIL true
SHOP false
OLD PYRAMID /F1.PLANT.FLR-1
POS E 2225 N 18525 D 232.5
ORI Y is N and Z is E
LEVE 0 8
XBOT 450
YBOT 9100
XTOP 420
HEIG 3050
XOFF 15
YOFF 2150
END
13.4.8
ONLY option
Specify only certain elements for output. Below are examples of variations of this command
Output Syntax for Sites Only
INPUT BEGIN
NEW SITE /HTEST
POS E 0 N 0 U 1000
END
INPUT END /HTEST
INPUT FINISH
Output Syntax for Branches Only
13:13
12.0
Output
INPUT BEGIN
NEW BRANCH /100-B-1-B1
BUIL false
SHOP false
HPOS E 12490 N 12280 U 1150
TPOS E 4979 N 9887 U 13655
HDIR U
TDIR N
UCOFG E 0 N 0 U 0
LHEA true
LTAI true
HBOR 50
TBOR 100
HCON FBD
TCON FBD
DETA true
LNTP unset
TEMP -100000
PRES 0
HSTU /A3B/PA50
CCEN 0
CCLA 0
PSPE /A3B
DUTY unset
DSCO unset
PTSP unset
INSC unset
PTNB 0
DELDSG unset
END
Output Syntax for Nozzles and Branches
13:14
12.0
DUTY unset
DESP 400 200 25 5
END
NEW BRANCH /100-B-1-B1
BUIL false
SHOP false
HPOS E 12490 N 12280 U 1150
TPOS E 4979 N 9887 U 13655
HDIR U
TDIR N
UCOFG E 0 N 0 U 0
LHEA true
LTAI true
HBOR 50
TBOR 100
HCON FBD
TCON FBD
DETA true
LNTP unset
TEMP -100000
PRES 0
HSTU /A3B/PA50
CCEN 0
CCLA 0
PSPE /A3B
DUTY unset
DSCO unset
PTSP unset
INSC unset
PTNB 0
DELDSG unset
END
13.4.9
PASS Option
Optionally output 1st pass or 2nd pass only
Output syntax 1st pass only
INPUT BEGIN
13:15
12.0
INPUT BEGIN
OLD /E1301-S1
CREF /200-B-4-B1
CATR /AAZFBD0TT
TAIL
OLD /E1301-S2
CREF /250-B-5-B1
CATR /AAZFBD0TT
HEAD
OLD /E1301-S3
CREF /250-B-5-B2
CATR /AAZFBD0TT
HEAD
OLD /E1301-T1
CREF /100-C-12-B2
CATR /AAZFBB0NN
TAIL
OLD /E1301-T2
CREF /100-C-13-B1
CATR /AAZFBB0NN
HEAD
13:16
12.0
OUTPUT
OUTPUT
OUTPUT
OUTPUT
OUTPUT
INPUT BEGIN
NEW LOCATE SITE /HTEST
NEW LOCATE ZONE /EQUIP
NEW REPLACE EQUIPMENT /E1301
POS E 2850 N 5660 U 1470
UCOFG E 0 N 0 U 0
BUIL true
DSCO unset
PTSP unset
INSC unset
NEW CYLINDER
POS E 0 N 3299 U 0
ORI Y is D and Z is N
LEVE 0 4
DIAM 960
HEIG 6598
END
NEW CYLINDER
POS E 0 N 6848 U 0
ORI Y is D and Z is N
LEVE 0 4
DIAM 1020
HEIG 500
END
13:17
12.0
INPUT BEGIN
NEW REPLACE EQUIPMENT /E1301
POS E 2850 N 5660 U 1470
UCOFG E 0 N 0 U 0
BUIL true
DSCO unset
PTSP unset
INSC unset
NEW CYLINDER
POS E 0 N 3299 U 0
ORI Y is D and Z is N
LEVE 0 4
DIAM 960
HEIG 6598
END
NEW CYLINDER
POS E 0 N 6848 U 0
ORI Y is D and Z is N
LEVE 0 4
DIAM 1020
HEIG 500
END
NEW BOX
POS E 0 N 1710 D 315
LEVE 0 8
XLEN 460
YLEN 300
ZLEN 630
END
Output syntax Locate only
INPUT BEGIN
NEW LOCATE SITE /HTEST
13:18
12.0
13:19
12.0
This will display the Datal Listing Options form, where different options can be set. If the
file name is left empty, the Datal will be written to the Command Window.
13:20
12.0
14
Project Queries
14.1
MDB Mode
The MDB command puts you into MDB Mode, where you can use a limited number of
Monitor commands. This lets you change the current multiple database during a DESIGN
session without having to leave the Module and enter Monitor.
When you enter MDB mode, you can either update the current MDB to save your design
changes, or ignore any changes made since your last SAVEWORK command, by specifying
UPDATE or NOUPDATE.
When you are in MDB mode, you can give the following commands, which are the same as
the corresponding Monitor commands. For more information, see the Monitor Reference
Manual.
Examples:
MDB UPDATE
MDB NOUPDATE
EXCHANGE
DEFER
CURRENT
PROTECT
USER username
PROJECT code
LIST
/PIPING
/PIPING READONLY
EXIT
14:1
12.0
Command Syntax:
14.2
Example:
A typical response to the STATUS command could be:
Project: XYZ
User:
CSI (758)
Teams:
B
MDB:
/DESIGN
Current DBS:
1 PIPING/SITE
2 MASTER/CATLOG
Deferred DBS:
3 STRUCT/STEEL
RW
R
This indicates that the designer has identified himself as being PDMS user CSI, that he is
logged in to the computer as user 758, that he is a member of team B, that he is accessing
Project XYZ, and that he has selected an MDB called /DESIGN.
Command Syntax:
14.3
14:2
12.0
only status) or modifying (Read/Write status) the database. It also gives the workstation
identifier for each user.
Example:
A typical response to the SYSTAT command could be:
PROJECT XYZ
==============
USER SYSTEM (57b)
MODULE ADMIN
MDB ** UNSET **
USER HHJ (752)
MODULE DESIGN
MDB /STEEL
DB
MASTER/AREA-A
MASTER/AREA-B
STRUC/AREA-C
MODE
R
R
RW
This shows that two users are currently logged in and are using PDMS for work on Project
XYZ. The Project Coordinator is using ADMIN but is not accessing any databases. User 752
is using DESIGN. He is accessing the MDB named /STEEL, whose constituent DBs are as
listed. He has Read-only status for the DBs owned by the MASTER (System) team and
Read/Write access to the DB STRUC/AREA-C.
Command Syntax:
14.4
Examples:
A typical response to the LIST MDB command could be:
14:3
DESI Exclusive
DESI Update
DESI Exclusive
12.0
Examples:
Deferred DBS:
4 PIPING/AREA-B
5 MASTER/AREA-E
DESI Exclusive
DESI Update
MDB:/STEEL
Current DBS:
1 MASTER/AREA-A
2 MASTER/AREA-B
3 STRUCT/AREA-C
Deferred DBS:
**NONE**
DESI Exclusive
DESI Exclusive
DESI Exclusive
MDB:
/ANSI
Current DBS:
1 CATAL/AREA-E
Deferred DBS:
**NONE**
CATA Update
.----<----.
/
|
>-- LIst --*-- USers --|
|
|
|-- MDBs ---|
|
|
|-- DBs ----|
|
|
|-- TEams --
|
-------------->
14.5
14:4
12.0
Command Syntax:
14.5.1
USer
---.
|
USer word ---|
|
TEam word ---|
|
DB dbname ---|
|
MDB name ----+-->
Examples:
Q DBNAME
Q DBTYPE
Q DBFNUMBER
Q DBFILE
Gives
pathname
for
current
\usr\pdms\projects\SAM\sam006
DB
file;
e.g.
Command Syntax:
DBNAme -----.
|
DBTYpe -----|
|
DBFNumber --|
|
DBFIle -----+-->
14:5
12.0
14:6
12.0
15
Link Documents
The link documents mechanisms provide the ability to link external and internal documents
to database objects. Every element in the database can be associated with a resource that
is either another database element for example a drawing, or an external document such as
a file, or a web page. External documents are not stored in the Dabacon database.
15.1
Overview
Each document or other resource, either external or internal, that can be linked to a
database element is represented in the database as Link Descriptor. The Link Descriptor's
main role is to carry information about the document it describes and a Uniform Resource
Locator (URL).
It is possible for any other elements in the database to reference these Link Descriptors
through a two-way mechanism enabling users to find all elements that reference a particular
Link Descriptor and the opposite, find all documents referenced by an element.
It is also possible to assign classification information to each Link Descriptor. The
classification information provides the facility of assigning multiple class information to a
Link Descriptor so that a search for all elements that have references to documents with
specific classification assigned can be made. For example, a search can be made for all
Link Descriptors classified as "Installation"-class document or all pumps that do not
reference any "Certificate" and "Security"-class documents.
The following figure shows a schematic overview of the possible linkage to external
documents and internal drawings.
15:1
12.0
15.2
Data Structures
There are several element types used for organizing links and storing link information. All
kinds of elements may be created using standard PDMS command syntax.
15.2.1
15.2.2
15.2.3
15:2
12.0
LNKURL - a string storing raw Uniform Resource Locator of the linked document.
It can be for example a file ("file:///Docsys/ProjectX/MyDocument.doc"), a web page
("http://www.aveva.com"), an e-mail address ("mailto:[email protected]") or any
other external resource. If it is an internal database reference (e.g. to a drawing) it is
stored in a form "dabref://=12345/6789".
15.2.4
LNKREF - if the Link Descriptor holds a reference to an internal database element, i.e.
the LNKURL stores a "dabref://" link, this attribute returns a reference to a database
element linked through this descriptor. Otherwise, LNKREF returns a null reference. It
is also possible to store an internal reference through this attribute.
URL - this attribute returns merely the value of LNKURL but its main purpose is that
you can assign either an external URL or a string with reference number of a Dabacon
element, which is automatically recognised and stored as an internal link.
LNKCLS - list of Link Class elements that classify this Link Descriptor.
There is also a pseudo attribute available named LNKDOC that returns a list of LNDESC
elements that are classified by this LNCLAS.
15:3
12.0
15.3
15.3.1
15.3.2
----------------+
/
|
>--- DLADD -------*-- <selatt> -----+------>
15:4
12.0
15.3.3
----------------+
/
|
>--- DLREMove ----*-- <selatt> -----+------>
It is possible to remove an association both by removing a link from a Link Descriptor to a
database element or by removing a link from a database element to a Link Descriptor. For
example:
If current element is a Hull Panel Element (HPAN) named /PANEL1 the following command
removes link to document described by /MYDOC1 from /PANEL1:
15:5
12.0
You can use the LNKREF to set link to an internal database reference e.g. a drawing:
15.3.4
Classifying a link
Each Link Descriptor can have a number of Link Classes assigned. To classify a link:
1. Create a Link Class element (LNCLAS) somewhere in the links hierarchy.
2. Assign the class to the Link Descriptor with a DLADD command.
If current element is a Link Descriptor (LNDESC) named /MYDOC1 the following command
classifies this Link Descriptor as a /MYCLASS1 and /MYCLASS2 document:
15.3.5
Unclassifying a link
To remove classification information from a Link Descriptor you can use the DLREMOVE
command.
If current element is a Link Descriptor (LNDESC) named /MYDOC1 the following command
removes /MYCLASS1 classification from the /MYDOC1 Link Descriptor:
15.3.6
15:6
12.0
15.4
Links Addin
The Link Addin is a customisable user form which simplifies much of the process of creating
links.
The Links Addin uses the notion of link categories to treat different types of links differently.
By default the Links Addin comes with predefined link categories for: E-mail address, Web
page, Existing file and Drawing. However, it gives the possibility to extend this set of link
types and to create additional categories. For example, one could add a category that would
accumulate links to documents or links to FTP resources if needed.
When creating a link the Links Addin gives the possibility to choose a link category and set
options for the new link. An example link creation dialog is shown below.
Each link category has a name and an icon. The dialog provides the possibility to input the
Name and Description for the link, depending on the type of link being created the form will
prompt for an appropriate resource to link to. For example when created a link to a web
page the user is prompted to enter a valid Address such as http://www.aveva.com.
Clicking OK will open a new window prompting for a container for the new link.
15:7
12.0
On its first use, the Select destination container window will appear empty. This is because
a Link World and Link Folder hierarchy has not been created.
As discussed in the section Configuring Link Hierarchy at least one Link World should be
created.
In the Select destination container window right click to create a New world. A New folder
must also be created below a world.
15:8
12.0
The Link Addin can be customised through a set of APIs, for further information refer to the
Software Customisation Reference Manual.
15:9
12.0
15:10
12.0
16
CREF
TREF
Nozzle in
Equipment DB
owned by User
E's team
Only User P
can set this
User P sets the TREF of their Branch to point to the CREF of the Nozzle in the
Equipment DB.
When User P tries to set the Nozzles CREF, they receive a message telling them that
they are trying to connect to a read-only DB and that an inter-DB connection macro is
being created automatically. This macro, which stores the commands needed to set the
CREF, is given a name with the format abc001.mac (where the macro number, 001
here, is allocated sequentially), and is held in the directory ABCMAC (or as defined by
the projects environmental variables).
16:1
12.0
When User E next enters MONITOR (usually when entering or leaving PDMS), they
receive a message asking them to run the inter-DB connection macro abc001.mac and
to delete it when they have done so.
User E enters DESIGN and runs the inter-DB connection macro by giving the
command
$M /%ABCMAC%/abc001.mac
This sets the CREF for the Nozzle to point to the TREF of the Branch and completes
the link between the two DBs.
User E enters MONITOR (or ADMIN if they have sufficient access rights) and deletes
the redundant macro by giving the command
DELETE MACRO 1
where 1 is the macro number. This command is valid in DESIGN, MONITOR and
ADMIN.
Note: If User P checks their DB for data consistency errors between Stages 2 and 4, when
the macro has been created but not yet run, they will get an incompatible connection
reference message. They cannot finalise their design until User E has run the
macro. Thus, the successful use of inter-DB connection macros relies on good cooperation between the teams involved.
Note: Inter-DB connection macros are also created in multiwrite DBs if an attachment is
claimed by another user.
16:2
12.0
17
Save/Getwork
Interval
Start
Stop
Dismiss
Active
17:1
12.0
An interval starts when the user performs a Save Work using a the GUI, or when the service
was last started.
In normal operation, users will be prompted by a Confirm form, if they do not save work
within the time interval specified on the AutoSave form. Note that answering No to this
forms starts a new time interval even though work has not been saved.
Notes:
1. Each Save Work creates a new session on the database, which increases the size of
the database.
2. The "undo" command only operates between Save Work commands. Once a Save
Work command is performed, it is not possible to undo operations performed prior to
the last Save Work.
3. Data is permanently saved to the database when a Save Work command has been
performed. The user cannot remove changes saved to the database. A Project
Administrator can remove changes by rolling back sessions in the Administrator
module.
4. The user may experience a brief delay while the Save Work command performs its
task.
Installation
This utility is installed using the PML Add-ins mechanism described in the Software
Customisation Guide.
This add-in is specified by add-in definition file with pathname
%PDMSUI%\DES\ADDINS\asave. This add-in file is delivered with the product, but it must
be edited to enable the utility.
In order to do this, open the asave file with a text editor. It should contain the following
commented add-in instructions.
# ---------------------------------------------------------------------#
# (c) Copyright 2007 to Current Year AVEVA Solutions Limited
#
# File:
ASAVE
# Type:
Add-in Definition
# Module:
design
#
# Author:
Malcolm Barlow
# Created:
Wed Mar 28 2007
#
# Description:
Add-in definition for autosave application
#
17:2
12.0
#
#
#
#
#
#
#
#
#
---------------------------------------------------------------------Name:
ASAV
Directory:
GEN
Title:
Autosave
Object:
apphsave
ShowOnMenu:
FALSE
ModuleStartup:!!appHsave.initialise(true)
StartupModify: GEN
:!!appHsave.modifyMenus()
Remove the # character from the lines containing add-in instructions. Leave the # character
at the beginning of comment lines. The resulting file should appear as follows:
# ---------------------------------------------------------------------#
# (c) Copyright 2007 to Current Year AVEVA Solutions Limited
#
# File:
ASAVE
# Type:
Add-in Definition
# Module:
design
#
# Author:
Malcolm Barlow
# Created:
Wed Mar 28 2007
#
# Description:
Add-in definition for autosave application
#
# ---------------------------------------------------------------------#
Name:
ASAV
Directory:
GEN
Title:
Autosave
Object:
apphsave
ShowOnMenu:
FALSE
ModuleStartup:!!appHsave.initialise(true)
StartupModify: GEN
:!!appHsave.modifyMenus()
Save the changes to the asave file. Restart PDMS for these changes to take effect.
By changing the asave file it is possible to configure the system to start with autosave
enabled or disabled. The file as shown above starts DESIGN with autosave enabled. In
order to start the system with autosave installed and disabled, change the following line:
ModuleStartup:!!appHsave.initialise(true)
to
ModuleStartup:!!appHsave.initialise(false)
17:3
12.0
17:4
12.0
18
18.1
18.2
18.3
NameSeq Object
Methods
Name
Result
Description
NameSeq(string)
Bool
Next()
String
Remove()
Bool
Delete sequence.
SetStart(real)
Bool
SetMax(real)
Bool
SetStep(real)
Bool
18:1
12.0
18.4
SetWraparound()
Bool
SetNoWraparound()
Bool
GetMax()
Real
GetStep()
Real
Get increment.
GetCurrent()
Real
GetName()
String
IsWraparound()
Bool
18:2
12.0
ABS . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9:15
ACOS . . . . . . . . . . . . . . . . . . . . . . . . . . 9:15
ADD . . . . . . . . . . . . . . . . . . . . . . . . . . . 9:12
AFTER . . . . . . . . . . . . . . . . . . . . . . . . . 9:30
ALOG . . . . . . . . . . . . . . . . . . . . . 9:16, 9:19
AND . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9:3
ARRAY . . . . . . . . . . . . . . . . . . . . . . . . . 9:16
Array variables
selecting ( only) . . . . . . . . . . . . . . . 11:1
ARRAYSIZE . . . . . . . . . . . . . . . . . . . . . 9:16
ARRAYWIDTH . . . . . . . . . . . . . . . . . . . 9:17
ASIN . . . . . . . . . . . . . . . . . . . . . . . . . . . 9:15
ATAN . . . . . . . . . . . . . . . . . . . . . . . . . . 9:15
ATANT . . . . . . . . . . . . . . . . . . . . . . . . . 9:15
attributes
in expressions . . . . . . . . . . . . . . . . 9:40
EMPTY . . . . . . . . . . . . . . . . . . . . . . . . . . 9:8
EQUAL . . . . . . . . . . . . . . . . . . . . . . . . . . 9:4
Explicit mode
multiwrite DBs . . . . . . . . . . . . . . . . . 6:1
Expressions
directions in . . . . . . . . . . . . . . 9:27, 9:28
format . . . . . . . . . . . . . . . . . . . . . . . . 9:1
IDS in . . . . . . . . . . . . . . . . . . . . . . . 9:22
logical . . . . . . . . . . . . . . . . . . . . . . . . 9:2
logical array . . . . . . . . . . . . . . . . . . 9:11
nesting . . . . . . . . . . . . . . . . . . . . . . . 9:2
numeric . . . . . . . . . . . . . . . . . . . . . 9:12
positions in . . . . . . . . . . . . . . . . . . . 9:23
precision of comparisons . . . . . . . . 9:42
real . . . . . . . . . . . . . . . . . . . . . . . . . 9:12
real array . . . . . . . . . . . . . . . . . . . . 9:22
text . . . . . . . . . . . . . . . . . . . . . . . . . 9:29
types . . . . . . . . . . . . . . . . . . . . . . . . 9:1
Extracts . . . . . . . . . . . . . . . . . . . . . . . . . 6:2
master . . . . . . . . . . . . . . . . . . . . . . . 6:2
B
BADREF . . . . . . . . . . . . . . . . . . . . . . . . . 9:6
BEFORE . . . . . . . . . . . . . . . . . . . . . . . . 9:31
Boolean operators . . . . . . . . . . . . . . . . . . 9:3
C
COLLECT command . . . . . . . . . . . . . . . 11:1
Collections . . . . . . . . . . . . . . . . . . . . . . 11:1
COMP . . . OF . . . . . . . . . . . . . . . . . . . . 9:17
Comparator operators . . . . . . . . . . . . . . . 9:3
Comparison precision
in expressions . . . . . . . . . . . . . . . . 9:42
COSINE . . . . . . . . . . . . . . . . . . . . . . . . 9:18
CREATED . . . . . . . . . . . . . . . . . . . . . . . . 9:7
F
format distances . . . . . . . . . . . . . . . . . . 9:32
FROM . . . . . . . . . . . . . . . . . . . . . . . . . . 9:25
Functions
logical . . . . . . . . . . . . . . . . . . . . . . . . 9:6
numeric . . . . . . . . . . . . . . . . . . . . . 9:13
real . . . . . . . . . . . . . . . . . . . . . . . . . 9:13
text . . . . . . . . . . . . . . . . . . . . . . . . . 9:30
G
GE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9:5
Group element . . . . . . . . . . . . . . . . . . . . 8:6
GT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9:5
D
Database changes
querying history . . . . . . . . . . . . . . . 12:1
DEFINED . . . . . . . . . . . . . . . . . . . . . . . . 9:7
DELETED . . . . . . . . . . . . . . . . . . . . . . . . 9:8
DIFFERENCE command . . . . . . . . . . . 12:8
DISTANCE . . . . . . . . . . . . . . . . . . . . . . 9:31
format . . . . . . . . . . . . . . . . . . . . . . . 9:32
US format . . . . . . . . . . . . . . . . . . . . 9:32
DIVIDE . . . . . . . . . . . . . . . . . . . . . . . . . 9:13
DLENGTH . . . . . . . . . . . . . . . . . . . . . . . 9:18
DMATCH . . . . . . . . . . . . . . . . . . . . . . . . 9:19
DSUBSTRING
Japanese characters . . . . . . . . . . . 9:38
I
IDs in expressions . . . . . . . . . . . . . . . . 9:22
Implicit mode
multiwrite DBs . . . . . . . . . . . . . . . . . 6:1
INT . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9:18
L
Late evaluation of expressions . . . 9:11, 9:22
Later evaluation of expressions . . . . . . 9:40
LE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9:5
LENGTH . . . . . . . . . . . . . . . . . . . . . . . . 9:18
Logical functions . . . . . . . . . . . . . . . . . . 9:6
LOWCASE . . . . . . . . . . . . . . . . . . . . . . 9:34
Index page 1
12.0
LT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9:5
SINCE command . . . . . . . . . . . . . . . . .
SINE . . . . . . . . . . . . . . . . . . . . . . . . . . .
SQRT . . . . . . . . . . . . . . . . . . . . . . . . . .
STRING . . . . . . . . . . . . . . . . . . . . . . . .
SUBSTRING . . . . . . . . . . . . . . . . . . . .
SUBTRACT . . . . . . . . . . . . . . . . . . . . .
Master database
of extract . . . . . . . . . . . . . . . . . . . . . . 6:2
MATCH . . . . . . . . . . . . . . . . . . . . . . . . . 9:19
MATCHWILD . . . . . . . . . . . . . . . . . . . . . 9:8
MAX . . . . . . . . . . . . . . . . . . . . . . . . . . . 9:19
MIN . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9:19
MODIFIED . . . . . . . . . . . . . . . . . . . . . . . 9:9
MULTIPLY . . . . . . . . . . . . . . . . . . . . . . 9:13
N
NEGATE . . . . . . . . . . . . . . . . . . . . . . . . 9:20
NEQUAL . . . . . . . . . . . . . . . . . . . . . . . . . 9:4
NINT . . . . . . . . . . . . . . . . . . . . . . . . . . . 9:20
NOT . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9:5
NUMBER (REAL) . . . . . . . . . . . . . . . . . 9:21
Numeric expressions . . . . . . . . . . . . . . 9:12
Numeric operators . . . . . . . . . . . . . . . . 9:12
O
OCCUR . . . . . . . . . . . . . . . . . . . . . . . . . 9:20
Operators
logical . . . . . . . . . . . . . . . . . . . . . . . . 9:3
numeric . . . . . . . . . . . . . . . . . . . . . . 9:12
precedence . . . . . . . . . . . . . . . . . . . . 9:2
text . . . . . . . . . . . . . . . . . . . . . . . . . 9:30
OR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9:6
P
PART . . . . . . . . . . . . . . . . . . . . . . . . . . 9:34
Positions
comparing . . . . . . . . . . . . . . . . . . . . 9:26
POWER . . . . . . . . . . . . . . . . . . . . . . . . 9:21
12:8
9:18
9:21
9:37
9:38
9:12
T
TANGENT . . . . . . . . . . . . . . . . . . . . . .
Text functions . . . . . . . . . . . . . . . . . . . .
Text operator . . . . . . . . . . . . . . . . . . . .
TRIM . . . . . . . . . . . . . . . . . . . . . . . . . .
9:18
9:30
9:30
9:38
U
UNDEFINED . . . . . . . . . . . . . . . . . . . . . 9:7
Undefined values
in expressions . . . . . . . . . . . . . . . . 9:42
Units
in expressions . . . . . . . . . . . . . . . . 9:40
UNSET . . . . . . . . . . . . . . . . . . . . . . . . . 9:10
Unset values
in expressions . . . . . . . . . . . . . . . . 9:42
US format distances . . . . . . . . . . . . . . . 9:32
V
VAR command . . . . . . . . . . . . . . . . . . .
VLOGICAL . . . . . . . . . . . . . . . . . . . . . .
VTEXT . . . . . . . . . . . . . . . . . . . . . . . . .
VVALUE . . . . . . . . . . . . . . . . . . . . . . . .
11:1
9:11
9:39
9:22
W
WRT . . . . . . . . . . . . . . . . . . . . . . . . . . . 9:24
Q
Querying
variables and expressions . . . . . . . 9:40
R
REAL . . . . . . . . . . . . . . . . . . . . . . . . . . . 9:21
Real arrays in expressions . . . . . . . . . . 9:22
Real expressions . . . . . . . . . . . . . . . . . 9:12
Relational operators . . . . . . . . . . . . . . . . 9:3
REPLACE . . . . . . . . . . . . . . . . . . . . . . . 9:35
Index page 2
12.0