TM-1861 AVEVA Administration (1.4) System Administration Rev 1.0
TM-1861 AVEVA Administration (1.4) System Administration Rev 1.0
AVEVA Administration
Guide System Adminstration
AVEVA Administation (1.4)
System Administration TM-1861
Revision Log
Updates
Change highlighting will be employed for all revisions. Where new or changed information is presented
section headings will be highlighted in Yellow.
Suggestion / Problems
If you have a suggestion about this manual or the system to which it refers please report it to AVEVA
Training & Product Support at [email protected]
This manual provides documentation relating to products to which you may not have access or which may
not be licensed to you. For further information on which products are licensed to you please refer to your
licence conditions.
Disclaimer
1.1 AVEVA does not warrant that the use of the AVEVA software will be uninterrupted, error-free or free
from viruses.
1.2 AVEVA shall not be liable for: loss of profits; loss of business; depletion of goodwill and/or similar
losses; loss of anticipated savings; loss of goods; loss of contract; loss of use; loss or corruption of
data or information; any special, indirect, consequential or pure economic loss, costs, damages,
charges or expenses which may be suffered by the user, including any loss suffered by the user
resulting from the inaccuracy or invalidity of any data created by the AVEVA software, irrespective of
whether such losses are suffered directly or indirectly, or arise in contract, tort (including negligence)
or otherwise.
1.3 AVEVA's total liability in contract, tort (including negligence), or otherwise, arising in connection with
the performance of the AVEVA software shall be limited to 100% of the licence fees paid in the year
in which the user's claim is brought.
1.4 Clauses 1.1 to 1.3 shall apply to the fullest extent permissible at law.
1.5 In the event of any conflict between the above clauses and the analogous clauses in the software
licence under which the AVEVA software was purchased, the clauses in the software licence shall
take precedence.
Copyright Notice
All intellectual property rights, including but not limited to, copyright in this Training Guide and the associated
documentation belongs to or is licensed to AVEVA Solutions Limited or its affiliates.
All rights are reserved to AVEVA Solutions Limited and its affiliates companies. The information contained in
this Training Guide and associated documentation is commercially sensitive, and shall not be adapted,
copied, reproduced, stored in a retrieval system, or transmitted in any form or medium by any means
(including photocopying or electronic means) without the prior written permission of AVEVA Solutions
Limited. Where such permission is granted, AVEVA Solutions Limited expressly requires that the Disclaimer
included in this Training Guide and this Copyright notice is prominently displayed at the beginning of every
copy that is made.
Licenses issued by the Copyright Licensing Agency or any other reproduction rights organisation do not
apply. If any unauthorised acts are carried out in relation to this copyright work, a civil claim for damages
may be made and or criminal prosecution may result.
AVEVA Solutions Limited and its affiliate companies shall not be liable for any breach or infringement of a
third party's intellectual property rights arising from the use of this Training Guide and associated
documentation.
Trademark Notice
AVEVA™, AVEVA Everything3D™, AVEVA E3D™, [AVEVA Tags], Tribon and all AVEVA product and
service names are trademarks of AVEVA Group plc or its subsidiaries
Use of these trademarks, product and service names belonging to AVEVA Group plc or its subsidiaries is
strictly forbidden, without the prior written permission of AVEVA Group plc or AVEVA Solutions Limited. Any
unauthorised use may result in a legal claim being made against you.
Fluent is a trade mark of Microsoft Corporation. The Fluent user interface is licensed from Microsoft
Corporation by AVEVA and use of the Fluent trademark is strictly forbidden.
All other trademarks belong to their respective owners and cannot be used without the permission of the
owner.
Introduction ............................................................................................................................9
1.1 Aim ..................................................................................................................................................... 9
1.2 Objectives.......................................................................................................................................... 9
1.3 Prerequisites ..................................................................................................................................... 9
1.4 Course Structure............................................................................................................................... 9
1.5 Using this guide ................................................................................................................................ 9
1.6 Setting up the Training Course ..................................................................................................... 10
NT Authentication ................................................................................................................13
2.1 Creating NT Authentication Users – A Worked Example ........................................................... 13
2.1.1 Testing AVEVA E3D NT Authentication Access ....................................................................... 14
2.2 Access in TTY Mode ....................................................................................................................... 15
2.2.1 Entering AVEVA E3D in TTY Mode – A Worked Example ....................................................... 15
Exercise 1 – NT Authentication .................................................................................................17
Data Integrity Checking .......................................................................................................19
3.1 Main Checks .................................................................................................................................... 19
3.2 Corrupt Databases.......................................................................................................................... 19
3.3 Database Storage Statistics .......................................................................................................... 19
3.4 Preparatory Steps before Checking Starts .................................................................................. 20
3.5 The Database Integrity Check Form ............................................................................................. 20
3.5.1 Check options ............................................................................................................................ 20
3.5.2 Settings options ......................................................................................................................... 21
3.6 Macros ............................................................................................................................................. 23
3.7 DICE Output..................................................................................................................................... 23
3.8 The Error Report ............................................................................................................................. 25
3.9 The Report Summary...................................................................................................................... 25
Exercise 2 – Data Consistency Checking .................................................................................26
Reconfiguring Databases ....................................................................................................27
4.1 Reconfigure Basics ........................................................................................................................ 27
4.1.1 Intermediate and Dump Files .................................................................................................... 27
4.2 Reconfigure Commands: ............................................................................................................... 27
4.2.1 The FROM Command ............................................................................................................... 27
4.2.2 The TO Command ..................................................................................................................... 28
4.2.3 The RCFCOPY Command ........................................................................................................ 28
4.2.4 The RECONFIGURE Command ............................................................................................... 29
4.2.5 The RCFUPDATE Command.................................................................................................... 29
4.3 Database Reconfigure - A Worked Example ................................................................................ 30
4.4 Partial Reconfigure - A Worked Example ..................................................................................... 30
4.5 Reconfigure Using SAMEREF – A Worked Example .................................................................. 31
4.5.1 RECONFIGURE SAMEREF - Using Backtrack ........................................................................ 31
4.5.2 RECONFIGURE SAMEREF - Using Delete Database ............................................................. 31
4.6 Include Across DB Command ....................................................................................................... 33
Extract Databases ................................................................................................................35
5.1 Overview .......................................................................................................................................... 35
5.1.1 Creating Extract Databases....................................................................................................... 35
5.1.2 Working in Extract Databases ................................................................................................... 35
5.1.3 Updating Changes from Extract Databases .............................................................................. 36
5.2 Types of Extract Databases........................................................................................................... 36
5.2.1 Standard Extracts ...................................................................................................................... 36
5.2.2 Working Extracts........................................................................................................................ 36
5.2.3 Variant Extracts ......................................................................................................................... 37
5.3 Write Access to an Extract Databases ......................................................................................... 37
5.4 Extract Families .............................................................................................................................. 37
5.4.1 Querying Extract Families ......................................................................................................... 38
PML Encryption....................................................................................................................79
8.1 Overview of PML Encryption ......................................................................................................... 79
8.2 PML Encryption Utility Program.................................................................................................... 79
8.2.1 Typical workflow ........................................................................................................................ 79
8.2.2 Licensing.................................................................................................................................... 79
8.3 Using the PML Encryption Utility Program .................................................................................. 80
8.4 Choosing Files ................................................................................................................................ 80
8.4.1 Single File .................................................................................................................................. 81
8.4.2 All Files in a Folder .................................................................................................................... 81
8.4.3 Files in a pmllib -like Folder Tree............................................................................................... 81
8.4.4 File/Folder paths ........................................................................................................................ 81
8.5 Encryption Algorithms ................................................................................................................... 81
8.5.1 Encryption Type 0: No Encryption ............................................................................................. 81
8.5.2 Encryption Type 1: Trivial Encryption ........................................................................................ 81
8.5.3 Encryption Type 2: Basic Encryption......................................................................................... 82
8.5.4 Encryption Type 3: RC4 Encryption .......................................................................................... 82
8.6 Encrypting PML Files – A Worked Example ................................................................................ 82
8.6.1 Supplied Files ............................................................................................................................ 82
8.6.2 Directory Structure..................................................................................................................... 84
8.6.3 Testing using a Batch File ......................................................................................................... 84
8.6.4 Testing the None Option............................................................................................................ 85
8.6.5 Testing the Trivial Option........................................................................................................... 85
8.6.6 Encrypting Multiple Files............................................................................................................ 86
8.6.7 Testing Encrypted Macros......................................................................................................... 87
8.7 Buffering Encrypted Files .............................................................................................................. 89
8.8 Editing Published PML Files.......................................................................................................... 90
8.9 Using the $R Command ................................................................................................................. 91
8.10 Troubleshooting .......................................................................................................................... 91
Intellectual Property Rights Database Protection..............................................................93
9.1 IPR Protection Overview ................................................................................................................ 93
9.2 Changes to Admin for Database Protection ................................................................................ 93
9.3 Changing Database Protection – A Worked Example................................................................. 95
9.3.1 Testing Database IPR Protection for the Output Command ..................................................... 96
9.3.2 Testing Database IPR Protection for the Copy Command........................................................ 97
9.4 Attribute Protection ........................................................................................................................ 97
9.5 Checking Attribute Protection – A Worked Example .................................................................. 98
9.5.1 Attributes as a Free User........................................................................................................... 98
9.5.2 Attributes as a Restricted User.................................................................................................. 99
9.5.3 Comparing Results .................................................................................................................. 100
Enhanced Entry Scripts..................................................................................................101
10.1 Creating an Encrypted Entry Script ........................................................................................ 101
10.2 Typical Entry Macro .................................................................................................................. 104
10.3 Typical Entry Batch File ........................................................................................................... 105
10.4 Enhanced Entry Scripts (PML Publisher Available) .............................................................. 105
10.4.1 Typical User Macro.................................................................................................................. 105
10.4.2 Creating the Encrypted Entry Script ........................................................................................ 106
10.4.3 Typical Entry Batch File (PML Publisher Available) ................................................................ 106
The AVEVA System Administration training guide is designed as a continuation to the AVEVA
Administration Fundamentals training guide. It builds on existing AVEVA software administration concepts
and introduces additional functionality to assist administrators.
1.1 Aim
To provide administrators with the knowledge and skills necessary to administer AVEVA projects using
advanced features and functionality.
1.2 Objectives
Introduce AVEVA Administration concepts specific to Extract Databases, Data Access Control,
Encryption of files, and Intellectual Property Rights Database Protection.
Explain how Data Access Control can be used to control AVEVA E3D data.
1.3 Prerequisites
It is expected that trainees will have completed the TM-1860 AVEVA Administration Fundamentals training
course. Trainees who can demonstrate a suitable understanding of AVEVA software administration may
also be permitted to undertake the training.
Training will consist of oral and visual presentations, demonstrations, worked examples and set exercises.
Each workstation will have a training project populated with model objects. This will be used by the trainees
to practice their methods and complete the set exercises.
Certain text styles are used to indicate special situations throughout this document.
Menu pull downs and button press actions are indicated by bold dark turquoise text.
Additional information notes and references to other documentation will be indicated in the styles below.
Additional information
System prompts will be bold and italic in inverted commas i.e. 'Choose function'.
Example files or inputs will be in the courier new font. If users are required to enter information as part of
an example, appropriate fonts and styles previously outlined will be used.
Create a new project using the Project Creation Wizard 1.4.0. from the start menu select:
Select Start > All Programs > AVEVA > Manage > Project Creation Wizard 1.4.0 or alternatively by
clicking the New Project button from the AVEVA Administration Login form
Project Training
Code TRA
Address: C:\Users\Public\Documents\AVEVA\Projects\Training
Project - Training
Username - SYSTEM
Password - XXXXXX
In Admin select Utilities > Training Setup… from the main menu to display the Training Admin form.
Select Project > NT Authentication… from the main menu in the Admin
Module. A confirmation message is displayed.
When NT Authentication is switched on the NT Authenticated Users option is available on the Elements
pull-down.
Select NT Authenticated Users from the TYPE list on the Admin elements form. Click the Create… button
to display the NT Authenticated User Creation form.
In this example the User <user.name> has been used. It will always be lower case.
In the Name textbox enter the Windows Login username. The login username can be checked by pressing
<Ctrl> <Alt> <Delete> keys and locking the computer. In corporate organisations, it is normally set to
firstname.lastname, e.g. <user.name>.
Move the Project Users A.EQUIPMAN, A.PIPER and SYSTEM to the Authenticated Users list.
Because “<user.name>” is also the System Administrator the SYSTEM user should also be moved to the
Authenticated Users list.
Make sure the Default User is A.EQUIPMAN. Click the Apply button to create the user and Dismiss to
close the form.
Exit AVEVA Administration by selecting Admin > Exit from the main menu.
The Username pull-down will display user names allocated to the current Windows Login.
Once NT Authentication is
switched on only Authenticated Users
or Free Users can access AVEVA E3D.
Entry to AVEVA E3D is possible in TTY
mode as a Free User even if the current
windows user is not an Authenticated
User.
In some instances it may be necessary to gain access to the AVEVA products despite a user not having NT
Authentication or being a free user. It is possible to enter the AVEVA software in a non-graphical mode. This
is usually referred to as TTY mode.
This method of entry is also useful if graphics card performance issues are encountered on an
individual PC.
The following example shows a method of by-passing Windows NT Authentication. It requires the SYSTEM
User password.
Now enter AVEVA Administration by clicking the previously modified program button, the normal AVEVA
Administration login form will not be displayed.
Project TRA
USER SYSTEM/XXXXXX
DEV GRA
ADMIN
Exercise 1 – NT Authentication
1. Re-enter ADMIN and add A.ELECMAN and A.HVACMAN as Authenticated Users to the current NT
authenticated user.
3. Check that the Users appear in the pull down list on the login screen
This chapter describes the AVEVA Administration Data Integrity Checker known as DICE. DICE checks the
internal structure of a database.
Is the complete data hierarchy intact? For example, do all lists contain all of the members that they
should contain?
Are references to other databases valid? If not, a warning message will be displayed. The most
likely cause of which is a deleted database.
If the answer to any of these questions is no, a message will be output, either to the screen or to a named
ASCII file in the working folder.
Insufficient disk space or storage quota, so that the project area fills up while a database is being
updated.
Reconfiguration of a DB without a corresponding update of all DBs which have references pointing
into it.
It is important that any corruption that does occur is detected as quickly as possible, so that the System
Administrator can replace the faulty database by a backup copy. For this reason, DICE is designed to
operate as efficiently as possible using relatively little computer resource. This ensures it is economic and
practical to check the whole of the project database on a regular basis. It is recommended that DICE checks
should be run frequently, for example, before a daily backup is taken. DICE should be run at least once a
week.
During the checking process, DICE outputs statistics relating to the contents of the database, with very little
extra resource usage. The following statistics can be produced:
A summary of most of the project information stored in the System DB can be obtained by using the Query
options. This may be helpful when deciding which DBs need a detailed check.
DICE always accesses the DB in Read/Write mode, to prevent anyone else using the database while it is
being checked. Databases cannot be checked if they are in use elsewhere.
The Query options can be used to see which other users are currently accessing the project, which DBs
they are using, and what their access mode is to each. This can be done using Query > Project > User
Status….
The project should be locked as described before. Locking the project prevents any more users from
entering the project, although current users will be able to continue working.
The Check option list at the top of the form is used to choose which database(s) will be checked.
If the Selection option is chosen, databases can be picked from the list. Clicking the Select All button
selects all the databases in the list. Clicking the Clear Selection button clears the selection. The other
Check options from the option list are:
The options in the Settings area of the form control the types of check carried out, and they are described in
the following sections.
On – setting this option causes DICE to produce a statistical summary of the DB, including its
size, the number of elements contained within it, etc.
Extra – setting this option gives extra statistical information that may be required by the AVEVA
Support Engineer.
The checking of these external references is controlled by the External Refs option list which has the
following three options:
Check – each referenced element is checked to see if it is a valid type. A non-fatal error message is
produced for each invalid external reference found. The following tests are applied to each external
database to which reference is made:
Is the referenced database a valid type? For example, a reference attribute in a Design database which
points to a Draft database must be illegal.
Is the position pointed to within the limits of the referenced DB? Note that for a copied DB, DICE only checks
that the reference is within the limits of the largest copy.
Reject – this option should normally only be used if it is certain that the database which is being checked
should not contain any external references, for example, to a Dictionary database. If this command is used
any external reference found in the database will be reported as a fatal error and further checking will be
abandoned.
If databases have been copied, the references will be checked against the first copy found.
If set to On, then certain inconsistencies are corrected automatically. For example:
When a child extract recorded in the system database is not listed in the database header, the
extract is added to the database header.
When a child extract is listed in the database header but not recorded in the system database, the
extract is removed from the database header.
When a claimed element is not recorded as claimed in the parent extract’s claim list, the element is
claimed from the parent extract.
When an element that is not claimed is recorded as claimed in the parent extract’s claim list, the
element is released in the parent extract.
When an element is recorded as being claimed to an extract that is not a child extract, the element
is released.
In these cases, the error message is written as a warning. If the patch is successful, this will then be
followed by a message indicating the corrective action that has been taken. If the attempt to patch fails for
any reason (for example, if it is not possible to obtain write access to the database) then an error message
indicating this will be written instead.
If set to On, DICE will check that the claim list in an extract corresponds with the claim list in its master
database. The following error messages may be produced:
If Attempt to patch database problems is On, then an attempt is made to patch errors of type 701, 703
and 704, and these cases will be treated as warnings rather than errors.
If File is selected, the Filename textbox and Browse… button are activated so that a location and filename
may be specified.
When the form is complete, click the Apply button and the selected database(s) will be checked.
3.6 Macros
Normally the System Administrator will set up standard macros for the regular use of DICE. DICE has two
modes of operation:
From within AVEVA Administration - this is the normal way of using DICE. It can be used to check a
single DB, several DBs, or a whole Project. The Database Integrity Check form gives a quick interactive
check, or it can be done via a macro.
As a stand-alone program - this is useful if the System DB has been corrupted. DICE can be used to
check the System DB from outside the Project. In stand-alone mode, DICE can only check database files
one at a time.
The commands needed to write DICE macros, or to run DICE as a stand-alone program, are described in
the AVEVA Administrator Command Reference Manual. Some of the commands in DICE can only be used
from within AVEVA Administration, while some can only be used in stand-alone mode. DICE detects which
mode it is operating in and rejects any inappropriate commands.
As each DB or file is checked, a report is sent to the screen or a file. The basic report, produced in response
to any Check command, consists of three sections:
A report header, which includes information about the date and time of the check, the general details of the
database which is to be checked (DB name, DB number, filename, size, etc.) and the options selected.
An error report, which lists details of any errors encountered during the checking process.
A report summary, reports on whether the database is free from structural faults, suspect, or definitely
corrupt.
Other output sections, which will be appended to the basic report if they have been requested, are:
DB storage statistics
All the information which DICE can determine about a DB before starting its detailed checks is presented in
the report header.
If any particular item of information cannot be determined (for example, the project name when running in
stand–alone mode), it is presented in the header as *UNKNOWN*.
DICE Banner - This is repeated at the beginning of each report, in addition to its display when first entering
the module. It confirms the particular version of DICE which produced the report.
Date and Time – The date and time at which the check was started for that particular database or file.
Database - The name by which the database is known within the Project.
DB number - The database identification number, as it appears in the output from the LIST FILES
command.
DB size - The amount of space, in pages and megabytes, currently used by the database in its file. Also
shown are the maximum size (in pages) and the percentage of space filled. Note that if the database is more
than 90% full, the space filled is output as a warning.
Finally the report summary and the error report will be given, as described in the following sections.
During the checking of the structure of each database, DICE will output a diagnosis of each error as it is
found. These messages, which are output as part of the normal operation, are quite distinct from any
general error messages which may result from the incorrect running of an AVEVA E3D module.
This overall assessment of the database integrity is often the most useful part of the report to the user. A
number of messages may be output.
Fatal Errors
The database must NOT be used further in the context of a Project and a backup copy must be retrieved to
replace it.
Any occurrence of DB corruption should always be reported immediately to AVEVA Solutions Ltd and
documented in the usual way on a fault report.
Sometimes a corrupted database can be recovered by reconfiguration, but this is not guaranteed.
No Structural Errors
No errors have been found in the database(s) and they can continue to be used.
Warning Messages
For example, a reference pointing to an element which has been deleted has been found. The database can
continue to be used, but the inconsistencies may need further investigation.
1. Use the Integrity Checker to check the EQUIPMENT/DESIGN-AREA01-A database. Dice should find no
errors.
Reconfiguring a database (or project) is an administrative procedure used to upgrade projects and move
data between databases or projects.
RCFUPDATE When a new database is created the reference numbers used by AVEVA suite of
products will change. Databases using this information must be changed to point at
the new references. All databases which point to the new database will need to be
updated.
Both RECONFIGURE and RCFUPDATE make use of a ‘DUMP’ file. This contains a complete list of old and
new reference numbers. Each old reference has an equivalent new number in the new database. If the
process between RECONFIGURE and UPDATE is to be broken then the dump table must be saved.
It is always good practice to save the dump file as the RECONFIGURE and UPDATE process can take a
long time and may be subject to machine failure.
The syntax graphs for the FROM command offers several options. However, the FROM > DB > dbname
option is predominantly used.
The FROM > PROJECT > projectid > dbname option should be used with great care. A database can be
transferred from another project, but it must be completely independent of other databases. That is, it must
be ‘self-sufficient’ with no pointers to other databases.
>------FROM-----+----FIles-------file 1-------file 2----------.
| |
|----SYStem ----------------------------------|
| |
|----DBFile--------name-----------------------|
| |
|----PROJect---projectid----dbname------------|
| |
‘----DB------------dbname---------------------+---->
The only safe use of this command would be to transfer the catalogue database of an old project into a new
project. The old database would be left untouched in the old project as UPDATE will not scan outside the
current project. The new reconfigured database in the current (new) project would be the same as if the old
project catalogue had been data listed across to the new one.
The FROM > SYSTEM option applies to the reconfiguration of the system database. This action will
normally be necessary when a project is being converted to a newer version of AVEVA software. In this
case a ‘TO’ destination is not stated as the database is reconfigured into itself.
The TO Command has a similar form to the FROM command, except that there is the option of sending the
reconfigured information to an existing or a new database.
TO NEW dbname will create a new database of the correct type provided that an existing
TEAM name has been used.
If any other command than ‘TO NEW dbname or TO DB dbname’ is used, then the RCFUPDATE
command will have no effect.
This specifies the element to be copied. Normally ’RCFCOPY ALL’ is used, as the whole database is being
transferred. The option to copy parts of databases into other parts of existing databases can become a
hazardous operation if the whole process is not thought out carefully by the System Administrator.
.----------------------------------------------------.
/ |
>-----RCFCopy-+------------CATa--------------------------------------|
| |
|------------SPEC--------------------------------------|
| |
|------------ALL---------------------------------------|
| |
|------------name--+-----------------------------------|
| | |
| | +--name------------+ |
| ‘--INTO--| | |
| ‘--refno-----------+-------|
‘--------------------+---------------------------------|
| +--name--+ |
‘--INTO--| | |
‘--refno-+---------------+----->
The RCFCOPY command does not actually perform the copying function; it simply defines the information to
be transferred.
This is the final simple command that sets everything in motion. During the time that the RECONFIGURE is
running, information on PASS1 and PASS2 will be output on the screen. This serves as some indication of
the rate of progress, in that the completion of PASS1 can broadly be taken as the halfway mark.
At the end of the RECONFIGURE, a summary of errors similar in appearance to that seen in CLASHER is
given. It is essential that if any errors have occurred that the RECONFIGURE process is considered as
having failed.
RECONFIGURE is a very general application and as such will try to complete any task given to it. If errors
have occurred it is almost certain that the ‘TO’ database contains only some of the information which was
supposed to be transferred. The safest course is to delete this database before any attempt is made to
repeat the RECONFIGURE. If all the rules are obeyed then the message that the System Administrator will
expect to see every time will be:
***PASS 2 COMPLETED
RECONFIGURATION COMPLETE
0 ELEMENTS WERE NOT DEFINED IN DDL
0 ELEMENTS HAVE BEEN LOST
0 ELEMENTS ARE NO LONGER NAMED
0 ATTRIBUTES WERE WRONGLY DEFINED
The UPDATE process scans the databases specified for any pointers which refer to the old database and
changes them to reference to the new reconfigured one. The dump table is required for this task.
If the user has left the module since the RECONFIGURE was performed, they should have saved the dump
table:
DUMP /filename
LOAD /filename
If the UPDATE follows on immediately after the RECONFIGURE then this is not necessary.
>-RCFUPdate--+----DB----dbname------.
| |
|----MDB---mdbname-----|
| |
‘----TEam--teamid------+---->
The RCFUPDATE command may be given as many times as necessary to define all the MDB’s Teams or
individual databases which are used to point to the old database.
There is not an ‘UPDATE PROJECT’ command as this would demand that the system scans every single
database in the project. This would be wasteful, as it is unlikely that all the databases in a project have
pointers to one particular database, except perhaps the catalogue.
In the following example one piece of equipment is being moved from database EQUIPMENT/DESIGN-
AREA01-A to PIPEN/DESI-AREA01-A.
As just one piece of equipment is being moved it must be moved to an existing zone in the second
database.
The main difference from before is the line RCFCOPY /E1301 into /ZONE-PIPING-AREA01.
The equipment /E1301 will exist twice with the same name, but
only the one in database PIPING/DESI-AREA01-A is correct.
The Equipment should be deleted from EQUIPMENT/DESIGN-
AREA01-A. You will need to be logged into A-EQUIPMENT.
Navigate to the EQUI E1301 and check that the NOZZ
E1301/NS1 display the connection to the pipe.
When a database is reconfigured, the reference numbers of the elements in the destination database will be
different from the corresponding reference numbers in the source database. To ensure that the same
reference numbers are maintained after reconfiguration the command RECONFIGURE SAMEREF can be
used.
In this case the destination database number must be the same as the original one. This means that the
database will need to be backtracked to Session 2 or the source database deleted and a new one created
with the same number.
In the unlikely event of the Database becoming corrupt the SAMEREF option is a very good way of
correcting the problem. The main advantage of using the SAMEREF option is that all the other databases
need not be updated.
Note that its database number is 35 and it is used in A-CABLE, A-CIVIL, A-ELECTRICAL, A-EQUIPMENT,
A-HVAC, A-LASER, A-PIPING, A-ROOM, A-STRUCTURE, and A-SUPPORTS.
DELETE DB PIPING/DESIGN-AREA01-A
Rebuild the Database using the same references by entering the following:
FROM FILE /C:\AVEVA\REC1 /C:\AVEVA\REC2
TO DB PIPING/DESIGN-AREA01-A
RECONFIG SAMEREF
The new database PIPING/DESIGN-AREA01-A must be added back to the MDBs again the forms and
menus could be used for this but the command line syntax for this is as follows:
SE MDB /CABLE
ADD PIPING/DESIGN-AREA01-A
CURRENT PIPING/DESIGN-AREA01-A 2
SE MDB /A-CIVIL
ADD PIPING/DESIGN-AREA01-A
CURRENT PIPING/DESIGN-AREA01-A 4
SE MDB /A-ELECTRICAL
ADD PIPING/DESIGN-AREA01-A
CURRENT PIPING/DESIGN-AREA01-A 4
SE MDB /A-EQUIPMENT
ADD PIPING/DESIGN-AREA01-A
CURRENT PIPING/DESIGN-AREA01-A 2
SE MDB /A-HVAC
ADD PIPING/DESIGN-AREA01-A
CURRENT PIPING/DESIGN-AREA01-A 4
SE MDB /A-LASER
ADD PIPING/DESIGN-AREA01-A
CURRENT PIPING/DESIGN-AREA01-A 2
SE MDB /A-PIPING
ADD PIPING/DESIGN-AREA01-A
CURRENT PIPING/DESIGN-AREA01-A 1
SE MDB /A-ROOM
ADD PIPING/DESIGN-AREA01-A
CURRENT PIPING/DESIGN-AREA01-A 2
SE MDB /A-STRUCTURE
ADD PIPING/DESIGN-AREA01-A
CURRENT PIPING/DESIGN-AREA01-A 2
SE MDB /A-SUPPORTS
ADD PIPING/DESIGN-AREA01-A
CURRENT PIPING/DESIGN-AREA01-A 2
This command allows users with full access to both of the required databases, to copy elements from one
database to include in another database.
Enter AVEVA Everything3D™ Model with Username SYSTEM, Password XXXXXX and MDB A-
EQUIPMENT and Display the Command Window.
Using the Model Explorer navigate to the equipment B01-HC-001 which is located in the ZONE ZONE-
EQUIPMENT-AREA02-B01, open the Command Window and key in Q Dbname, this will display the name
of the database which the selected EQUI element belongs to
Assuming that the equipment element has been located in the wrong database and now requires to be
included across the database.
Using the Design Explorer navigate to the target location to place the wrongly placed equipment element as
shown below ZONE ZONE-EQUIPMENT-AREA01, now key in the Command Window INCLUDE
ACROSSDB /B01-HC-001 and press the return key.
The equipment element is moved and if the database name is now checked the equipment will belong to the
correct database.
The data base reference number is changed for the elements that are moved.
AVEVA Administration allows a sub-set of databases to be copied from master databases. These sub-sets
are referred to as Extract databases. Extract databases may be as simple as a single database allocated to
one user, or they may be more complex, catering for multiple designers over a range of disciplines.
Extract databases allow data from a master database to be shared and modified without effecting the master
databases. New data can also be created in the extract databases. Any changes made in the extract
databases can be returned to the master databases as and when the administrator requires it.
5.1 Overview
Extract databases provided a useful way of controlling data workflow within a discipline and controlling cross
discipline modifications. They are also useful for workflows that require persistent claims or workflow in
multiple locations (i.e. Global projects).
An extract can only be created from an existing multiwrite database (i.e. DESI, PADD, CATA and ISOD).
As such, extract databases themselves are multiwrite.
Extracts cannot be created from foreign databases and cannot be created from copy databases.
Many Extracts can be created from one Master database. It is also possible to create an extract of an
extract, thereby creating an Extract Family.
When an extract is created, it will be empty, with pointers back to the owning or master database. When
elements are worked on in the extract database, they are claimed in the extract in a similar way to simple
Multiwrite databases, so no other user can work on them. Claims are persistent from session to session.
When work is saved, the changed data will be saved to the extract, not the master database. Any
unchanged data will still be read via pointers back to the master database.
Extract databases can be worked on by a user at the same time as another user is working on the master
database or another extract. Any changes made in the master database can be updated in the extract
database.
At some stage in the design process it will be necessary to return information from the extract database to
the master database. Two methods are available to facilitate this process:
Flush – copies changes to the master database, but claims on elements still persist. This allows other users
to see the changes made but ensures that no changes can be made to the elements.
Issue – copies changes to the master database and removes all claims from the elements. Other users can
see the changes made and make further modifications if required.
Alternatively, if the data is no longer required it may be Dropped. If data is dropped, no changes will be
transferred to the master database but claims on model elements will remain.
Three different types of extract databases can be created. Features pertaining to each type of extract
database are noted in the sections that follow.
Standard extracts are similar to normal multiwrite databases. They can be owned by any team, given any
name, and added to MDBs in the usual way.
The claim mode may be implicit or explicit. If an element is being worked on by any other user in the Extract
Family, no other user can work on it.
Working Extracts are created uniquely for an individual user, i.e. ‘one per user’. Working Extracts only
require the use of a single MDB.
Both Standard and Working extracts can be variant extracts. Variants are a special type of extracts in which
elements are not claimed from the owner. They are designed to allow users to try out different designs which
then may, or may not, be written back to the master database.
When variants are used, all changes are merged together on issue. Changes are handled at attribute level,
so that different users can change different attributes on the same element and then merge their changes.
No locking is applied to a variant extract, and any locks applied to other extracts are ignored. This allows
many users to modify the same element in a given session, but has the disadvantage that any conflicts will
not be found until the changes are issued. If two users modify the same attribute, the last change to be
merged takes precedence.
AVEVA Administration will ensure that all merges comply with the basic database rules, that is, the data will
comply with all DICE checking requirements. It cannot check that the data makes sense in design terms. It is
recommended that data consistency and clash checks are always carried out on the resulting merged data.
Write access to an extract database is controlled in the same way as any other database. The user must be
a member of the Team owning the extract and the user must select an MDB containing the extract. Data
Access Control can also be applied to limit operations available to users.
Extracts in the same family can be owned by the same team or by different teams.
At this release, an extract can only be created at the bottom of an extract tree. It is not possible to insert
a new extract between existing generations, or create a new master for the extract family.
A Master database may have up to 8000 extract databases. Extracts can be created from another extract,
forming a hierarchy of extracts (to a maximum of 10 levels). All the extracts derived from the same master
are described as an Extract Family.
The original database is known as the Master database. The Master database is the owner or parent of the
first level of extracts. If a more complex hierarchy of extracts is created, the lower level extracts will have
parent extracts which are not the master. The extracts immediately below an extract are known as extract
members. The following diagram illustrates an example of an extract family hierarchy:
In this example:
The following attributes can be queried to obtain information about the structure of an extract family:
Database attributes
It is often advantageous for administrators to use both master databases and extract databases in a project.
Suggested use of extract and master database types is provided below:
Persistent claims.
Splitting data into smaller units to avoid mass data processing through large collections, clashing
and spatial map updates.
The following sections detail the functionality contained within the form.
The Get All Changes button updates an extract with changes made in the owning database. Get all
changes can be to a first-level extract from a master database, or to a low-level extract from a higher-level
extract (one level at a time). This is similar to doing a Get Work on a normal database.
The From parent extract only and From all extract ancestors radio buttons determine where the
changes are taken from.
Clicking the Extract button transfers the write access of a given primary element to an extract.
A claim can be to a first-level extract from a master database, or to a low-level extract from a higher-level
extract.
If the extract database has been set-up in Implicit claim mode then modifying the element will claim it
automatically.
The Element Hierarchy and Single Element radio buttons in the Extract DB Operations – Scope area of
the form enable either the hierarchy below the identified element, or only the identified element, to be
extracted.
Items can be claimed using the Claimlists button from the MANAGE tab.
It is possible to highlight elements in an extract database that will be Issued, Flushed or Dropped or added
to the database (following the Get All Changes command) using the Extract Data Control form.
Items that are outstanding in the extract or that have arisen by getting changes from the master database
can be displayed this way.
Clicking the Flush button copies local changes to the owning database but the elements are not released.
Users who have access to the owning database can now see the changes, but they cannot make changes
to the elements.
After a Flush the Item is still claimed. This is an example of a persistent claim.
Clicking the Issue button copies local changes to the owning database releases the elements.
Users who have access to the owning database can now see the changes and can make changes to the
elements.
Clicking the Drop button will abandon local changes, i.e. there will be no change to the owning database
and it will return to its state before the changes were made (even if the user has done a Save Work).
This worked example creates a number of users, teams and MDBs that will be used to create a number of
extract databases. The effect of flushing and issuing information will also be demonstrated.
For this example three new Teams will be created. Using the Admin Elements form create the following
Teams:
MASTERA
EXTEAMB
EXTEAMC
Three new Users are also required. Create the following Users and Passwords:
USER Password
APPRUSERA A
EXUSERB B
EXUSERC C
USER Team
APPRUSERA MASTERA
EXUSERB EXTEAMB
EXUSERC EXTEAMC
Click the Apply button and dismiss the form. Check that the new database MASTERA/DESI is displayed in
the Database and Extracts list.
Two extracts of the database will be created and assigned to separate teams. On the Admin Elements form
ensure Databases & Extracts is selected in the Elements option list.
Copy MDB A-PIPING to create an MDB called MASA with a description of Master Extract MDB.
Put the MASTERA/DESI database at the top of the Current Databases list.
Enter AVEVA Everything3D™ Model with Username APPRUSERA, Password A and MDB MASA. Make
the main display window small in height and put it at the top of the screen.
Navigate to the World and check that the correct database is being used by entering Q DBNAME in the
Command Window.
In the APPRUSERA session, select Get Work from the PROJECT tab.
The new equipment, EQ3, is not displayed in the session. This is because the equipment has not been
Flushed or Issued to the master database.
As a Save Work has not been done before the Flush was
initiated the following message is displayed:
Try to Delete the EQ3 in the APPRUSERA session. As the equipment is still
claimed by the extract an error message is displayed.
In order for another designer to modify the equipment EQ3 it must be Issued to release the Claim.
It is possible to highlight elements in an extract database that will be Issued, Flushed or Dropped or added
to the database (following Get All Changes) using the Extract Data Control form.
Click the Setup button from the TOOLS tab located under the
Training group to display the Training Setup form.
Click the Extract Control... button from the MANAGE tab to display the Extract Data Control form.
The effect of issuing various elements in combination with changing the scope can be seen in the example
below. In this instance the Site TRA.SITE has been Issued with the scope set to Single Element. The
Zone EQUIP.ZONE has also been Issued with the scope set to Element Hierarchy.
Before the Get All Changes command can be used some new items must be created in the parent/master
database.
In the APPRUSERA session, navigate to and display Site TRA.SITE. Only the equipment is available.
Save Work.
1. Enter AVEVA Everything3D with Username EXUSERC, Password C and MDB EXTC. Open the
Extract Data Control form and click the Get All Changes button to see items that have been added to
the Master database. Use Extract Change Highlighting to observe the differences in the graphical
display.
2. Create items as user EXUSERC. Use change highlighting to ensure the items are Outstanding in the
Extract. Flush or Issue them back to the Master.
Working extracts are allocated to users. In the following worked example working extracts for three users,
USERA, USERB and USERC will be created to database MASTERA/DESI.
AVEVA Everything3D products may be entered using the same MDB for all three Users as access is
controlled by the Username.
1. Enter AVEVA E3D™ Model with Username USERA, Password A and MDB MASA. Enter another
session of AVEVA E3D with Username USERB, Password B and MDB MASA.
2. Check the database name in each session by entering Q DBNAME in the Command Window.
3. Create some equipment elements in the USERB session and Save Work.
4. Use the Extract Data Control form to Flush or Issue the database changes back to the Master
database.
5. Check that the information is available to USERA following the Get All Changes command.
Being a member of the team that owns the database controls write access in AVEVA products. However,
due to project security requirements or company working practises, it may be necessary to further restrict
data access. By using Data Access Control (DAC) AVEVA product Administrators can restrict access to
element types, names, or particular areas, of the AVEVA project model.
Data Access Control in regular AVEVA projects is governed by team membership. Users must be a member
of the Team owning the database in order to write to it.
Normal data access control will apply to the Project unless the Data Access Control (DAC) option in the
Administration module is switched on. Before implementing DAC, administrators need to be aware of the
following considerations:
Once DAC is switched on, General Users will not have write access to any elements unless suitable
Access Control Rights have been set up.
Users are completely restricted from doing any operation and subsequent permissions allow certain
tasks to be carried out.
Users are free to do any operation and subsequent permissions restrict certain tasks from being carried
out.
At the heart of DAC is the creation of Access Control Rights (ACRs) for each user. ACRs allow the
Administrator to:
Restrict access to named elements, given element types, or particular volumes of the model.
Users can be given one or more ACRs. Each ACR is made up of two parts, a Role and a Scope.
A Role defines what operations the designer can carry out on which elements e.g. Create, Modify and
Delete all types of model elements.
A Scope defines the part of the Design to which the Role applies e.g. a particular Site in MODEL or
Registry in DRAW, or a specified volume within the model.
Roles and Scopes are referenced by ACRs and must therefore be created before the ACR has its RoleRef
and ScopeRef attributes set.
Roles are likely to be used on all Projects, but Scopes are usually Project specific.
A Role is a set of Permissible Operations (Perops), which define the operations that can be performed on a
given element type.
DAC can be enabled by selecting Project > Data Access Control… from the main
menu in the AVEVA Administration Admin module. A confirmation message is
displayed.
The following worked example will create a Scope for ALL areas of the work, a Role for ALL, a Role for a
Piping Designer and Permissible Operations for the Piping Designer.
Scopes define the area of the plant where the designer can work. The following scope gives access to all
areas of the plant.
Select the Scopes tab in the upper pane of the form. Right click on Scopes
and select New scope from the pop-up menu to display a new scope row.
Double click in the Scope name field to edit the information contained
within it. Enter ALLSCOPE in the Scope name textbox.
The Scope selection could be made more specific by entering the name of a SITE or ZONE, etc. The syntax
used to define Scopes is similar to the syntax used in PML. Keywords, such as ALL, can be used in a DAC
context. An example of the type of syntax used to define a Scope would be: ALL WITH NAME OF SITE EQ
‘<FULL NAME OF SITE>’.
A Role defines the type of objects that can be created. Roles can be created in two ways; by adding access
or by removing access. The removal of access may occur in situations where a designer is initially given full
access rights which are then restricted.
Select the Roles tab in the upper pane of the form. Right click on
Roles and select New role from the pop-up menu to display the
new role row.
Enter ALLELE in the Perop name textbox, followed by ALL in the Element types textbox. Leave the
Qualifying Condition as unset.
Open the Operations options list. Each entry, i.e. Create, Modify, Delete, etc, has three settings, Ignore,
Disallow and Allow. Clicking each entry will cycle through these choices. Set all of the entries to Allow.
Set the Attributes field to ALL and the Error message field to Can Create All.
Right click on Roles again and select New role from the pop-up menu to display the new role row.
Enter PIPING-DESIGNER in the Role name textbox and Piping Designer in the Role description
textbox.
Right click on PIPE-DESIGNER entry of the Role name and select New perop from the pop-up
menu to display the new perop row.
Enter PIPE-DESIGNER-PIPE in the Perop name textbox followed by PIPE in the Element types
textbox.
Enter (Purp of Zone eq 'PIPE' and Function neq ‘ISSUED’) in the Qualifying condition textbox.
Set all the Operations entries to Allow and enter ALL in the Attributes textbox.
Enter You can only create pipes in a Piping Zone that has not been Issued in the Error
message textbox.
A new perop will be created to allow the Pipe Designer to orientate position and connect to nozzles.
Enter PIPE-DESIGNER-NOZZ in the Perop name textbox followed by NOZZ in the Element type
textbox.
In the Operations options list set Create, Output, Export, Copy, and Delete to Disallow and
Modify, Claim, Issue and Drop to Allow.
Enter ORI CREF and POS in the Attributes textbox and enter You can only position, rotate and
connect to Nozzles in the Error message textbox.
Another Perop will be created for the Pipe Designer that will allow Branches to be created if the Pipe has not
been issued.
Enter PIPE-DESIGNER-BRAN in the Perop name textbox followed by BRANCH HIERAR in the
Element types textbox.
Set all the Operations entries to Allow then enter ALL in the Attributes textbox.
Enter You cannot create a Branch or Branch Components if the Pipe has been Issued in the
Error message textbox.
Follow a similar process to create Roles and Perops for the Design Supervisor and the Equipment Designer.
For the Role of the Equipment Designer, allow the creation of the equipment hierarchy only where the
Purpose of the Zone is EQUIP.
There is no need to create separate SCOPES for the Supervisor, Piping Designer and Equipment
Designer. Use the SCOPE /ALLSCOPE for all three users.
Access Control Rights (ACRs) are used to link Roles and Scopes. To recap, a Role is what a User can do
and a Scope is where the user can do it.
This worked example creates ACRs for ALL items (e.g. a supervisor), for Pipe Designers and Equipment
Designers.
Select the ACRs tab from upper pane of the Access Control Assistant form.
Right click on ACR and select New ACR from the pop-up menu to display a
new ACR row.
Repeat this process to create ACRs for ALL-DESIGN, ALL-EQUIPMENT and ALL-PIPES.
Remember, once DAC has been set on then the default access to AVEVA E3D is no access, and ACRs
must be set for each User. In this worked example three users will be created and access rights set for each.
A.PIPER will be a Piping Designer and will be given Pipe Designer access.
A.EQUIPMAN will be the Equipment Designer and will be given Equipment Designer access.
ACR can be set in two ways, using drag and drop on the Access Control Assistant or by using the Create
User or Modify User on the Admin Elements Form.
Select the User Access Control Rights (ACR) tab, this shows to panes, the top pane shows all the ACRs
available on the project and the bottom pane shows the User’s ACRs.
For A.SUPERVISOR select ALL-DESIGN in the Project ACRs list and move it to the User’s ACRs list with
the down arrow button.
Make sure the Users are members of the correct team to write to the database.
In the previous sections, a number of users have been created and ACRs have also been created for each
user. To re-cap:
A.PIPER can only create pipes in a Zone with a Purp of PIPE and where the pipe has not
been ISSUED
The effect of DAC can be seen by testing the ACRs in design. Ensure that DAC is turned on for the Project
then enter a Design session and test the following scenarios:
A.PIPER can create Pipes, Branches and components. Can only create Pipes in a Zone with
a Purp of PIPE. Can only modify Pipes where the Function of the Pipe is not
ISSUED
A.EQUIP test that Equipment can only be created in a Zone with a Purp of EQUI.
Only Position,
Orientation and Cref
attributes can be modified. All
other attributes are greyed
out.
The User Rights tab shows the Role, including the Perops,
and the Scope for the current user.
Previous examples of DAC have focused on a method of implementation whereby Designers are generally
denied access then granted only specific access to achieve certain tasks.
An alternative implementation is where the designer is first given full access and is then restricted from
undertaking certain tasks. This is sometimes referred to as Negative DACs.
The advantage of using this method is that more meaningful messages can be returned to the user. The
disadvantage is that there are more Perops for each Designer.
Earlier in this training guide the Role ALL-DESIGNER was created. This role will now be modified to prevent
the designer creating equipment. In AVEVA Administration Admin module, modify the Role ALL-DESIGNER
using the Access Control Assistant and create a new Perop.
Enter AVEVA E3D Model as A.SUPERVISOR and check that all items
except the Equipment Hierarchy can be created.
Project Setup Excel Import and Export is designed to make the process of setting-up an AVEVA E3D project
easier by allowing Administration data to be imported via spread sheets.
It is important that the Excel Spread sheets used for both the Import and Export functions are in the correct
format. The required format is the same for both functions; therefore the correct format can easily be
obtained by exporting data from the Administration module and examining the results.
The Export to Excel utility can be accessed by selecting Utilities > Export…
from the main menu of the Admin module.
The spread sheet is split down into various tabs. This training
course will focus on the Extracts and Data Access Control tabs.
The required format for Extract Databases is shown below. Data in some columns can be altered without
restriction (e.g. Description), while other columns reflect a value within an appropriate context (e.g. Claim
Mode can only be Implicit or Explicit). Guidance on the values required in each column is provided below.
#Keyword EXTRACT.
Owning Team Name of the Team that owns the Extract Database.
The required format for Working Extract Databases is shown below. Data in some columns can be altered
without restriction (e.g. Description), while other columns reflect a value within an appropriate context (e.g.
Claim Mode can only be Implicit or Explicit). Guidance on the values required in each column is provided
below.
#Keyword WORKEXTRACT.
Owning User Name of the User associated with the Working Extract Database.
On export, Data Access Control requirements are separated into their component parts, ACRs, ACR Groups,
Scopes, Roles and Perops. The required format for Scopes is shown below. As with the other spread sheets
considered, data in some columns can be altered without restriction (e.g. Description), while other columns
reflect a value within an appropriate context (e.g. Selection could utilise the keyword ALL). Guidance on the
values required in each column is provided below.
#Keyword SCOPE.
Selection ALL (keyword). Alternatively, Sites or Zones specific to the project could be used.
Roles are specified followed by the associated Permissible Operation (PEROP). Roles require only three
fields. Guidance on the values required to define the Role are given below.
#Keyword ROLE.
Permissible Operations require considerably more fields to account for all Create, Modify and Delete
operations and any associated error messages. Guidance on suitable values is provided below.
#Keyword PEROP.
Element types Element Type e.g. PIPE, EQUIPMENT HIERAR, ALL etc.
Qualifying condition Qualifying Rule. Often this will utilise a Purpose or Function of a model element.
The required format for an ACR is shown below. As with the other spread sheets considered, data in some
columns can be altered without restriction (e.g. Description), while other columns reflect a value within an
appropriate context (e.g. Scope will reference a valid Scope in the project). Guidance on the values required
in each column is provided below.
#Keyword ACR.
The Import from Excel utility can be accessed by selecting Utilities > Import…
from the main menu of the Admin module.
Before attempting an Excel Import make sure that the Access Control Assistant is not displayed.
If the project references a Foreign Project the User will be prompted to give
suitable login credentials for a Free User in the referenced project.
Once the import operation has finished, the System Administrator is prompted to supply an MDB if one has
not previously been set.
The Admin Database can be rolled back following an Excel import in the event that errors were encountered.
The Rollback utility can be accessed by selecting Utilities > Rollback… from
the main menu.
1. Use the Export to Excel utility on the Training Project. Open the spread sheet produced and create some
new Teams, Users and Databases.
2. Import the modified spread sheet into the Training project, checking for any errors.
3. Use the database Rollback function to restore the project to the point immediately before the Export
utility was used.
This chapter describes how to create and use AVEVA PML Encryption or Published PML. Various levels of
encryption can be applied to any PML functions, forms, objects, and macros.
PML is the AVEVA Programmable Macro Language. The details of the language may be found in the
AVEVA Software Customisation Guide and the AVEVA Software Customisation Reference Manual, supplied
with the product.
PML functions, objects, forms and macros may be encrypted using the tools described in this chapter. Once
encrypted they may be used within the AVEVA products, but cannot easily be read.
Please note that the encryption used is of limited strength, and is not secure against all possible attacks.
Details of the encryptions used are described later.
Once a PML file has been encrypted, it is no longer possible to read or edit the file. The Published PML
toolkit does not include a tool for un-encrypting files. It is good practise to ensure that a safe copy of the
original file is retained, in case further modifications are required later.
The encryption utility program is a command window program designed to be included in the PML software
development process. This process requires a separate install.
When undertaking PML encryption tasks the following workflow should be adhered to:
Check the encryption is successful and the files work in the expected manner.
Not all files within a PML folder hierarchy are always PML. Images, for example, should not be
encrypted, but may need to be supplied with the encrypted versions of the PML.
Automating the encryption procedure via batch files, perl script, or a PML script will make it easier to
create the encrypted PML files when the source PML is updated.
8.2.2 Licensing
The pmlencrypt.exe utility program requires a PML Publisher licence in the license file (the feature name is
VPD-PMLPUBLISHER). If this is not present in the license then the program will not run.
The form of the PML Encryption Utility Program can be seen by running pmlencrypt.exe without arguments
(or with an invalid set of arguments). An output similar to that below is produced.
Where:
-rc4 uses 40-bit RC4 encryption from the Microsoft Base Cryptographic Provider (default).
-buffer N causes the file to be retained in memory until a module switch once it has been read N
times (the default is never).
-folder is used to encrypt ALL files from the folder from_path to to_path.
-pmllib is used to encrypt ALL .pmlobj .pmlfnc .pmlfrm and .pmlmac files from the folders in a
PMLLIB-type folder structure beneath from_path to to_path.
PML files are not required to have particular file extensions. PML2 functions, objects, forms and macros are
normally stored in files with the extensions .pmlfnc, .pmlcmd, .pmlobj, .pmlfrm and .pmlmac respectively.
However, other PML files such as those in the PMLUI folder of an AVEVA suite of products installation do
not have a file extension.
As any PML file (with or without a file extension) may be read with a $m command, care must be taken
when choosing files to encrypt. Other files, such as icon images and configuration files cannot be used by
AVEVA products when encrypted.
If neither of the –folder or –pmllib options are used the from_path and to_path arguments are taken to be
single file-names or paths (which should not include embedded spaces). The to_path file is created or
overwritten, as appropriate.
This option may be used whenever there is a single file to encrypt, and can also be useful within a script,
where the file selection is handled by the script itself. No assumptions are made about file extensions.
If the –folder option is used the from_path and to_path arguments are taken to be names or paths of
folders (which should not include embedded spaces). All files in the from_path folder are encrypted into the
to_path folder. The to_path folder is created, if required, and the files inside it are overwritten.
No file extension is required, so care must be taken not to encrypt non-PML files.
If the –pmllib option is used the from_path and to_path arguments are taken to be names or paths of
folders (which should not include embedded spaces). All folders beneath the from_path folder are scanned,
and files with extensions .pmlfnc, .pmlcmd, .pmlobj, .pmlfrm or .pmlmac are encrypted to a matching
structure constructed or overwritten beneath the to_path folder.
As this option is file-extension sensitive, it will not encrypt, or copy, image or other unrelated files in the
hierarchy.
Care must be taken when the from_path and to_path arguments are given. The from path must precede
the to_path, otherwise the wrong file may be overwritten.
The from_path and to_path arguments cannot be identical. This is to reduce the risk of accidental
overwriting of the source-files. Embedded spaces are not supported in the paths.
There are four encryption options that use different encryption algorithms. The following sections describe
the four options.
Encryption Type 0 (No Encryption) adds a standard Published PML header to the file, i.e. --<000>--
Published PML 2.1.0>--, but does not otherwise encrypt the file.
Encryption Type 1 (Trivial Encryption) is designed for testing purposes only. It provides no security, as the
lines can be read backwards. It is used to establish that the encryption system is functioning correctly and
that incompatible versions of AVEVA products have not been installed.
Encryption Type 2 (Basic Encryption) is an alternative simple encryption algorithm which is implemented
directly and does not rely on external libraries.
This encryption uses the Microsoft Base Cryptographic Provider, which is included in Windows 2000,
Windows XP, and Windows 7 operating systems as well as Microsoft® Internet Explorer version 3.0 or later.
It is anticipated that all compatible computers will include the libraries required for this algorithm.
40-bit keys are used to operate within limits imposed by (historic) limitations of encryption technology.
Although this is the most robust encryption algorithm provided, it is still of limited strength and is not
secure against all possible attacks.
In this worked example supplied PML files will be encrypted using various options.
The following are the simple PML files that will be used for the encryption. The Trainer will provide these
files by copying them from the Training Setup. Typically C:\AVEVA\Plant\PlantTraining2.1\Training
\testencrypt. The files are as follows:
C:\AVEVA\Plant\PlantTraining2.1\Training\testencrypt\pmllib-
original\forms\hello.pmlfrm
C:\AVEVA\Plant\PlantTraining2.1\Training\testencrypt\pmllib-
original\functions\area.pmlfnc
C:\AVEVA\Plant\PlantTraining2.1\Training\testencrypt\pmllib-
original\objects\life.pmlobj
C:\AVEVA\Plant\PlantTraining2.1\Training\testencrypt\pmllib-
original\macros\newsite.pmlmac
C:\AVEVA\Plant\PlantTraining2.1\Training\testencrypt\pmllib-
original\macros\NZONE
The PML files should be stored in the correct PML directory structure.
It is recommended that a batch file be created to encrypt the PML files. In this example a simple batch file
will be written to test each option.
In a suitable text editor open the batch file, encrypt.bat, located in the folder
C:\AVEVA\Plant\PlantTraining2.1\Training\testencrypt most of the lines are commented out using rem
with the exception of the second to last line which would display help.
Keep the file open for editing. Ensure all of the sub-folders in the
C:\AVEVA\Plant\PlantTraining2.1\Training\testencrypt\pmllib-encrypt folder are empty.
The first test uses the –none option on the area.pmlfnc file to see if the encryption process is working. The
encrypt batch file needs to be edited (remove ‘rem’) to allow this line of the file to be run. The batch file
should look like this:
Run the batch file by locating encrypt.bat with Windows Explorer then double clicking on it. A cmd window
will be displayed. To check the result, navigate to the folder:
C:\AVEVA\Plant\PlantTraining2.1\Training\testencrypt\ pmllib-encrypt\functions
Edit encrypt.bat and enter rem at the start of the line containing the none option. Remove the rem from the
start of the line containing the trivial option. The batch file should look like this:
Save the file and double click on it to run the encryption. The file, hello.pmlfrm, has been encrypted using
the –trivial option.
Note that the file is readable backwards, i.e. mrof putes is setup
form.
All files with valid pml extensions can be encrypted in one command using the –pmllib option.
Edit the encrypt .bat file by entering rem at the start of the line containing the trivial option. Remove the
rem from the start of the line containing the rc4 pmllib option. The batch file should look like this:
Save the file and double click on it to run the encryption. Navigate to each of the sub-folders of pmllib-
encrypt and note that all pml files have been encrypted with the exception of NZONE as this does not have
a valid pml file extension.
All Files without a valid pml extension can be encrypted in one command using the –folder option, however,
care must be taken using this option as some files may not be pml macros.
Edit the encrypt .bat file by entering rem at the start of the line containing the rc4 pmllib option. Remove the
rem from the start of the line containing the rc4 folder option. The batch file should look like this:
Save the file and double click on it to run the encryption. Navigate to the macro sub-folder of pmllib-encrypt
and note that the file NZONE has now been encrypted.
When an AVEVA Plant product recognises an encrypted macro, it is decrypted in memory as it is used. In
this section the encrypted macros will be tested. In order to test the encrypted macros the pointer to pmllib
must be changed to point to a multi path.
Edit the file custom_evars.bat. This batch file can be found in the %projects_dir% directory typically
C:\Users\Public\Documents\AVEVA\Projects\E3D2.1 Close to the bottom of the file add the line:
set pmllib=C:\AVEVA\Plant\PlantTraining2.1\Training\testencrypt\pmllib-encrypt;%pmllib%
Save the file and close the editor. Enter AVEVA Everything3D using the following options:
Project Training, Username A.PIPER, Password A, MDB A-PIPING, and then click the Model button.
The file pml.index needs to be updated to include the new files in the extended path.
Enter PML REHASH ALL in the Command Window to regenerate the file. If further files are encrypted the
file should be refreshed using this command.
Enter q var !area in the Command Window to find the answer stored
in variable !area
!Number is set to the value 42 because no values were specified. The value of the variable Number may be
changed. Enter the following in the Command Window:
!Marvin.Answer(50)
!Number = !Marvin.Answer()
q var !Number
$m/C:\AVEVA\Plant\PlantTraining2.1\Training\testencrypt\pmllib-encrypt\macros\newsite.pmlmac
$m/C:\AVEVA\Plant\PlantTraining2.1\Training\testencrypt\pmllib-encrypt\macros\NZONE
The NZONE macro creates a Zone under the new site named
ENCRYPT-ZONE
Reading an encrypted pml file takes longer than reading a plain-text version. In some circumstances PML
files may be re-read many times during a session, thus encrypting files may have some impact on
performance.
The command PML STATISTICS displays information on the numbers of times each file has been read,
together with some additional information useful to AVEVA when testing the Published PML functionality.
The Command window only has a buffer for 500 lines of text so this can be sent to a file i.e.
Once the file has finished then in the Command Window type:
In order to reduce the time taken to re-read the files, Published PML files may contain a buffering directive in
the header-line, i.e. the first line in the file. If a dash and a number are included directly after the three-digit
encryption algorithm id, then the AVEVA products will retain the file in memory indefinitely once it has been
read the specified number of times.
Heavily used files may be edited to add buffering to the header by hand. For example:
Alternatively, the n option, where n is the number of times the file is to be read before buffering, of
pmlencrypt.exe may be used.
For example:
A value of 5 is a good number to start with. Many files are read precisely once during module start up. There
is little benefit in buffering these files. Using a value of 5 will avoid that, but will benefit all heavily used files.
If a PML file that is being actively developed has a header including buffering, it will not be re-read as often
as usual.
To force all buffered files to be cleared from memory, if they are not in current use, the commands PML
REHASH or PML INDEX may be used or a module switch performed.
Most changes made to an encrypted PML file will make it unusable, i.e. the AVEVA product will report a
corrupt file if attempted; however, there are a few exceptions:
As noted in the previous section, a buffering value may be added or changed in the Published PML
header-line. For example:
--<004>-- Published PML 2.1 >-- may be changed to --<004-5>-- Published PML 2.1 >--
The second line of rc4 or basic encrypted files may be edited to report a different error or message. For
example:
return error 99 'This file is not readable by this version of AVEVA Product '
$** 9ad7b51fc44384a8601979728b185f52
may be changed to
return error 66 'You need a software patch – ring Ian on extension 6655'
$** 9ad7b51fc44384a8601979728b185f52
If an attempt to display or record encrypted PML using the $R commands is made, all lines are replaced by
the text <hidden>. Error messages and trace-backs will include function names, but not the text of each
line.
The only circumstance in which hidden lines can become visible is during a macro which includes a module-
switch. After a module switch, any remaining lines in that macro may be traceable.
8.10 Troubleshooting
Attempting to read an encrypted PML file in an incompatible version of the AVEVA product.
Attempting to read an encrypted file that has become corrupted (e.g. editing encrypted text).
Attempting to read files encrypted with algorithms added in future versions of pmlencrypt.exe.
Attempting to read an rc4 encrypted file on a computer without the Microsoft Base Cryptographic
Provider installed.
AVEVA products enable strict Intellectual Property Rights (IPR) Protection to be applied at database level,
allowing a project administrator to restrict the ability to extract data held within a database.
Protected databases are marked as uniquely belonging to the project such that restricted users cannot copy
data from that database into another project, even though a physical copy of the database file.
Functionality that permits copying of data from a protected database is not available to restricted users. For
example:
EXPORT command.
In addition, read access to certain attributes is restricted in order to obstruct an unauthorised user from
writing their own DATAL like functionality in PML.
The Administration command syntax has been extended to allow the project administrator to set (or clear)
protection on any database within a project, and to set (or clear) an expiry date for that database.
The CHANGE command allows users to change the protection on a named database, and control timed
expiry by optionally specifying a future date, using the standard date format used in existing commands. The
extended syntax is as follows:
The CREATE DB command has been similarly extended, with the following syntax:
The following pseudo attributes are associated with all DATABASE elements to query the protected status
and the expiry date of the represented database.
Expiry - returns a text value giving the expiry date of the database in ISO date format,
YYYY-MM-DD. The pseudo attribute is unset if the database has no expiry date.
The date entered must be valid and in the future. Invalid dates
and past dates output an error message and disable the
Apply button.
The Modify Database form has the same functionality as the Create Database form except that the Expiry
cannot be toggled off if previously set, however the date may be changed.
The end-user experience is unchanged except where that user is restricted with respect to a protected
database. In these cases meaningful errors are displayed to indicate that user privileges are not sufficient to
complete the requested operation.
Data Access Routines (DARs) have been restricted so that they cannot access data in a protected
database. An indicative error message is displayed in these circumstances.
This worked example sets the protection on an existing catalogue database. Enter the AVEVA
Administration ADMIN module
Project ACP
User SYSTEM
Password XXXXXX
Select Admin > Exit from the main menu to exit the session.
EXPORT command.
The Catalogue MASTER/PIPECATA is used as the Piping catalogue reference in the TRA project. As the
catalogue is now protected the OUTPUT Command for catalogue items should be unavailable for this
catalogue. Enter the AVEVA Catalogue Paragon module using the following credentials.
Project TRA
USER A.PIPER
Password A
MDB A-PIPING
The Paragon user interface should be set to display the Catalogue Explorer and a Command Window.
Using the Catalogue Explorer navigate to the Catalogue World called MASTER/PIPECATA, the CATA
called AVEVAPIPE.CATA-ANSI and the SECT called ELBOW-ANSI.
This section can be checked to see if it is in the protected catalogue database by entering Q DBNAME in
the Command Window. It should return MASTER/PIPECATA.
The OUTPUT command may also be tested in the Command Window by entering OUTPUT CE.
As the MASTER/PIPECATA is
protected an error message is
displayed.
The COPY command should also be unavailable, preventing information being transferred from a protected
database to an unprotected database. Navigate to and expand the PIPING/CATA-A World in the Catalogue
Explorer to show the CATA element /CATA-PIPING-A previously created with the database.
A new SECT and CATE will be created in this database using the Command Window; the CATE will be a
copy of an existing MASTER component.
Make sure DAC is turned OFF on the project or that no DAC is applied to Paragon.
The new SECT and CATE will be created but the existing CATE
cannot be copied as it is in a protected database and an error
message will be displayed.
Click the OK button to dismiss the form. Note that the new CATE has
been created but no contents have been copied from the protected
database.
When the attributes of an item in a protected database are queried, some of the attributes will not be
displayed, i.e. some attributes are invisible to restricted users in a protected database. The restricted
attributes are mostly in the catalogue, but there are also some in the Properties and Design Databases.
As not all the attributes are visible it makes it very difficult to create a macro that would be able to recreate
the database items.
Typical attributes that are invisible are the height of a cylinder in the catalogue and the nominal bore of a
component connection point.
To check attribute protection a catalogue database is entered as a Free User and the attributes of a primitive
are queried. A check is made on the same item as a Restricted User.
To see what attributes are available the enter the Paragon module in the ACP Project
Project ACP
User SYSTEM
Password XXXXXX
MDB ALL
Select the Attribute button from the Display section of the HOME
tab to display the Attributes form.
To see what attributes are available the enter the Paragon module in the TRA Project
Project TRA
User A.PIPER
Password A
MDB A-PIPING
Select the Attribute button from the Display section of the HOME
tab to display the Attributes form.
Comparing the two Attribute forms it can be seen that the Pdiameter attribute is missing from the Restricted
Users query.
AVEVA Administration allows users to generate enhanced command entry scripts using the Command
Script Generation form within Admin. This form is activated from the Create Script button on the Admin
Elements form. It is activated by selecting Users or MDBs from the Elements pull down list.
Project TRA
User SYSTEM
Password XXXXXX
From the Admin Elements form select Users. Select the user TRAINER and click the Create Script
Button.
If a User is selected in the main Admin form element list, that user will be specified in the Command Script
Generation form.
If an MDB element is selected, the MDB option will be checked and that MDB will be specified in the form.
The new form requires entry and confirmation of the correct password for the specified user. It also requires
entry or selection, via the Browse button, of an output filename. MDB selection is optional, as is the selection
of an input command script.
The Input option is only available if a PML Publisher license is available in the current environment.
Password T
Confirm T
The file has been encrypted using the same technology as PML Publisher.
Create the following entry macro and save it as entry.pmlmac in the %aveva_design_user% directory
typically C:\Users\Public\Documents\AVEVA\USERDATA.
$m/C:\Users\Public\Documents\AVEVA\USERDATA\projectentry.mac
dev tty
/A-PIPING
RUN MODEL
q mem
finish
The above macro runs the entry script created previously and allows access to AVEVA Everything3D
without user names and passwords being displayed. It sets an MDB, enters the Model Module, sets a log
file, queries the members and exits AVEVA Everything3D.
The Macro must Exit AVEVA Everything3D. An example of the above file can be found in the Training
Setup Directory typically C:\AVEVA\Plant\PlantTraining2.1\Training\userdata.
Create the following entry batch file and save it as no-pub-batch.bat in the %aveva_design_user%
directory typically C:\Users\Public\Documents\AVEVA\Plant\E3D\Data2.1.0\USERDATA.
set AVEVA_BRAND=PLANT
set AVEVA_PRODUCT=3D
The above batch file sets the required environment variable for the AVEVA products and the Project and
runs the entry macro.
An example of the above file can be found in the Training Setup Directory typically
C:\AVEVA\Plant\PlantTraining2.1\Training\Admin.
The AVEVA_PRODUCT variable can be set to CATALOGUE or ADMIN to access the AVEVA
Catalogue or AVEVA Administration products respectively.
The Script Generation form has the option to include a user supplied macro which is included into the
encrypted script.
This option is only available if a PML Publisher License is available in the current environment.
Create the following macro and save it as doit.mac in the %aveva_design_user% directory typically
C:\Users\Public\Documents\AVEVA\USERDATA.
dev tty
/A-PIPING
Draw
q mem
finish
The above macro will be added to the encrypted entry script that is subsequently created. The macro sets
an MDB, enters the draw module, opens a log file, queries the members and exits Draw.
Create the following entry batch file and save it as pub-batch.bat in the %aveva_design_user% directory
typically C:\Users\Public\Documents\AVEVA\USERDATA.
set AVEVA_BRAND=PLANT
set AVEVA_PRODUCT=3D
The above batch file sets the required AVEVA product and Project environment variables and runs the entry
macro. The projectentry.mac macro file includes both encrypted entry and encrypted input and can therefore
be run standalone.
An example of the above file can be found in the Training Setup Directory typically
C:\AVEVA\Plant\E3DTraining\Training\Admin.