Sunteți pe pagina 1din 286

Aspen Basic Engineering

Administrator Reference Guide

Version: V7.3
March 2011
Copyright 1981 2011 Aspen Technology, Inc. All rights reserved.
Aspen Basic Engineering and the aspen leaf logo are trademarks or registered trademarks of Aspen Technology,
Inc., Burlington, MA.
All other brand and product names are trademarks or registered trademarks of their respective companies.
This documentation contains AspenTech proprietary and confidential information and may not be disclosed, used,
or copied without the prior consent of AspenTech.
ASPENTECH MAKES NO WARRANTY OR REPRESENTATION, EITHER EXPRESSED OR IMPLIED, WIT RESPECT TO
THIS DOCUMENTATION, ITS QUALITY, PERFORMANCE, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR
PURPOSE.
Aspen Technology, Inc.
200 Wheeler Road
Burlington, MA 01803-5501
USA
Phone: (781) 221-6400
Toll free: (888) 996-7001
Website http://www.aspentech.com

Contents
1 About this Guide...................................................................................................1
About Aspen Basic Engineering ..........................................................................1
Related Documentation .....................................................................................1
Technical Support ............................................................................................2
Online Technical Support Center ..............................................................2
Phone and E-mail ...................................................................................3
2 Knowledge Bases and the Rules Editor.................................................................5
Overview of KB API ..........................................................................................6
Rules ....................................................................................................7
Methods ................................................................................................9
Events ................................................................................................ 11
Demons .............................................................................................. 12
Sorts and Filters................................................................................... 15
Writing Compiled KB Code............................................................................... 19
AZQDataService Interface ..................................................................... 19
Registering KB Items ............................................................................ 20
Defining Methods ................................................................................. 21
Defining Rules ..................................................................................... 22
Defining Demons.................................................................................. 22
Defining Events.................................................................................... 24
Defining Sorts...................................................................................... 24
Defining Filters .................................................................................... 25
Global Variables ................................................................................... 26
Handling Arguments ............................................................................. 26
Implementing Data Service Modules in .NET ............................................ 26
Installation and the Config File............................................................... 27
Writing Rules Editor Script............................................................................... 28
Writing the KB Module .......................................................................... 28
Compiling the KB Module ...................................................................... 33
Loading the KB Module ......................................................................... 33
Running the KB Module ......................................................................... 33
Events ................................................................................................ 34
Dynamic Properties .............................................................................. 39
Configuration File ................................................................................. 40
Rules Editor Menus ............................................................................... 41
Rules Editor Toolbar ............................................................................. 44
AZDBQuery Library Object Reference................................................................ 44
AZQKBDialog ....................................................................................... 44
3 Datasheets and the Datasheet Definer ..............................................................47
Datasheets .................................................................................................... 47
Datasheet Definer .......................................................................................... 48

Contents

iii

How Does the Datasheet Definer Create a Datasheet? ........................................ 49


Starting the Datasheet Definer......................................................................... 49
Datasheet Definer Menus ................................................................................ 50
Datasheet Definer Toolbar ............................................................................... 51
Datasheet Definer Browser .............................................................................. 52
Browser Menu Items............................................................................. 53
Datasheet Editor Template Migration Tool ......................................................... 54
Getting Started .................................................................................... 54
Creating a ZTX Template for each Custom Datasheet Template.................. 55
Migrating Server-Cached Templates ....................................................... 56
4 Preparing Datasheets in Microsoft Excel ...........................................................59
Fields............................................................................................................ 59
Value Fields ................................................................................................... 60
Inserting Value Fields ........................................................................... 60
Value Field Routes................................................................................ 60
Value Field Options............................................................................... 61
Multi-line Fields.................................................................................... 62
Field Cases .......................................................................................... 62
Overspill Fields .................................................................................... 62
Quantity Type Fields ....................................................................................... 63
Inserting Quantity Type Fields ............................................................... 63
Linking Quantity Type Fields .................................................................. 64
Unlinking Quantity Type Fields ............................................................... 64
Revision Fields ............................................................................................... 64
Inserting Revision Fields ....................................................................... 64
Linking Revision Fields .......................................................................... 64
Unlinking Revision Fields ....................................................................... 65
Sketch Fields ................................................................................................. 65
Inserting Sketch Fields.......................................................................... 65
Bitmap Fields................................................................................................. 65
Inserting Bitmap Fields ......................................................................... 65
Checkbox Fields ............................................................................................. 66
Radio Button Fields......................................................................................... 66
Radio Groups ....................................................................................... 67
Other Fields ....................................................................................... 67
Qualifier Fields ..................................................................................... 67
Checking Fields .............................................................................................. 68
Using the Browser .......................................................................................... 68
Navigating the Class View Hierarchy ....................................................... 68
Specifying a Route ............................................................................... 68
Assigning Wildcards.............................................................................. 68
Assigning Objects................................................................................. 69
5 Generating Datasheets ......................................................................................71
Generating a Datasheet .................................................................................. 71
Using Excel Features....................................................................................... 71
6 Symbols, Labels and the Graphics Definer.........................................................73
Symbols and Labels in the Aspen Basic Engineering Drawing Editor ...................... 73
About Symbols .................................................................................... 74

iv

Contents

About Labels........................................................................................ 75
Graphics Definer ............................................................................................ 75
Starting the Graphics Definer................................................................. 76
7 Defining Symbols and Labels: Worked Examples...............................................77
Example of Creating a New Label ..................................................................... 77
Creating a New Label File ...................................................................... 78
Specifying Label Characteristics ............................................................. 79
Placing and Specifying Value Fields......................................................... 82
Placing and Specifying Plain Text............................................................ 86
Placing and Associating Units Fields ........................................................ 86
Drawing Supplementary Graphics........................................................... 88
Defining a Datum for the Label .............................................................. 88
Defining a Mass Balance Insert Point for the Label.................................... 89
Compiling the New Label File ................................................................. 90
Example of Creating a New Symbol .................................................................. 90
Creating a New Symbol File ................................................................... 90
Drawing a New Symbol ......................................................................... 91
Specifying Symbol Characteristics .......................................................... 91
Specifying Parts and Tool Tips................................................................ 92
Defining a Datum for the Symbol ........................................................... 94
Adding Dimensions to the Symbol .......................................................... 94
Saving the New Symbol File .................................................................. 94
8 Extracting Legacy Symbols and Labels ..............................................................95
Overview of Extracting Symbols and Labels ....................................................... 95
Symbols: Extracting from AutoCAD to the Graphics Definer ................................. 96
Preparation and Background Information ................................................ 96
Converting Symbols from AutoCAD to the Graphics Definer ....................... 98
Labels: Extracting from AutoCAD to the Graphics Definer .................................... 99
Preparation and Background Information ................................................ 99
Converting Labels from AutoCAD to the Graphics Definer ........................ 100
Extracting Legacy Symbols and Labels from Other Packages.............................. 102
Working with Extracted Symbols and Labels .................................................... 102
9 Graphics Definer Menus and Toolbar Buttons ..................................................103
Menus......................................................................................................... 103
File Menu .......................................................................................... 103
Edit Menu.......................................................................................... 104
View Menu ........................................................................................ 104
Definer Menu ..................................................................................... 105
Insert Menu....................................................................................... 106
Format Menu ..................................................................................... 106
Tools Menu........................................................................................ 106
Toolbar Buttons ........................................................................................... 107
Main Toolbar...................................................................................... 107
View Toolbar...................................................................................... 108
Graphics Definer Toolbar ..................................................................... 108
Ribbon Toolbar................................................................................... 109
Draw Toolbar ..................................................................................... 110
Parametric Symbols...................................................................................... 111

Contents

Parametric Symbol Toolbars .......................................................................... 111


Dimensions ................................................................................................. 114
Driving Dimensions ............................................................................ 114
Driven Dimensions ............................................................................. 114
Variables..................................................................................................... 115
Drawing With Relationships ................................................................. 116
Relationship Commands ................................................................................ 117
Using Feedback from the Pointer as You Draw ....................................... 117
Relationships ..................................................................................... 117
Locate Zone ...................................................................................... 117
Infinite Elements ................................................................................ 118
Adding and Deleting Dimensions .......................................................... 119
Linking Variables to Aspen Basic Engineering GUI Handles ................................ 121
Example............................................................................................ 121
10 Class Library Editor .......................................................................................127
Class Library Repository................................................................................ 128
Class Store........................................................................................ 128
Class Library Editor Window .......................................................................... 128
Class Library Editor Menus ............................................................................ 129
File Menu .......................................................................................... 129
Edit Menu.......................................................................................... 130
View Menu ........................................................................................ 130
Insert Menu....................................................................................... 130
Tools Menu........................................................................................ 131
Class Library Editor Toolbars.......................................................................... 131
Navigation Pane Context-Menu ............................................................ 132
Class Library Editor Status Bar....................................................................... 133
Navigation Pane ........................................................................................... 133
Library Tab........................................................................................ 133
Construct Tabs................................................................................... 134
Inheritance Tab.................................................................................. 134
Quantity Types Tab ............................................................................ 134
Compare Library Tab .......................................................................... 135
Managing Class Libraries and Class Stores....................................................... 135
Library Operations.............................................................................. 136
Class Operations ................................................................................ 141
Inheritance View Operations ................................................................ 142
Class Attribute Operations ................................................................... 144
Association Operations........................................................................ 148
Enumeration Operations...................................................................... 149
Class View Operations......................................................................... 153
Composite View Operations ................................................................. 156
User Preferences and Options .............................................................. 159
11 Explorer.........................................................................................................161
Explorer Menus ............................................................................................ 162
File Menu .......................................................................................... 163
Edit Menu.......................................................................................... 163
View Menu ........................................................................................ 164
Case Menu ........................................................................................ 164
Folder Menu ...................................................................................... 165

vi

Contents

Object Menu ...................................................................................... 165


Run Menu.......................................................................................... 166
Tools Menu........................................................................................ 166
Framework Menu ............................................................................... 166
Window Menu .................................................................................... 166
Help Menu ......................................................................................... 167
Explorer Toolbar........................................................................................... 167
Aspen Basic Engineering Explorer Status Bar ................................................... 168
Folders View ................................................................................................ 168
Working with Folders .................................................................................... 168
Viewing Folders.................................................................................. 168
Customizing Folder Settings ................................................................ 169
Creating a New Folder......................................................................... 171
Renaming a Folder ............................................................................. 171
Removing a Folder ............................................................................. 171
Deleting a Folder................................................................................ 171
Adding Existing Diagrams to a Folder.................................................... 172
Adding Existing Datasheets to a Folder ................................................. 172
Adding Existing Objects to a Folder ...................................................... 172
Adding Files to a Folder....................................................................... 172
Dragging & Dropping Folders and Objects ............................................. 173
Working with Files ........................................................................................ 173
Explorer File Menu Options .................................................................. 173
Launching a File from the Explorer ....................................................... 174
Adding a File...................................................................................... 174
Checking Out a Read-only File ............................................................. 175
Checking Out an Editable File............................................................... 175
Checking In a File............................................................................... 176
Undo Check Out ................................................................................. 176
Save As ............................................................................................ 176
Working with Objects.................................................................................... 177
Creating New Objects ......................................................................... 177
Copying an Object .............................................................................. 178
Cloning an Object............................................................................... 178
Removing an Object ........................................................................... 178
Claim an Object ................................................................................. 178
UnClaim an Object ............................................................................. 178
Deleting an Object.............................................................................. 179
Object Properties ............................................................................... 179
Viewing Object Attributes .............................................................................. 179
Customizing Case Settings .................................................................. 183
Default Object Classviews ................................................................... 184
Packages..................................................................................................... 185
Exporting a Package ........................................................................... 185
Importing a Package........................................................................... 186
Packages Folder ................................................................................. 186
Query Editor ................................................................................................ 186
Adding a Query .................................................................................. 188
The Aspen Basic Engineering Query Language ....................................... 189
Class Views ....................................................................................... 192
Units of measure................................................................................ 193
Cases ............................................................................................... 194
The Response Object .......................................................................... 195

Contents

vii

Query Editor Menus and Options .......................................................... 199


Logging on to Workspaces and Projects .......................................................... 200
Logging on to a Preferred Workspace/Project......................................... 200
Logging on to a User Specified Workspace/Project.................................. 201
Logging on to a Workspace/Project via a URL Address ............................ 201
Connecting as a Different User............................................................. 201
Change Advanced Connection Settings.................................................. 202
Invalid Username/Password................................................................. 202
Incorrect Username/Password ............................................................. 203
Invalid Business Server....................................................................... 204
Invalid Authentication Protocol............................................................. 205
Invalid Workspace/Project Name .......................................................... 206
Closing the Workspace........................................................................ 206
Managing Workspaces .................................................................................. 206
Privileges, Roles and Users .................................................................. 206
Workspace Components ...................................................................... 209
Configuration Management.................................................................. 210
Broker Configuration..................................................................................... 214
Configuring the Broker to Support Automated Creation of Oracle RDBs ..... 214
Configuring the Broker to Support Automated Creation of SQL Server RDBs216
Configuring an Oracle RDB Manually for an Aspen Basic Engineering
Workspace ........................................................................................ 217
Configuring a SQL Server RDB Manually for an Aspen Basic Engineering
Workspace ........................................................................................ 218
Creating a Peer-to-Peer Network of Brokers........................................... 220
Projects within Aspen Basic Engineering .......................................................... 220
Managing Projects ........................................................................................ 221
Privilege Settings for Projects .............................................................. 221
Logging On To a Project ...................................................................... 222
Project Management Dialog ................................................................. 223
Conflict Resolution (Manage Conflict) .................................................... 229
Managing Users and Roles................................................................... 234
Managing the Scope of a Project .......................................................... 237
Adding Objects to the Project Scope ..................................................... 237
12 Smartplant ....................................................................................................241
13 Administration ..............................................................................................243
14 Bridge ...........................................................................................................245
Overview of the Interface .............................................................................. 245
Bridge View and Link View Menus................................................................... 247
File Menu .......................................................................................... 247
Edit Menu.......................................................................................... 248
View Menu ........................................................................................ 248
Link Menu ......................................................................................... 249
Linkset Menu ..................................................................................... 249
Application Menu................................................................................ 250
Transfer Menu ................................................................................... 251
Grid Menu ......................................................................................... 251
Bridge View Linkset Drop-Down Menus ................................................. 252
Bridge View Linksets Grid .................................................................... 252

viii

Contents

Link View Drop-Down Menus and Fields ................................................ 253


Links Grid in Bridge Link View Window .................................................. 253
AZ Bridge Window Toolbars ........................................................................... 254
Bridge View Toolbar............................................................................ 254
Link View Toolbar ............................................................................... 255
Creating a Bridge ......................................................................................... 256
Adding Multiple Files In One Bridge ...................................................... 256
Creating Multiple Links for the Same Attribute ....................................... 257
Conversion between Template Files (Linked Files) and Bridge Files
(Application Files Added to Bridge) ....................................................... 258
Object/Case Bindings.................................................................................... 258
Copying and Pasting Object/Case Bindings ............................................ 258
Auto-Creation of Object Bindings.......................................................... 259
Multi-Creation of Linksets without Object Bindings.................................. 260
Editing an Existing Bridge.............................................................................. 261
Closing the Bridge Without Saving........................................................ 261
Adding a New Linkset ................................................................................... 262
Editing Linksets............................................................................................ 263
Iterative Linksets ......................................................................................... 263
Creating and Editing an Iterative Linkset ............................................... 264
Conversions between Iterative Linksets and Linksets .............................. 264
Export Package ............................................................................................ 265
Exporting a Package ........................................................................... 265
Packages Folder ................................................................................. 265
15 Drawing Application Automation Objects ......................................................267
Object Hierarchy .......................................................................................... 268
Object Type Descriptions............................................................................... 269
Application Object .............................................................................. 269
AddIns and AddIn Objects ................................................................... 269
DynamicsDisplay2d ............................................................................ 270
HighlightList ...................................................................................... 270
Menus and Menu Objects .................................................................... 270
SelectSet .......................................................................................... 271
ToolBars and Toolbar Objects .............................................................. 271
Index .......................................................................................................................i

Contents

ix

1 About this Guide

This guide details the Aspen Basic Engineering processes applicable to a user
with Administrative rights.
The following topics are covered:

How to generate datasheets.

Piping Systems.

Datasheets (and the Datasheet Definer) including preparing datasheets in


Microsoft Excel.

Using the Graphics Definer (including defining symbols and labels, with
worked examples and extracting legacy symbols and labels.

Explorer application, including interaction with Smartplant.

Administration application.

Class Library Editor application.

Rules Editor (and Knowledge Bases).

Bridge.

Further information about Aspen Basic Engineering applications and


functionality is contained in the on-line help available from the Windows
Start\ menu, or from the Help menu option within each Aspen Basic
Engineering application.

About Aspen Basic Engineering


Aspen Basic Engineering is a client/server application that allows multiple
process designers to be connected to a single workspace or project.
Changes made by one client are immediately reflected in the information
shown to other clients.
To generate a process design, you create database objects that represent the
real world process. You can view and modify data for these objects using
drawings, or datasheets (Before you can work with datasheets or diagrams,
you must open a Workspace or Project).

Related Documentation
In addition to this document, the following documents are provided to help
users learn and use the Aspen Basic Engineering applications.

1 About this Guide

Title

Content

Getting
Started Guide

This guide provides an overview of the Aspen Basic Engineering


application set and takes a first-time user through basic Aspen Basic
Engineering procedures
After completing the Getting Started guide, you will be able to
open/close workspaces, work with database objects, cases,
documents (drawings and diagrams) and understand document
control and revision processes

On-line Help

A comprehensive set of help systems are also provided with Aspen


Basic Engineering. Help within specific applications (for example
Bridge Help) is available from the Help menu of the open
application
A generic, self-contained Help system (detailing all Aspen Basic
Engineering applications, their use and interaction) is available by
clicking the Help icon within the windows Start | Programs |
AspenTech | Aspen Basic Engineering path

Technical Support
Online Technical Support Center
AspenTech customers with a valid license and software maintenance
agreement can register to access the Online Technical Support Center at:
http://support.aspentech.com
You use the Online Technical Support Center to:

Access current product documentation.

Search for technical tips, solutions, and frequently asked questions


(FAQs).

Search for and download application examples.

Search for and download service packs and product updates.

Search for and review known limitations.

Send suggestions.

Submit and track technical issues.

Registered users can also subscribe to our Technical Support


e-Bulletins. These e-Bulletins proactively alert you to important technical
support information such as:

Technical advisories.

Product updates.

Service Pack announcements.

Product release announcements.

1 About this Guide

Phone and E-mail


Customer support is also available by phone, fax, and e-mail for customers
who have a current support contract for their product(s). Toll-free charges are
listed where available; otherwise local and international rates apply.
For the most up-to-date phone listings; please see the Online Technical
Support Center at:
http://support.aspentech.com
Support Centers

Operating Hours

North America

8:00 20:00 Eastern time

South America

9:00 17:00 Local time

Europe

8:30 18:00 Central European time

Asia and Pacific Region

9:00 17:30 Local time

1 About this Guide

1 About this Guide

2 Knowledge Bases and


the Rules Editor

Aspen Basic Engineering supports a set of structured routines that manage


and modify engineering data within a workspace. Collectively, these are called
a Knowledge Base (KB) as they allow approved engineering design standards
and practices to be encapsulated in the form of scriptable code.
The Aspen Basic Engineering Knowledge Base (KB) Application Interface
enables you to integrate your engineering and workflow practices and
standards with the Aspen Basic Engineering Server. For example, you can
write a KB rule to assign equipment tags as they are created following an inhouse naming convention.
You can write KB functions in two ways:

Using any Microsoft compiled language

Using the Rules Editor to create a script (which is similar to VB Script)

Compiled KB code can offer better performance because each module is only
loaded one time during server startup and is not scanned by virus protection
software. Starting in Version 7.3, out-of-the-box KB functions are delivered as
VB.NET projects. Visual Basic 2008 can be used to view and change these
projects, and can be downloaded free from Microsoft at
http://www.microsoft.com/exPress.
This chapter contains information on:

Overview of KB API

Writing Compiled KB Code

Writing Rules Editor Script

AZDBQuery Library Object Reference

2 Knowledge Bases and the Rules Editor

Overview of KB API
A KB can consist of a number of different items:

Rules that define general procedures having global scope sometimes,


e.g., the EquipmentFolders Rule creates a folder under the Equipment By
Type Folder for equipment in the workspace

Methods that define procedures tied to objects by class, e.g., the


SwitchFeeds Method is defined for the Shell and Tube Heat Exchanger
class and only operates on this specific type of equipment

Events that runs when certain Aspen Basic Engineering events occur,
such as the creation of an object or the issuing of a datasheet

Demons that run when attributes of a specified class change their values

Sorts that order items on datasheets and summary sheets

Filters that limit the number of items in a list, e.g., the MajorEquipment
Filter causes nozzles and other sub-objects to be excluded

You can add as many of these items as you like to a module.


The easiest way to see how to write a KB routine is to start with a simple
example. This example is of a Method, so it operates for a specific Aspen
Basic Engineering object class. It can be called from a menu in an application
such as the Drawing Editor or procedurally from a script or application. This
Method gives any PlantItem object, or object derived from the PlantItem
class, a name of the form:
<Prefix><UniqueID>, e.g., P-100 for a pump or V-101 for a vessel
[?Class= PlantItem,
DisplayName = NameItem,
Interactive=true?]
AZMethod NameItem()
Self.ItemNumber = Self.NamePrecedent & Self.OID
End AZMethod
Even though this example was written as a Rules Editor Script, it illustrates
key features common to all KB definitions. Each KB definition has separate
registration and executable segments. The text in the first paragraph
registers the method by class along with other registration parameters, e.g.,
whether the method can be run interactively. The second paragraph defines
the application code that is executed when the method is invoked, which in
this case is a single line of code.
All methods are passed a reference to the object on which it was invoked.
This reference is called Self in the Rules Editor Language. The Name
Precedent, e.g., P- for Pump, is an attribute that is defined in the Data Model
by class. The KB can conveniently retrieve it for an objects class or any of its
subclasses by attribute name.

2 Knowledge Bases and the Rules Editor

The script simply reads the values of two object attributes, concatenates
them together, and assigns this new value to the ItemNumber attribute.
NamePrecedent, OID, and ItemNumber are all attributes of the classes
derived from PlantItem in the Aspen Basic Engineering data model. The OID
(Object Identifier) is an important system attribute, and each object in the
Aspen Basic Engineering database has a unique integer value for this
attribute. It is frequently used in the scripting language to look up objects.

Rules
Rules have global scope and are not tied to a particular object. Examples
include a function to refresh the project name or to condition heat curves for
all shell and tube heat exchangers.
Rules can use dialog boxes for an easy way to present the user with options
or to ask Yes-or-No questions. Reply Definitions implement the action based
on the users response.

Rule Definitions
Rules are the simplest KB routines. They are completely general functions and
have no special parameters available to them.

Rule Attributes
Required Attributes:
None

Optional Attributes:
Attribute

Meaning

Possible Values (default in bold)

DisplayName

Name displayed in rule


selection dialog box

Any string (may be delimited in


which case may contain punctuation)

Interactive

Will this rule be presented


to user as available to run?

True, False

Secure

Does this rule have


unlimited privileges?

True, False

The ScaleSymbols Rule is a good example of a rule attribute. The

ScaleSymbols Rule queries the user for the types of symbols to be scaled,
e.g., arrow, a scaling factor, and the drawings to be manipulated. The Reply
Method will perform the scaling based on the users selection. Since the rule
has global scope, the user is able to select a drawing from a list of drawings
in the workspace using a Combo Box. The name of the Reply Method is
ScaleSymbolsReply.

2 Knowledge Bases and the Rules Editor

Rule Reply Definitions


These routines are called when a user clicks OK on a KBDialog displayed from
a rule. The name of the Reply Method to be called is defined when the Rule
creates the dialog.
There are two available parameters:

The inputs parameter defines the value specified by the user, e.g., the
value of inputs("SymbolClass")would be Arrow if the user selected
Arrow as the type of symbol to be scaled.

The UserData parameter is optional to provide a mechanism for passing


named parameters between functions as strings.

These two parameters are dictionary objects, so that the values are returned
by specifying the appropriate key value. In the example, SymbolClass is a
dictionary key for Inputs to retrieve the type of symbol to be scaled.

Rule Reply Attributes


Required Attributes:
Attribute

Meaning

Possible Values

Class

Name of Aspen Basic


Engineering class to which
this Method is applied

Any valid class name

Optional Attributes:
Attribute

Meaning

Possible Values (default in bold)

Class

Name of Aspen Basic


Engineering class to which
this Method is applied,
repeated as required to add
classes

Any valid class name

Interactive

Will this method be


presented to user as
available to run?

True, False

Secure

Does this method have


unlimited privileges?

True, False

DisplayName

Name displayed in method


selection dialog box

Any string (can be delimited in


which case may contain punctuation)

Rule Reply System Supplied Parameters

inputs

A dictionary of dialog control IDs defined by the rule and


selected value for each control

userdata

A dictionary optionally populated by user code in the parent


method

2 Knowledge Bases and the Rules Editor

Methods
Methods define procedures tied to objects by class.
Methods can use dialog boxes for an easy way to present the user with
options or to ask Yes-or-No questions. Reply Definitions implement the action
based on the users response.

Method Definitions
Methods are routines which relate to a particular object; a method runs on
objects for its defined class. Methods can be run from the application menus
or they can be run programmatically. For example, a method can be run from
other methods and rules by passing the method name as a RunMethod
argument, such as Self.RunMethod("AutoName") runs the AutoName
method defined for the class to which Self belongs. Methods are inherited
through the class hierarchy so that a method defined on PowerPort would be
inherited by objects of class MechanicalPowerPort. The inheriting class can
however also declare a method with the same name. The server will
automatically call the method defined for the subclass. For example, if a
method is defined for both the Pump and CentrifugalPump class, the server
will call the Pump Method for all pumps except centrifugal pumps.

Method Attributes
Required Attributes:
Attribute

Meaning

Possible Values

Class

Name of Aspen Basic


Engineering class to which
this Method is applied

Any valid class name

Optional Attributes:
Attribute

Meaning

Possible Values (default in bold)

Class

Name of Aspen Basic


Engineering class to which
this Method is applied,
repeated as required to add
classes

Any valid class name

Interactive

Will this method be


presented to user as
available to run?

True, False

Secure

Does this method have


unlimited privileges?

True, False

Displayname

Name shown to user

Any valid text

2 Knowledge Bases and the Rules Editor

Method Reply Definitions


Method Reply Definitions are called when a user clicks OK on a KBDialog
displayed from a Method or Event. The name of the AZMethodReply to be
called when the dialog closes is specified in the AddDialog method of
AZKBDialog.
There are three parameters available in the routine:

The self parameter provides a reference to the object.

The inputs parameter provides the values that the user selected on the
dialog.

The userdata parameter provides a mechanism for passing data


between the calling routine and the reply routine.

These last two parameters are VBScript dictionary objects, so that the values
are returned by specifying the appropriate key value.

Method Reply Attributes


Required Attributes:
Attribute

Meaning

Possible Values

Class

Name of Aspen Basic


Engineering class to which
this Method is applied

Any valid class name

Optional Attributes:

10

Attribute

Meaning

Possible Values (default in bold)

Class

Name of Aspen Basic


Engineering class to which
this Method is applied,
repeated as required to add
classes

Any valid class name

Interactive

Will this method be


presented to user as
available to run?

True, False

Secure

Does this method have


unlimited privileges?

True, False

DisplayName

Name displayed in method


selection dialog box

Any string (may be delimited in


which case may contain punctuation)

2 Knowledge Bases and the Rules Editor

Events
Event Definitions
The Aspen Basic Engineering server raises events when certain actions have
occurred, such as the issuing of a document or the creation of an object. The
events listed below are predefined within the system.
The Event Name is the name that should be used in the Attribute section of
the Event declaration. A reference to the object on which the Event has
occurred is either passed as an argument or can be referenced using the
built-in Self variable for Rules Editor Scripts. There may be a second
parameter called EventData that provides an additional reference for the
event as described in the table below.
When declaring an Event, you must also specify the class of the object in the
Attributes section. This specifies the class of object on which the event can
occur, and provides a means of providing different actions on different classes
of object for the same event:
Event Name

Event Description

Object Reference

EventData Parameter

CreateObject

The object has just been


created

AZQObject The
created object

Empty

DeleteObject

The object is about to be


deleted

AZQObject The
deleted object

Empty

CloneObject

The object has been


created by cloning

AZQObject The
created object

AZQObject The original


object

CopyObject

The object has been


created by copying

AZQObject The
created object

AZQObject The source


object

ChangeClass

The class of the object


has changed

AZQObject

AZQClass The original


class

ModifyAttribute

The value of an attribute


has changed on the
object

AZQObject The
owning object

IAZQAttributeModifyEvent
object. This has two read
only properties
Attribute:AZQAttribute,
Index:long

SubmitDocument

The document has been


submitted

AZQDocument The
document

CheckDocument

The document has been


checked

AZQDocument The
document

IssueDocument

The document has been


issued

AZQDocument The
document

WithdrawDocument

The document has been


withdrawn

AZQDocument The
document

As well as these events provided by the system, you can define your own
events in external modules.

2 Knowledge Bases and the Rules Editor

11

Event Attributes
Required Attributes:
Attribute

Meaning

Possible Values

Class

Name of Aspen Basic Engineering


class to which this Method is
applied

Any valid class name

Optional Attributes:
Attribute

Meaning

Possible Values

Class

Name of Aspen Basic Engineering


class to which this Method is
applied, repeated as required to
add classes

Any valid class name

Example: Event
The following is a small CreateObject example to set the Created By and
Created Date document attributes:
[?Class = Document?]
AZEvent CreateObject ()
' Update necessary information on creating a document
' Should get the user and date and set these on the document
strUser = GetUserName
dteToday = date
self.createdby = strUser
self.createddate = dteToday
end AZEvent

Demons
Demon Definitions
Demons are used when you want a rule to run when an attribute changes.
Since the demon only runs when specific attributes change, demons offer
much better performance than the code based on the Modify Attribute Event.
A Demon consists of two parts:

12

The Pattern defines the attributes that trigger the demon, e.g., the
SetHotFluidAllocation demon for Shell and Tube Heat Exchangers runs
when an inlet or outlet temperature changes.

The Action is the routine that runs when the monitored attribute or
attributes change.

2 Knowledge Bases and the Rules Editor

Demon Operation
Demons are registered against specific Aspen Basic Engineering classes. Like
Methods and Events, a Demon can be specified for the class, or the class can
inherit the Demon from its parent class.
When an object is first created, any demons defined for its class (or any
inherited classes) are run. During this first run, the system examines the
pattern part of the demon and determines which Aspen Basic Engineering
data model attributes are read. The system records these attributes so that it
can monitor them for when they change. The action section of the demon is
not run at this time.
When the monitored attributes subsequently change, the Demon is fired again
and the Pattern section is invoked. This time, the system records any new
attributes sampled by the Pattern, and the Pattern makes calls to run the
Action section.
The Action section is used to update Aspen Basic Engineering attributes and
perform other actions. In this way, actions are associated with attributes that
have changed in the Pattern section.
The Pattern and Action sections are coded separately.

Pattern Section
This is the part of the demon that is executed in full whenever the demon is
invoked. Any attribute referenced in this section becomes part of the demons
trigger. For this reason, the pattern should sample only those attributes that
should be monitored for change to improve performance. The Pattern controls
when an Action is invoked by making a call to the PerformAction method. For
example:
[?Class=Pump?]
AZDemon SampleDemon
AZPattern()
Cap = self.Capacity
CMin= Self. MinimumCapacity
CMax= Self. MaximumCapacity
demon.PerformAction Cap, Cmin, CMax
End AZPattern
AZAction()

End AZAction
End AZDemon
The above Demon is run when the Pump is first created to include the
Capacity, MinimumCapacity, and MaximumCapacity attributes within its
trigger. Subsequently, if any of these attributes change, the Pattern is called.
An action is triggered by the call to PerformAction. It is essential for the
Pattern code to only access attributes that should become part of the trigger
for activating the Demon.

2 Knowledge Bases and the Rules Editor

13

Action Section
This part of the demon is executed only when called by the AZPattern code.
The AZAction may contain user defined parameters. It is the users
responsibility to ensure that sufficient and matching parameters are supplied
in the call to PerformAction.

AZPattern Properties and Methods


This uses the following properties and methods of AZQDemonControl.

Properties:
Property

Type

Meaning

SuspendTrigger

Boolean

When TRUE (the default), it ensures that any


changes to attributes in the Pattern section do
not cause the Demon to be executed
When FALSE, normal attribute monitoring
takes place, i.e., changes to an attribute cause
the demon to be fired again

Matched

Boolean (Read
Only)

True if the Demon currently in the Matched


state (see above)

Method

Parameters

Return

Purpose

PerformAction

Any, but must


match those in
the AZAction

Must match that


returned by the
AZAction part of
the demon

Calls the AZAction part of


the demon. Only called if
the current Matched status
is TRUE; otherwise, it has
no effect

BeginLoop

None

Methods:

When not using the demon


enumerator, use
BeginLoop, RepeatLoop,
and EndLoop for looping
constructs

RepeatLoop

See BeginLoop

EndLoop

See BeginLoop

Enumerate

Collection:
Variant

An enumerator
of Collection
items

Automatically handles
Matched state inside the
loop

Example: Demon 1
[?Class=Pump?]
AZDemon SampleDemon
AZPattern()
Pre = self.NamePrefix
C = 0
For Each Nozzle in demon.Enumerate( self.Nozzles)
C = C + 1

14

2 Knowledge Bases and the Rules Editor

demon.PerformAction( Nozzle, C, Pre)


Next
End AZPattern
AZAction( LocalNozzle, Num, Prefix )
LocalNozzle.Name = Pre & C
End AZAction
End AZDemon
This Demon names all the nozzles belonging to a pump by adding 1 to a
prefix held by an attribute of the pump. Note that there is a Pattern and an
Action section. The parameters of the Action match those of the call to the
PerformAction method.
When a Pump object is created, this demon is run, and any attributes that are
read in the pattern section are marked for monitoring. In this case, it is the
Pumps NamePrefix and Nozzles.Count attributes.
Subsequently, if either or both of these attributes change, the demon is called
again. If just one nozzle has been added, then the AZPattern is invoked.

Demon Attributes
Mandatory Attributes:
Attribute

Meaning

Possible Values

Class

Name of Aspen Basic Engineering


class to which this Demon is applied

Any valid class name

Optional Attributes:
Attribute

Meaning

Possible Values

Class

Name of Aspen Basic Engineering


class to which this Demon is applied,
repeated as required to add classes

Any valid class name

Sorts and Filters


AZSort: Sort Definitions
Sorts are used to organize the order of objects on datasheets and summary
sheets. You define a sort Key in the attribute section. This Key is then
associated with an Aspen Basic Engineering attribute in the body of the sort,
for example self.ItemNumber. The sort is performed on this attribute. You can
define whether the sort should arrange items in ascending or descending
order by using the following terms in the attribute declaration:
> or <
If you choose >, then if the value of the sort attribute for an object is
greater than the corresponding attribute value of another object then this
object appears before it in the sorted order (the items are sorted in
descending order).

2 Knowledge Bases and the Rules Editor

15

Sorts can be made case sensitive by adding a c or C to follow the < and
>. Finally, you can force a sort to be alphanumeric by adding a * in the
attribute definition (by default the sort is interpreted numerically where
possible).

Sort Attributes
Required Attributes:
Attribute

Meaning

Possible Values

Key

Name of key for use in body of


procedure

Any valid VBScript identifier

Optional Attributes:
Attribute

Meaning

Possible Values

Key

Name of key for use in body of


procedure. When multiple keys
appear, the items are sorted so
that the first key specified is the
primary sort, the second key is
the secondary sort, etc.

< or > optionally followed by C


or c optionally followed by *
followed by a key name which is
any valid VBScript identifier

DisplayName

Name displayed in method


selection dialog box

Any string (may be delimited


in which case may contain
punctuation)

Sort System Supplied Parameters


self

is the object for which this method has been called.

The Key values are described in the Attributes section.

Example: Sort
[?Key= <* Key1,
Key=<Key2?]
AZSort Sort1()
Key1 = self.Type
Key2 = self.ItemNumber
end AZSort
This example alphanumerically sorts a list of object names in ascending order
of their Types. Where there are two entries of the same type, they are sorted
to appear in descending name order.
Sorts can also be used to organize collections of objects in the script. The
following example lists all piping systems to the KBs trace window in
alphanumeric order.
[?Key= >*Key1?]
AZSort NameSort()
Key1 = self.ItemNumber

16

2 Knowledge Bases and the Rules Editor

end AZSort
AZRule ListPipingSystemst()
set cPS = ClassStore.FindClass("PipingSystem")
set mPS = cPS.Members
mPS.Sort = " NameSort "
mPS.refresh
for each oPS in mPS
server.trace 1, oPS.ItemNumber
next
end AZRule

AZFilter: Filter Definitions


Filters are used to select which members of a class appear on a summary
sheet. They can also be used from within the scripting language to filter an
object collection.
You define which class of objects is affected by the filter using the class
attribute. Then for every object of this class (or of a class that is derived from
this class), the filter routine is called. If the routine returns true, then the
object is included otherwise it is excluded. The self parameter is available to
give access to the properties of the object.

Filter Attributes
Required Attributes:
Attribute

Meaning

Possible Values

Class

Name of Aspen Basic


Engineering class which this
Filter accepts

Any valid class name

Optional Attributes:
Attribute

Meaning

Possible Values

Class

Name of Aspen Basic


Engineering class which
this Filter accepts, repeated
as required to add classes

Any valid class name

DisplayName

Name displayed in Filter


selection dialog box

Any string (may be delimited in


which case may contain punctuation)

2 Knowledge Bases and the Rules Editor

17

Filter System Supplied Parameters


self

is the object for which this filter has been called.

Functioning of a Filter
A Filter works on two levels:
1

Only classes named as attributes can be considered for the filter.

For instances of classes which match the above, the filter can return TRUE
or FALSE.

You can provide a filter that has no VBScript code, in which case filtering is
done purely on the classes named in the attributes.

Example: Filters
[?
Class=SignalPort,
Class= MaterialPort
?]
AZFilter PortFilter()
End AZFilter
This filter passes any instance of classes SignalPort or MaterialPort and
any objects of classes that were derived from either of these two classes.
[?Class=MaterialPort?]
AZFilter PortFilter ()
if self.Name = "Inlet" then
PortFilter = true
else
PortFilter = false
end if
End AZFilter
This filter passes any instance of class MaterialPort whose Name attribute is
equal to Inlet.

18

2 Knowledge Bases and the Rules Editor

Writing Compiled KB Code


KB routines can be written in any language that supports COM. In most cases,
the Aspen Basic Engineering Rules Editor is the easiest way to write KB
routines. Sometimes, you need better code execution speed or the ability to
interactively debug your KB routines; in these circumstances, you need to
write your KB routines in another language. This section describes how to
write a KB module in VB.NET or VB6. Any .NET language can be used since
they are all part of the Common Language Runtime (CLR).
Compiled KBs are implemented as Data Service Modules which are essentially
dlls that are loaded by the server on startup. Starting in version 7.3, the Data
Service Module can be implemented as either a Managed .NET Assembly or a
COM component coded in VB6. See the Implementing Data Services
Modules in .NET section for details on how Managed KBs are implemented.
The only requirement for implementing a KB Data Service Module is for the dll
to contain a class that implements the AZQDataService interface. The server
calls the AZQDataService Register function on startup to determine the KB
functions, e.g., Methods, Demons, the dll supports. The server dispatches
calls to the dll when a KB function supported by the dll is invoked. Unlike KBs
implemented as azkbs, the dll is loaded on startup and remains active until
the server shuts down.

AZQDataService Interface
The Aspen Basic Engineering Server can load any user supplied data service
as long as it supports the AZQDataService interface. The AZQDataService
interface provides methods to register different KB routines with the server
and to control execution of these KB routines.
To support the AZQDataService interface in your VB.NET Assembly:
1

Add a reference in your project to the Interop.AZDBQuery.dll that was


installed in the KBs folder with the Aspen Basic Engineering Server.

Use the Implements key word to declare that your main class will
implement the AZDBQuery.AZQDataService interface

To support the AZQDataService interface in your ActiveX (COM)


module:
1

Import the Interface Definition into your project.


To import the definition of AZQDataService interface into your project, use
Project/References from the Visual Basic 6 menus. In the References
dialog box, find and select AZDBQuery Version xx.x, where xx.x is the
current internal version number for the Aspen Basic Engineering version.

Declare your Class to implement the interface.


Add the following statement to your class definition:
Implements AZDBQuery.AZQDataService

Add the function declaration for each member of the


AZQDataService interface.
The Visual Basic 6 IDE makes this a simple process. In the left- hand

2 Knowledge Bases and the Rules Editor

19

drop-down list above the code window, select AZQDataService.


The right hand drop down list now lists the methods of AZQDataService.
As you select each one, the IDE will add the method declaration to the
code. Select each method until all have been declared. When all the
methods are listed in the right hand box in bold, they have all been
declared.

More information about the declarations for IAZQDataService interface can be


found in the AZDBQuery documentation, contained in the KBEditor help.

Registering KB Items
The Server calls the Register Function on startup for each configured KB
project to find out which KB constructs (methods, Rules, Demons) the project
supports.
To define the KB items you are implementing, you must implement the
Register method.
To implement the Register method:
1. Call IAZQDataServiceRegistrar::SetServiceName. This uniquely
identifies the DataService to the Aspen Basic Engineering Server.
2. Call the appropriate Add methods to define the KB item.
More information about the Add methods for defining each type of KB item is
listed in the Defining Methods section.

20

2 Knowledge Bases and the Rules Editor

Example
The following defines a single demon to define hot fluid allocation for a shell
and tube heat exchanger. The SetServiceName function defines the name
space for the KB and is similar to Module Name in the AZKBS Scripts.
Public Sub Register(ByVal Registrar As
AZDBQuery.AZQDataServiceRegistrar) Implements
AZDBQuery.IAZQDataService.Register
Registrar.SetServiceName("ShellAndTubeHeatExchangers")
'Demons
Registrar.AddDemon(1, "SetHotFluidAllocation",
"ShellAndTubeHeatExchanger", False, False)
End Sub

Defining Methods
To define a Method:
1. Call IAZQDataServiceRegistrar::AddMethod from the Register
method.
2. Implement the method handler in IAZQDataService:RunMethod.

Arguments for AddMethod


Arguments

Description

iMethodID as Long

Unique ID of the method used to identify it in the


method handler

MethodName as string

Name of the Method

classes as string

Class parameter from the meta data. Use a comma


to separate multiple classes

displayname as string

DisplayName parameter from the meta data

description as string

Description parameter from the meta data

interactive as boolean

Interactive parameter from the meta data

secure as boolean

Secure parameter from the meta data

casefixed as boolean

CaseFixed parameter from the meta data

Arguments for RunMethod


Arguments

Description

iMethodID as long

Unique ID of the method specified in the AddMethod


call

MethodName as string

Name of the Method

Object as IAZQObject

The object for the method

Args as Variant()

An array of arguments for the method

Globals as IAZQGlobals

The Globals object

2 Knowledge Bases and the Rules Editor

21

For each method defined using AddMethod, you will need to branch based on
iMethodID in order to handle the correct method call.

Defining Rules
To define a Rule:
1. Call IAZQDataServiceRegistrar::AddRule from the Register method
2. Implement the rule handler in IAZQDataService:RunRule.

Arguments for AddRule


Arguments

Description

iRuleID as Long

Unique ID of the Rule used to identify it in the rule


handler

RuleName as string

Name of the Rule

displayname as string

DisplayName parameter from the meta data

description as string

Description parameter from the meta data

interactive as boolean

Interactive parameter from the meta data

secure as boolean

Secure parameter from the meta data

casefixed as boolean

CaseFixed parameter from the meta data

Arguments for RunRule


Arguments

Description

iRuledID as long

Unique ID of the rule specified in the AddRule call

RuleName as string

Name of the Rule

Args as Variant()

An array of arguments for the rule

Globals as IAZQGlobals

The Globals object

For each rule defined using AddRule, you will need to branch based on iRuleID
in order to handle the correct rule call.

Defining Demons
To define a Demon
1. Call IAZQDataServiceRegistrar::AddDemon from the Register method.
2. Implement the Pattern matching section of the demon handler in
IAZQDataService:RunDemonPattern.
3. Implement the Action section of the demon handler in
IAZQDataService:RunDemonAction.

22

2 Knowledge Bases and the Rules Editor

Arguments for AddDemon


Arguments

Description

iDemonID as Long

Unique ID of the Demon used to identify it in the


Demon handlers

DemonName as string

Name of the Demon

classes as string

Class parameter from the meta data. Use a comma


to separate multiple classes

secure as boolean

Secure parameter from the meta data

casefixed as boolean

CaseFixed parameter from the meta data

Arguments for RunDemonPattern


Arguments

Description

iDemonID as long

Unique ID of the demon specified in the AddDemon


call

DemonName as string

Name of the Demon

Object as IAZQObject

The object for which the Demon fires

pDemon as
IAZQDemonControl

Demon control object

Globals as IAZQGlobals

The Globals object

The Demon Control object pDemon is the same object as Demon in the
rules language. Call pDemon.PerformAction in order to fire the action section
of the demon.

Arguments for RunDemonAction


Arguments

Description

iDemonID as long

Unique ID of the demon specified in the AddDemon


call

DemonName as string

Name of the Demon

Object as IAZQObject

The object for which the Demon fires

pDemon as
IAZQDemonControl

Demon control object

Args as Variant()

An array of arguments for the rule

Globals as IAZQGlobals

The Globals object

For each Demon defined using AddDemon, you will need to branch based on
iDemonID in both the Pattern and Action handlers in order to handle the
correct demon call.

2 Knowledge Bases and the Rules Editor

23

Defining Events
To define an Event:
1. Call IAZQDataServiceRegistrar::AddEventSink from the Register
method.
2. Implement the method handler in IAZQDataService:NotifyEventSink.

Arguments for AddEventSink


Arguments

Description

iSinkID as Long

Unique ID of the event used to identify it in the


event handler

eEventID as variant

The ID of the event type, as defined by the


enumeration EAZQSystemEventIDs

classes as string

Class parameter from the meta data. Use a comma


to separate multiple classes

displayname as string

DisplayName parameter from the meta data

secure as boolean

Secure parameter from the meta data

Arguments for NotifyEventSink


Arguments

Description

SinkID As Long

Unique ID of the event specified in AddEventSink

Object As IAZQObject

The object for which the event is fired

SinkData() As Variant

An array of data sent to the event

Globals As IAZQGlobals

The global object

For each event defined using AddEventSink, you will need to branch based on
iSinkID in order to handle the correct event call.

Defining Sorts
To define a Sort:
1. Call IAZQDataServiceRegistrar::AddSort from the Register method
2. Implement the method handler in IAZQDataService:GetSortValues.

Arguments for AddSort

24

Arguments

Description

iSortID as Long

Unique ID of the sort used to identify it in the sort


handler

SortName as string

Name of the Sort

displayname as string

DisplayName parameter from the meta data

description as string

Description parameter from the meta data

2 Knowledge Bases and the Rules Editor

keys() as variant

An array of varying length, depending on the


number of keys. For each key, the value is an
integer representing a value mask of the following
parameters:
1: inverse sort (>)
2: alphanumeric sort (*)
3: case sensitive sort (c)
(a case insensitive, alphanumeric sort ("<*Key1")
would have a key value of 2)

Arguments for GetSortValues


Arguments

Description

iSortID As Long

Unique ID of the sort specified in AddSort

SortName As String

The name of the Sort

Object As IAZQObject

The object to be sorted

Globals as IAZQGlobals

The globals object

For each event defined using AddSort, you will need to branch based on
iSortID in order to handle the correct sort call.

Defining Filters
To define a Filter:
1. Call IAZQDataServiceRegistrar::AddFilter from the Register method.
2. Implement the method handler in IAZQDataService:FilterObject.

Arguments for AddFilter


Arguments

Description

iFilterID as Long

Unique ID of the filter used to identify it in the filter


handler

FilterName as string

Name of the Filter

classes as string

Class parameter from the meta data. Use a comma


to separate multiple classes

displayname as string

DisplayName parameter from the meta data

description as string

Description parameter from the meta data

Arguments for FilterObject


Arguments

Description

iFilterID As Long

Unique ID of the filter specified in the AddFilter call

FilterName As String

Name of the filter

Object As IAZQObject

Object to be filtered

Globals As IAZQGlobals

Globals object

2 Knowledge Bases and the Rules Editor

25

Global Variables
When you write rules in the KBEditor, the rules language defines certain
global variables that are available for the script. When you write these same
rules in Visual Basic, these global variables are not defined. Each of these
globals can be accessed from variables that are passed in through the
argument list of the assorted KB handler methods. The following table lists
these globals variables and how you would access them from the arguments:

KB Global Variable

Visual Basic Syntax

Server

Globals

ObjectStore

Globals.ObjectStore

ClassStore

Globals.ClassStore

Response

Globals.Response

Self

Object

Handling Arguments
The handler methods for Methods, Rules, and Demons all have a variant array
args as an argument. In the rules language, these arguments would be
listed in the declaration of the AZMethod, AZRule, or AZDemon action section.
In Visual Basic, these arguments are passed as an array.
For a Method or Rule which is handling the reply from a KBDialog (an
AZMethodReply or AZRuleReply), the first argument is a Scripting.Dictionary
object. This dictionary corresponds to the Inputs variable in the rules
language.
You can pass arguments to a method when calling Object.RunMethod or to a
Demon Action handler when calling pDemon.PerformAction. In each case, you
must create a Variant array, set the values of each element, and pass the
array to either RunMethod or PerformAction as the args optional argument.

Implementing Data Service Modules in .NET


Starting in version 7.3, the Aspen Basic Engineering Server creates an
Application Domain for the Managed KBs to simplify the KB application code;
KB Application code is no longer required to release COM objects and all
uncaught exceptions thrown by the KBs are caught and logged in the
workspace journal file. The server will automatically load all assemblies within
the domain that support the AZQDataService Interface on startup. The
domain directory is defined using the ManagedKBsDirectory Config File
keyword. Only one application domain can exist on the server.
The server will automatically run the .NET Garbage Collector, catch all
uncaught exceptions thrown by the Managed KB Modules, and log exception
messages to the Workspace Journal File. The Managed KB Module code should
not release underlying COM references, i.e., calls to ReleaseComObject or
FinalReleaseComObject from the

26

2 Knowledge Bases and the Rules Editor

System.Runtime.InteropServices.Marshal namespace should not be


made from KB application code.
The .NET KB Code can be debugged by setting break points in the KB Code
after attaching Visual Studio 2008 to a running Aspen Basic Engineering
Server. If using Visual Basic 2008, the attach to server function is not
available.

Installation and the Config File


Each Data Service Module will define a class to implement IAZQDataService.
This class will implement Register and other functions within IAZQDataService
that the module supports. The server calls Register to determine the
methods, demons, rules, and other KB functions the module supports.
The dlls for Data Service Modules written in .NET must be copied to an
Application Domain Folder defined using the ManagedKBsDirectory keyword,
e.g., ManagedKBsDirectory = KBS to set the KBs folder within the servers
folder path as the Application Domain. The assemblies should not be
registered. The ExcludedManagedKBs keyword is used to define those that
should not be loaded, e.g., ExcludedManagedKBs = "TEF.DataSvcImpl. A
comma delimited list of assemblies can be specified. Each assembly is
identified by specifying the Root Namespace followed by the name of the
interface class implementing IAZQDataService separated with a period.
Each class should define a unique GUID, for example:
<Guid("AE460480-A048-4c04-8D65-C731C1A146BB")> _
Public Class DataSvcImpl
Implements AZDBQuery.AZQDataService
Managed assemblies should be built with the Interop dlls (for example,
Interop.AZDBQuery.dll) that have been installed with the Aspen Basic
Engineering Server in the KBs folder.
COM Data Service Modules, e.g., written in VB6, can also be used alongside
the .NET KBs. These dlls are tied to the server by declaring a comma
delimited list of ProgIDs using the DataServiceModules keyword, e.g.,
DataServiceModules =
"ObjectCopyData162.DataServiceImpl,.,.

2 Knowledge Bases and the Rules Editor

27

Writing Rules Editor Script


The Aspen Basic Engineering Rules Editor is a syntax coloring editor for the
creation and modification of KB script source files. It also allows these source
files to be compiled and loaded into the server and allows you to execute
Methods, Rules, Sorts, and Filters. It features:

Auto Indent - The editor recognizes VBScript and Aspen Basic


Engineering keywords and performs automatic indentation appropriately.

Syntax Highlighting - The editor recognizes both VBScript and Aspen


Basic Engineering keywords and symbols and highlights the text
appropriately. If you are printing to a color printer, this coloring is
retained.

Error Windows - When compilation errors are present in the Build


window or Run errors in the Run Error window, the menu items Tools |
Next Error and Tools | Prev Error can be used to highlight the relevant
source code; double-clicking the error line in the error window will achieve
the same effect.

This section assumes you have knowledge of VB scripting and a little


familiarity with the Aspen Basic Engineering Data Model.

Writing the KB Module


This section provides information on

Format of KB module source files

Dialog boxes and replies

Message boxes

Format of KB Module Source File


A KB Module source file comprises a number of sections:

28

Comments
These may appear anywhere within the source file. These styles of
comment are recognized:
o
/* comment */
o
comment to end of line
o
// comment to end of line
o
REM comment to end of line

Module Name
The name of the KB module must not be the same as the module name
for any other KB file that is loaded into the workspace. The name appears
as [!Modulename=modulename !] at the beginning of the source file. Only
comments may appear before this.

Private Code
You can define an optional private section to the file. It can contain any
valid VBScript code, including variables, classes, functions and
subroutines, which can be used by any script within the module. Anything
in the private section is not visible outside of this module. The section
starts with [?Private Code?] and finishes with [?End Private Code?].

2 Knowledge Bases and the Rules Editor

The remainder of the file consists of Event, Method, Rule, Filter, Sort, and
Demon routines. A routine is described in the module by certain attributes
such as a display name. These attributes are in an attribute block that
appears at the very start of the routine between [? and ?] characters.
[?
AttributeName = AttributeValue,
AnotherAttribute = AnotherValue
?]
AZKBKeyword RoutineName( possible parameters)
VBScript code
End AZKBKeyword
where AZKBKeyword is one of:

AZEvent

AZMethod

AZMethodReply

AZRule

AZRuleReply

AZSort

AZFilter

AZDemon (and subsequently AZPattern and AZAction)

Example: Basic Sections of a KB File


// A Simple naming rule module
[!Modulename=SimpleNaming !]
[?Private Code?]
Function IncrementName(NamePrefex)
Num = ObjectStore.Globals.ProcessEquipmentCounter
Num = Num + 1
ObjectStore.Globals.ProcessEquipmentCounter = Num
IncrementName = NamePrefix & Num
End Function
[?End Private Code?]
'Set the name on the create event
[?Class=PlantItem?]
AZEvent CreateObject()
// Self is an example of a system parameter
// which here represents the object
Prefix = Self.NamePrecedent
Self.ItemNumber = IncrementName(Prefix)
end AZEvent

Dialog Boxes and Replies


To interact with the user, a routine can display a dialog box that displays text
and receives input by means of combo boxes, edit fields, radio buttons, etc.
Dialog boxes cannot be used with Filters and Sorts.

2 Knowledge Bases and the Rules Editor

29

The dialog box is created programmatically in the script where user interface
elements are added to it. The dialog box does not appear until the method or
rule that calls it has completed. When the dialog box closes, another routine
is called to allow the script to continue execution.

Creating a Dialog Box


To create a dialog box for display in a routine you use the
Server.NewKBDialog method:
Set dlg = Server.NewKBDialog(dialog title, reply routine
name)
dialog title appears in the title bar of the dialog. reply routine
name is a reference to another routine in the KB Module that runs when the
dialog closes. This routine can be either a AZMethodReply or AZRuleReply
routine.

Displaying a Dialog Box


The dialog box is invoked slightly differently depending upon whether it is
called from a rule, a method, or an event.
For a rule or method, the dialog variable is assigned to the return value of the
method or rule. The Dialog is then displayed when the method or rule
completes, e.g.:
AZMethod NameObj()
set dlg = Server.NewKBDialog( "Enter Name", "NameReply")

set NameObj = dlg //The dialog is displayed when the method ends
end AZMethod
AZMethodReply NameReply ()

End AZMethodReply
After the user closes the dialog box, the specified reply method (or rule) is
called.
Displaying a dialog box is a little different if it is invoked from an Event. As
Aspen Basic Engineering supports transactions on the server, it does not allow
for user interaction whilst a transaction is in progress; this would cause the
transaction processing on the server to be held up until the dialog box was
closed. Events typically occur as part of a transaction and so any dialog boxes
that are needed are entered into a queue until the transaction completes. The
dialog box is then displayed. For the rule writer, this means that instead of
assigning the dialog to the routine return value, they need to enter it into a
queue called the KB Dialog queue, which is done by calling the servers
QueueKBDialog method.

Example: Displaying a Dialog from an Event


[?Class=PlantItem?]
AZEvent CreateObject()
set dlg = Server.NewKBDialog( "Enter Name", "NameReply")
// Display the dialog after the transaction completes

30

2 Knowledge Bases and the Rules Editor

Server.QueueKBDialog dlg
end AZEvent

Populating the Dialog Box


The Server.NewKBDialog method creates an AZQKBDialog object. Visual
features such as Text Boxes and combo boxes can be added to the dialog box
using the properties and methods of the AZQKBDialog.
See AZQKBDialog for the full list of properties and methods.
The most useful properties are:

Cancel displays a cancel button on the dialog. If the user clicks this
button, one of two things happen. If a script has been added to the dialog
box by the AddScript method and this script contains a function called
Cancel, this function is called. If this function returns true, the dialog
closes and the script is completed. If the function returns false, the user is
returned to the dialog and the script resumes. If there is no script called
Cancel associated with the dialog box, then clicking Cancel closes the
dialog and the script stops executing.

Title specifies the Title of the dialog box.

ReturnTo specifies the name of the routine to be called when the user
clicks OK.

The OK button is always present. When it is clicked, the dialog box closes and
the Reply method or rule is called unless a script has been added to the dialog
by the AddScript method containing a function called Validate. If the
Validate function exists, it is called. If it returns true, the dialog closes and
the script continues; if the function returns false, the user is returned to the
dialog and the script resumes. This provides a mechanism for validating the
inputs on the dialog.
The most useful dialog methods are:

AddTextBox adds a text box with the specified text.

AddEditBox adds an Edit box with the specified prompt.

AddComboBox adds a combo box. An AZKBDlgComboBox object is


returned which is used to build up the combo box.

AddScript adds the script as it appears in the text.

You cannot specify the layout of these visual elements. The OK and Cancel
buttons appear at the bottom of the dialog box. The other items appear
vertically underneath each other in the order in which they were created.
Combo Boxes and Radio Button Groups are the most complex visual element
to add to a dialog box. First, an object is added to the Dialog that represents
the ComboBox or Radio Button, e.g.:
Set Combo = dlg. AddComboBox ("Title", Text, )
This object can then be used to further populate the Combo Box or Radio
Button Group, e.g.:
Combo.AddOption First List Item Key1
Combo.AddOption Second List Item Key2
adds two items to the Combo Box. See the AZQuery class reference for
further information.

2 Knowledge Bases and the Rules Editor

31

Dialog Return Values


For each dialog box, a reply routine should be specified that is called after the
user clicks the OK button. This is the name of an AZRuleReply if the dialog is
called from a rule; otherwise it should be an AZMethodReply.
An AZMethodReply or AZRuleReply routine has a system-supplied parameter
available to it which provides information about the user inputs to the dialog.
This is called inputs and it is a VBScript Dictionary object. The return values
are accessed by using the specified Button/Option ID as the key, e.g., in a
method:
Set rBox = dlg.AddRadioGroup("Group1")
rBox.AddButton "Button1","Prompt1"," ", ""
rBox.AddButton "Button2","Prompt2"," ", ""
Two buttons are added with Ids of Button1 and Button2. To access the state
of the buttons after the dialog is closed, the reply method can access the
inputs parameter and use the keys Button1 and Button2, e.g., in the
methodreply:
Sever.Trace 1,"Button1 value = " & inputs("Button1")
Server.Trace 1,"Button2 value = " & inputs("Button2")
if the you press button 1 then inputs(Button1) returns TRUE whilst
inputs(Button2) returns FALSE.

Dialog User Data


The UserData property of a KBDialog is a VBScript Dictionary object; data
may be stored in this dictionary like this:
dlg.UserData.Add "Case1", Design
dlg.UserData.Add "Case2", Summer
The userdata is later made available in the AZMethodReply or AZRuleReply as
a system supplied parameter UserData, like this:

Server.TRACE 1, userdata(Case1)

Message Boxes
Because KB scripts run on the server, the VBScript MsgBox will not work.
Therefore, the KB Dialogs must communicate any screen input from the
server back to the client.
Two other server methods of the AZGlobals object display simple message
boxes:

SendWarningMessage(<TextString> displays a warning box.

SendErrorMessage(<TextString> displays an error box.

For example:
if not Self.Temperature.HasValue then
Server. SendWarningMessage No Temperature value specified

32

2 Knowledge Bases and the Rules Editor

Compiling the KB Module


The previous example can be run using the Rules Editor. This is launched
from the Start Menu and can be found under Configuration Tools in the Aspen
Basic Engineering entry in the Programs folder. With the Rules Editor running,
open a Workspace from the File menu. A default module is already open. To
test the previous example you can specify the module name at the top of the
file and type or paste the text of the Rule.
Save the file using Save on the File menu. You can now compile the module
by picking the Compile Menu item from the Tools menu. If you have any
compilation errors, they are described in the Build window at the bottom of
the Rules Editor. You can double-click the error message to go to the problem
line in the script. Otherwise, the Build window outputs the location of the
compiled file and you can see that the compiled file has a .azbx file extension.

Loading the KB Module


After the script successfully compiles, select Tools | Load from the menu bar
to load it into the workspace. The final part of testing is to run the Method.
The Run menu allows you to run a Method, Rule, Sort, or Filter. When you
select Method from the Run menu, you are given a chance to select the class
of object. This is because Methods work on a particular class of object. You
can either choose a class or click Cancel. If you click Cancel, a list of all
objects in the workspace appears; otherwise, a list of only those objects of
the selected class appears.

Running the KB Module


With an object selected, you are presented with a select list of all methods in
the workspace, includes all methods loaded as part of loading the workspace
and all those loaded directly from the Rules Editor. To run your Method, select
your Method from the list. If the previous rule had an output, for example by
having
Server.Trace 1,

The object has been named & Self.ItemNumber

just before End AZMethod, then output such as:


The object has been named P-1
is displayed in the Trace window.
The Rule Editor also has an output window to display Run Time errors (errors
not handled whilst the script is running). For example, if you mistype the
previous line so that it reads:
Server.Trace 1,

The object has been named & Self.ItemNumb

A message like:
E:\Test.azkbs(8) :error : Object doesn't support this property or
method: 'self.ItemNumb'
is displayed in the Run Errors pane. You can double-click this message to go
to the line where the error occurred.

2 Knowledge Bases and the Rules Editor

33

Loading the module in this way would not ensure that the module was loaded
every time the workspace was loaded. To do this, you must place the
compiled module in the KB directory and ensure it is referenced in the
workspace configuration file, (see Configuration.)

Events
The previous example would be more useful if it ran when an object was first
created, as it could then give an object a default name. This can be
accomplished with an Event. Whenever an object is created in Aspen Basic
Engineering, the CreateObject event is fired. We can write a routine to
capture this event as follows:
// A Simple naming rule module
[!Modulename=SimpleNaming !]
[?Private Code?]
Function IncrementName(NamePrefix)
Num = 0
if Num = ObjectStore.Globals.ProcessEquipmentCounter.HasValue
then
Num = ObjectStore.Globals.ProcessEquipmentCounter
end if
Num = Num + 1
ObjectStore.Globals.ProcessEquipmentCounter = Num
IncrementName = NamePrefix & Num
End Function
[?End Private Code?]
'Set the name on the create event
[?Class=PlantItem?]
AZEvent CreateObject()
Prefix = Self.NamePrecedent
Self.ItemNumber = IncrementName(Prefix)
end AZEvent
This event is called whenever a new PlantItem object is created. There are
several changes from the previous Method. First, the Event calls a Function,
IncrementName, which is called and declared in the normal way except that
the IncrementName function definition itself is enclosed in a Private Code
section. Private Code gives you a convenient place to insert helper functions
that you only need to use within the module. They are not visible to any
routines in other modules. Only one Private Code section is allowed in a
module but it can have as many subroutines, functions, and variables as you
want.
The IncrementName function takes the name prefix as an argument, looks up
a global counter which it increments and stores, and finally returns the
concatenation of the name prefix and this number. This global counter is
stored in the ProcessEquipmentCounter attribute on the Globals object in the
Aspen Basic Engineering Data Model. This is accessed the first time in the
function with lines like:
Num = ObjectStore.Globals.ProcessEquipmentCounter
ObjectStore is one of three Global Variables the system provides to the script
writer and it represents an AZObjectStore object. Aspen Basic Engineering

34

2 Knowledge Bases and the Rules Editor

provides a comprehensive query language that provides full access to the


data in the workspace and the definitions found in the data model. This is
accessed in the VB Script through the AZDBQuery 2006 Type library.
When using an AZEvent of type ModifyAttribute, the code must explicitly
specify the case when changing attribute value. If not, the governing case is
used by Basic Engineering. The case which triggered the event can be
retrieved using:
set attrib= eventdata.Attribute
CaseID = attrib.CaseID
When attribute value is changed in the AZEvent, the caseid can be used using
something similar to:
self.Attribute("NormalVaporVolumetricFlowRate",CaseID)=
attrib.Value *22.414*3.6

AZQObjectStore Methods
AZObjectStore is one of the objects found in the AZDBQuery library. You can
see the contents of this type library using a Class Viewer on AZDBQuery.dll
and by referring to the online help for the Rules Editor, AZDBQuery Library
Object Reference in the Knowledge Base Language topics. Some of the most
useful methods of AZObjectStore are shown in the following table:
Method

Return Type

CaseID(CaseName)

String

Returns the CaseID of this case

CaseName(CaseID)

Long

Returns the name of the case

CreateObject("<classname
>)

AZQObject

Creates of an object of the specified


class

FindObject(OID)

AZQObject

Returns the object with the


specified object ID (OID)

GlobalCases

Variant

Returns an array of the CaseIDs for


all cases in the workspace

Globals

AZObject

Returns the Aspen Basic


Engineering globals object

GoverningCase

Long

Returns the CaseID of the


governing case

ObjectClass(OID)
Property

Description

Returns the class for the given


object ID
Type

Description

In the previous example, the Globals property shown in the table is used to
get an AZObject that represents the Globals object. It is very easy at this
stage to be confused by the terms class and object, as these terms are used
by both the Aspen Basic Engineering data model and scripting.
Aspen Basic Engineering classes are defined in the Aspen Basic Engineering
data model, such as Pump and Globals. Aspen Basic Engineering objects are
instances of the class, such as Pump P-100 and the Globals object.
Scripting uses COM classes (in particular for writing a KB, it uses the classes
defined in the AZQuery library). Examples are AZObject and AZObjectStore.

2 Knowledge Bases and the Rules Editor

35

Classes are instances of these objects, e.g., the Self parameter and the
ObjectStore global.variable
As with the Method example, the data model attribute is used for retrieving
the value. If you examine AZObject using a class viewer, you will not find
ProcessEquipmentCounter because this attribute belongs to the data model
and not to the AZObject class. An examination of some of the most useful
AZObject properties and methods helps to explain what is happening.

Some AZQObject Methods


The AZQObject class provides methods that allow you to access and
manipulate an Aspen Basic Engineering object. Each AZQObject object
corresponds to an object in the Aspen Basic Engineering workspace. Some of
the most useful methods are shown below:
Method and Properties

Return Type

Description

Attribute(<Name>,
Case [optional])

AZQAttribute

Property. Returns the


specified attribute of this
object

Attributes(Case
[Optional])

AZQAttributeCollection

Property. Returns all


attributes for this object

Class ()

AZQClass

Property. Returns the class


for this object

Copy()

AZQObject

Method. Returns a copy of


this object

The reference to ProcessEquipmentCounter is taking advantage of Aspen


Basic Engineering's implementation of Dynamic Properties. Typing
Globals.ProcessEquipmentCounter is interpreted as Globals.Attribute
(ProcessEquipmentCounter), which provides access to a scripting object (an
AZQAttributes object) representing the ProcessEquipmentCounter attribute.

AZQAttribute Properties
The AZQAttribute object has methods and properties that provide access to
the attributes of an Aspen Basic Engineering object.
These include those shown below:
Properties

Type

Description

Value
{Default]

Variant

The value of the attribute

DataTypeName

String

The type of the attribute (as a string)

HasValue

Bool

True if the attribute value is set

Count

Integer

The number of items in a vector attribute

DataType

EAZQDataTypes

The type of the attribute (as an enumerated


integer)

Value is the default value, so ObjectStore.Globals.ProcessEquipmentCounter


is a short hand for the following three lines:

36

2 Knowledge Bases and the Rules Editor

set objGlobal = ObjectStore.Globals


set objAttribute = objGlobal.Attribute(ProcessEquipmentCounter)
Num = objAttribute.Value
The line:
if (ObjectStore.Globals.ProcessEquipmentCounter.HasValue) then
uses the HasValue property to determine if the ProcessEquipmentCount
attribute has a value in it or not.
The DataType property will return one of the following:
azqDataTypeString
azqDataTypeReal
azqDataTypeObject
azqDataTypeEnum
azqDataTypeInteger
azqDataTypeDate
azqDataTypeBoolean
azqDataTypeBinary

=
=
=
=
=
=
=
=

1
2
3
4
5
6
7
8

You can use either the integer or the constant name


e.g. if objAttribute.DataType = azqDataTypeObject then
to test if the attribute is an object.

Object = AZQGlobals class


As well as ObjectStore, there are two other Global objects available in the
script, Server and ClassStore. Server is an AZQGlobals object. This object
provides the methods and properties required to navigate to many of the
useful data and methods in the Aspen Basic Engineering query language.
Method

Return
Type

Description

Trace(<level>,<Text>
NewKBDialog(<Title>,
<Return>)

Outputs the text to the KB


Editor trace window
AZQKBDialog

Creates a Dialog for use in a


Rule

QueueKBDialog(<AZQKBDialog>)

Queues a KB dialog

Object = AZQObjectStore class


The ClassStore object of type AZQObjectStore class gives you access to the
datamodel definitions, that is class definitions, attribute definitions, class view
definitions, etc.
Method

Return Type

Description

FindClass("<classname>)

AZQClass

This retrieves an object


representing the named class
from the class store

FindClassView
("<classviewname>)

AZQClassView

This retrieves an object


representing the named
classview

2 Knowledge Bases and the Rules Editor

37

Object = AZQClass class


The AZQClass class provides access to the Aspen Basic Engineering data
model class definitions and provides access to existing Aspen Basic
Engineering objects of that Aspen Basic Engineering class. Typically you will
get a AZQClass object returned to you from the AZQClassStore.FindClass
method. Some of the most useful methods and properties of AZQClass are:
Method

Return Type

Description

Name

String

The name of the class. A read


only property

Members

AZQObjectCollection

Property. A collection of
AZQObject objects that
represents all the Aspen Basic
Engineering objects of this class
in the workspace

Attribute("<Name>")

AZQAttributeDefn

Property. Returns the definition


for the named attribute

Attributes

AZQAttributeDefnColl

Property. Returns a collection of


all attributes for this class

A More Complex Example


The use of some of the methods listed above can be illustrated with a more
complex example. When run, the following rule yields a report on a
Centrifugal Pump selected by the User. The User can specify the class view for
the report or chose to report on the pump using the core data model. This
rule displays a dialog to the user with a list of all pumps and all class views
that represent pumps.
[?DisplayName = PumpReport,
Interactive=true, Secure=true?]
AZRule PumpReport()
' Create the dialog
set dlg = Server.NewKBDialog( "Select Pump and Class View",
"PumpReportReply")
dlg.Cancel = true
Set PumpsCombo = dlg.AddCombobox("Pumps", "Pick a Pump","Pick a
value")
' List all pumps by asking the class for all its members
set PumpClass = ClassStore.FindClass(CentrifugalPump)
set PumpsCollection = PumpClass.Members
for each PumpObject in PumpsCollection
PumpsCombo .AddOption PumpObject.ItemNumber , PumpObject
.OID
next
Set ClassViewsCombo = dlg.AddCombobox("Class View", "Pick a
class view","Pick a class view")
for each ClassView in ClassViewCollection
PumpsCombo .AddOption PumpObject.ItemNumber , PumpObject
.OID
next
set PumpReport = dlg
End AZRule

38

2 Knowledge Bases and the Rules Editor

Rules run on the server and therefore it is not possible to display standard
message boxes or user interfaces. Instead, Aspen Basic Engineering has a
KBDialog object that represents a dialog that the Aspen Basic Engineering
server will post to the client for the client to display. The above rule uses the
Server global AZGlobals object to call the NewKBDialog method to create the
dialog box. The dialog box has several properties and methods that can be
called to add visual elements to it (see KBDialog below). In this case, two
Combo boxes are added by calling the AZKBDialog's AddComboBox method.
The AddComboBox method, as many of the AZQuery methods do, returns
another object, in this case a AZComboBox object. The AZComboBox object
can be used to add to list entries to the Combo box.
The list of pumps is retrieved by calling the FindClass method on the third of
the three system supplied global objects, the ClassStore. This returns another
AZDBQuery object that represents the Pump class, in this case an AZClass
object. Calling the classes Members method returns an AZObjectCollection
object. The AZObjectCollection object is a collection of all the objects of the
CentrifugalPump class in the database. The class is enumerated for each loop,
so that for every pump an item is added to the combo box using the
AddComboBox's AddOption method. The AddOption method takes two
arguments; the first is the name displayed in the combo box, in this case the
name of the pump. The second argument is used later and in this case, the
Pumps unique identifier, the OID, has been used.
The second combo box is populated in a similar way, with the list of class
views that are available for a pump being determined and the collection of
class views enumerated for each loop.
The final line assigns the dialog object as the return value of the rule and this
will cause the dialog box to be displayed when the rule completes. After the
user clicks OK on the dialog box another routine needs to be run to continue
the rule. The rule to run was specified when the dialog box was created. The
second argument of the line:
set dlg = Server.NewKBDialog( "Select Pump and Class View",
"PumpReportReply")
specified the name of a rule to call when the dialog box is closed, namely in
this case PumpReportReply.

Dynamic Properties
Aspen Basic Engineering supports a shorthand method of writing the
AZObject.Attribute(AttributeName)
as:
Object.<AttributeName>
Therefore these two lines accomplish the same thing:
Self.Attribute(ItemNumber) = P100
Self.ItemNumber = P100

2 Knowledge Bases and the Rules Editor

39

Note: Both examples are using the default Value property of the
AZQAttributes object. If the Attribute holds objects then the dynamic
properties can be chained together. Vectors can also be referenced. Both
features are illustrated below.
Self. Attribute(NormalFlow) (1). Attribute(BulkFllow)
(1).MoleFlowRate = 230.0
Self. NormalFlow(1).BulkFllow(1). MoleFlowRate = 230.0
Note that an error is raised in the second case if any of the intermediary
objects do not exist.
If the intermediary objects need to be created and the value assigned, then
the AssertRoute method should be used:
Self.AssertRoute(NormalFlow(1).BulkFllow(1). MoleFlowRate) =
234.0
Note also that writing the previous example as:
Dim Obj
Set Obj = Self.NormalFlow(1).BulkFllow(1)
Obj. MoleFlowRate = 2340.0
also raises an error because the introduction of a local variable prevents the
scrip from determining the correct AZQuery class.

Configuration File
After rules have been developed, they are normally loaded at the same time
as the workspace. To do this, the workspace configuration file must specify
the location of the rules and the names of the rule module.
The configuration file should have these parameters:
KBScriptDirectory = <KBDirectory>
KBScripts = <Modules>
where:
<KBDirectory> is the folder containing the KB modules, relative to the
WorkspaceLibraries folder.
<Modules> is a comma separated list of the module file names. If the files
have the default extension of azkbx it can be omitted from this list.
e.g.:
KBScriptDirectory = "KBS"
KBScripts = "Filters,component-sum"

40

2 Knowledge Bases and the Rules Editor

Rules Editor Menus


The Rules Editor has the following menus:

File menu

Edit menu

View menu

Options menu

Tools menu

Run menu

Help menu (not described)

File Menu
The File menu contains the following commands:
File Menu Command

Action

New

Creates a new script file

Open

Opens an existing script file

Save

Saves the active script file

Save As

Saves the active script file as a new user-selected name

Open/Close Workspace

Allows you to select a Workspace


Once a Workspace is open, the Open Workspace option
toggles to Close Workspace

Print

Prints the active script file

Print Setup

Open the Windows Print Setup dialog

Recent Files

Displays a list of files recently opened in the Rules Editor

Exit

Quits the Rules Editor application

Note: An Aspen Basic Engineering workspace is not necessary for editing and
compiling KB Script code, but must be opened before the current module can
be installed and before any procedures are run.

2 Knowledge Bases and the Rules Editor

41

Edit Menu
The Edit menu contains the following commands:
Edit Menu Command

Action

Undo

Undoes the last action

Redo

Redoes the previously undone action

Cut

Copies the selection to the clipboard

Copy

Copies the selection to the clipboard

Paste

Places the last item(s) copied to the clipboard at the


cursor position

Select All

Selects the entire document

Find

Find a string in the current script file

Replace

Replace a string in the current script file

Find Next

Finds a the next occurrence in the current script file

Find Previous

Finds the previous Finds a the next occurrence in the


current script file

View Menu
The View menu contains the following commands used to show/hide the
associated item:
View Menu Command

Action

Toolbar

Shows/hides the toolbar (toggle)

Status bar

Shows/hides the status bar (toggle)

Query Editor

Displays the Query Editor dialog (refer to Query Editor for


further details of the Query Editor function)

Options Menu
The Options menu contains the following commands:

42

Options Menu
Command

Action

Clear Build Errors


on Compile

If selected, the Build window is cleared each time code is


compiled

Clear Trace/Run
Errors on
Run/Install

If ticked the Trace and Run Errors windows are cleared each
time a Method, Rule, Sort or Filter is run, and each time a
module is installed

Show Line
Numbers

Toggles the display of line numbers in the main edit window


(NB if displayed, line numbers are also printed)

Print Header &


Footer

If enabled then a suitable header and footer are


prepended/appended to each page in a print out

2 Knowledge Bases and the Rules Editor

Tools Menu
The Tools menu contains the following commands:
Tools Menu
Command

Action

Compile

The current source file is saved and submitted to the


compiler; compile messages appear in the Build window

Install/Replace
Module

The object file corresponding to the current source file is


loaded into the server, displacing any current module of the
same name

Next Error

Compile errors appear in the Build Window, Run Time errors


in the Run Errors window. In either case, these menu
options highlight the source code corresponding to the next
or previous error

Prev Error
Clear Build
Clear Trace

Clears the corresponding window

Clear Run Errors

Run Menu
The Run menu contains the following commands:
Run Menu
Command

Action

Method

Select option to display appropriate dialog boxes for the


selection of the object if required and procedure to run

Rule
Filter
Sort

2 Knowledge Bases and the Rules Editor

All appropriate rules, methods, etc., are listed, not just


those from the module currently being edited

43

Rules Editor Toolbar


The Toolbar displays commonly used menu operations as toolbar icons
(buttons). Toolbar icons also display a tooltip (action) when the cursor is
floated over them.

Item

Name

Description

Open Workspace

Open a Aspen Basic Engineering Workspace

New

Create a new script file

Open

Open an existing script file

Save

Save the current script file

Cut

Cut the selection onto the clipboard

Copy

Copy the selection onto the clipboard

Paste

Insert clipboard contents

Print

Print the active script field

Compile

Compiles the current file

10

Install

Installs or replaces this module in the selected


server

11

Rules Editor Help

Displays Rules Editor Help

AZDBQuery Library Object


Reference
Please also refer to the online Rules help for further details.

AZQKBDialog

44

Property

Type

Meaning

Cancel

Boolean

Show Cancel button or not

Title

String

Title of dialog

Width

Integer

Maximum display width (pixels)

HelpString

String

Text displayed when user presses F1 (use vbCrLf to get


multiple lines)

UserData

Dictionary

Data which persists throughout the life of the Dialog Box

ReturnTo

String

Name of reply Method (or Rule)

2 Knowledge Bases and the Rules Editor

The following dialog methods are available:


Method

Description

Parameters

Purpose

AddTextBox

Adds a text box to


the dialog

Text:String

Text to display

AddEditBox

Adds an Edit box


with the specified
prompt

ID:String

ID to refer to value

Prompt:String

Prompt shown to left of


box

Balloon:String

Balloon help displays


whilst hovering

Width:short

Width is maximum
width

ID:String

ID to refer to value

Prompt:String

Prompt shown to left of


box

Balloon:String

Balloon help displays


whilst hovering

Value:String

(Not used)

URL:String

The URL to link to

Prompt:String

Prompt, text to left of


DisplayAs string,
displayed text

Balloon:String

Balloon as above

DisplayAs:String

DisplayAs, string to
show

AddCheckBox

AddLink

Adds a check (tick)


box to the dialog

Adds a hyperlink
with the specified
URL to the dialog

AddRadioGroup

Adds a radio group.


AZKBDlgRadioGroup
object is returned

Name:String

Create a RadioGroup

AddComboBox

Adds a combo box.


AZKBDlgComboBox.
Object is returned

ID:String,
Prompt:String,
Balloon:String

Create a ComboBox

Text: String
(must be a
complete VB
Script function)

If the function is called


Validate() or Cancel(),
it is called when OK or
Cancel is clicked on
the dialog box.
Validate/Cancel should
return TRUE or FALSE.
Returning TRUE
completes the dialog,
CANCEL returns the
user to the dialog

AddScript

2 Knowledge Bases and the Rules Editor

45

AZKBDlgRadioGroup Methods
The AZKBDlgRadioGroup object is returned by the AddRadioGroup method of
the dialog box. It is used to define the contents of the group, i.e., the
buttons.
Method

Description

Parameters

Purpose

AddButton

Adds a button to the


group. A group can have
several buttons

ID: String

ID to refer to value

Prompt:String

Prompt is caption

BallonTip:String

BalloonTip as above

Value:String

(Not used: True or


False are returned)

AZKBDlgComboBox Methods
The AZKBDlgComboBox object is returned by the AddComboBox method of
the dialog box. It is used to populate the contents of the combo box:
Method

Description

Parameters

Purpose

AddOption

Inserts the
specified string
into the combo
box

Display:String

Display appears
in combo box

Value:String

Value is the
string returned if
this item is
selected

Example: Combo Box


[?DisplayName = SelectOrientation,
Interactive=true, Secure=true?]
AZRule SelOrientation()
' Create the dialog
set dlg = Server.NewKBDialog( "Select Orientation",
"OrientationReply")
' Add some Text, F1 help and a cancel button
dlg.AddTextBox "Select the orientation"
dlg.Cancel = true
'dlg.HelpString = "Choose an orientation" & vbCrLf & "from the
drop down"
Set combo = dlg.AddCombobox("Orientation", "Pick a value","Pick
a value")
combo.AddOption "0" , "1"
combo.AddOption "90" , "2"
combo.AddOption "180" , "3"
combo.AddOption "270" , "4"
' Add a combo box with four entries
set SelOrientation = dlg
End AZRule

46

2 Knowledge Bases and the Rules Editor

3 Datasheets and the


Datasheet Definer

Datasheets used by the Datasheet Editor must first be defined in the


Datasheet Definer. A datasheet definition comprises two parts:

Dumb lines and text that represent the backing sheet

Live fields that display data directly from the database

This chapter contains information on:

Datasheets

Datasheet Definer

How the Datasheet Definer creates a datasheet

Starting the Datasheet Definer

Datasheet Definer Menus and Buttons

Datasheet Definer Browser

Datasheet Editor Template Migration Tool

Datasheets
There are three main types of datasheet that can be generated using the
Datasheet Definer:
Type of
Datasheet

Description

Summary
Sheets

Also commonly known as equipment lists, these show information


from numerous objects. They summarize the members of a class,
usually displaying a limited number of attribute values for each. The
total number of members of a class cannot be predicted in advance.
You need only define one summary sheet for the class. Aspen Basic
Engineering generates sufficient copies of the summary sheet to
display all the existing class members.

Continuous
Lists

(Excel Datasheet Editor only) Like summary sheets, continuous lists


show information from numerous objects, but instead of displaying
information on multiple pages, all objects are displayed on a single,
scrollable, continuous list.

3 Datasheets and the Datasheet Definer

47

Type of
Datasheet

Description

Datasheets

These typically display information about a single object and perhaps


its sub-objects.
Occasionally, a datasheet represents data relating to more than one
object, for example, the compressor and inter-cooler datasheet. In
this guide, the term datasheet is used loosely to refer to many types
of datasheet, including traditional datasheets, calculation sheets,
design basis sheets, and so on.

You define datasheets to represent any of the following:

A set of objects, for example, a summary sheet of all the vessels in a


plant

An individual object, for example, a datasheet for one vessel V101

Global project data, for example, site conditions and utility stream
characteristics

Datasheet Definer
The Datasheet Definer is a Microsoft Excel AddIn displayed as the
Datasheets menu selection in the Microsoft Excel menu bar.
Note: You must pre-install Microsoft Excel to use the Datasheet Definer.

A floating toolbar can also be used as a shortcut for a number of menu


options. To view the toolbar, select Datasheets | View Toolbar from the
Excel menu bar.

48

3 Datasheets and the Datasheet Definer

Use Excel to:

Define the graphical components of the datasheet, that is, the fixed text
and lines

Define the size and formatting of cells that will become fields

Specify the number and order of pages in the datasheet by default

Use the Datasheet Definer to:

Specify that a cell is a field, by defining the link between fields on the
datasheet and attributes in the database

Copy and paste fields

Generate a datasheet

How Does the Datasheet


Definer Create a Datasheet?
The Datasheet Definer uses the contents of the current Excel worksheet to
create a datasheet for use in Aspen Basic Engineering.
In overview, the Datasheet Definer:
1

Examines the Excel worksheets, searching for:


o

Text, lines, cell formats, and simple shapes

Cell comments that contain XML fragments, which specify the field
type and link the field to the correct part of the Aspen Basic
Engineering class store

Stores the information from the XML fragment in cell comment in a single
Aspen Basic Engineering template file (.ztf).

Creates a run-time version of the Excel Datasheet (.ztx) which is


formatted for improved performance and used by the Excel Datasheet
Editor.

Starting the Datasheet Definer


To start the Datasheet Definer:
1

From the Windows taskbar click Start | Programs | AspenTech |


Aspen Basic Engineering xx.x | Configuration | Datasheet Definer.
This launches Microsoft Excel.
A menu option Datasheets is displayed in the Excel main menu.

To select the workspace that you wish to work on, click Datasheets |
Open Workspace, the standard workspace dialog is displayed.

Select and then open a workspace.

Note: You must be logged into a workspace to define or change field routes.

3 Datasheets and the Datasheet Definer

49

Datasheet Definer Menus


The Aspen Basic Engineering Datasheet Definer has the following menu
items:

Open Workspace - Displays the Open Workspace dialog allowing you


to select a workspace, connect as a different user, or change connection
settings.

Close Workspace - Closes the currently open workspace.

Preview Mode - Disables the Definer add-in menus so that the datasheet
can be previewed only.

View ToolBar - Displays the Datasheet Definer toolbar, which can be


docked (with the Excel menu items) or floating.

Generate Template - Generates an Aspen Basic Engineering Datasheet


template. You must be logged onto a workspace and the Excel worksheet
must contain Aspen Basic Engineering fields before this command is
active.

Datasheet Options - Select this option to change the View and Print
options of the datasheet fields, watermarks, and colors.

Edit - contains the following options:

50

Read Only Sets a field to read only status.

Copy Field Copies a selected field (or fields) onto the clipboard.

Cut Field - Copies the selected field(s) onto the clipboard and deletes
it from the current worksheet.

Paste Field Pastes the selected field (or fields) onto the worksheet.

Radio Groups Opens the Radio Button Groups dialog, allowing


you to configure (edit, delete, or add) radio button groups.

Qualifier Groups Opens the Qualifier Groups dialog, allowing you


to configure (edit, delete, or add) qualifier groups.

Set Repeat Area - In a continuous list datasheet, allows you to define


the direction of expansion for repeating areas as horizontal or vertical.

Replace Replaces field route content(s).

Case - Sets the case using the Case dialog.

Overspills Checks whether overspills have been defined for the


current page. The Edit Overspill dialog allows you to edit and delete
overspills.

Properties - contains the following options:


o

Datasheet Properties Displays the Datasheet Properties dialog.

Field Properties Displays the Field Properties dialog associated


with the selected field.

Tools - contains the following options:


o

Set Wildcard Sets time-saving wildcards when specifying a large


number of database routes. Applies to Value fields.

Set Object Sets the starting object for each set of fields. Applies to
Value fields.

3 Datasheets and the Datasheet Definer

Set Overspill - Defines an overspill association for a (pre-selected)


set of Value fields.

Attribute Browser Opens the Attribute Browser dialog.

Validate Fields Validates fields on the worksheet.

Refresh all pages Refreshes the datasheet to update any changed


fields.

Generate Templates from Automation Generates templates for


all datasheets within a folder in a batch operation which is significantly
faster than compiling each datasheet separately.

Link contains the following options:

Link Create a link between a Value field and one or more Revision or
Dimension fields.

Unlink Breaks the link between a Value field and one or more
Revision or Dimension fields.

Help - contains the following options:


o

Datasheet Definer Help Opens help specific to the Datasheet


Definer.

Training Opens the AspenTech Training Center Web page.

Product Support on the Web Opens the Aspentech Product


Support Web page.

Contact Support Opens the Technical Support Group topic in the


Aspen Basic Engineering Online Help.

About Aspen Basic Engineering Displays version information for


this release.

Datasheet Definer Toolbar


The Datasheet Definer toolbar contains icons which represent the controls for
defining field types on the datasheet. Each type of field defines a different
aspect of how the datasheet operates.

The following table describes their function:


Number

Icon

Description

Value

Creates a field which displays a text value from a


database attribute

Quantity Type

Creates a field that displays the units for value fields

Revision

Creates a fields that displays revision information and


must be linked to one or more value fields

Sketch

Enables the user to add sketches to the datasheet


using OLE embedding

Bitmap

Enables the user to display fixed bitmaps that are not


changeable by the datasheet user

3 Datasheets and the Datasheet Definer

51

Checkbox

Opens the Checkbox Properties dialog allowing you to


specify and design a checkbox

Radio Button

Opens the Radio Button Properties dialog allowing you


to specify and design a radio button

Qualifier

Opens the Qualifier Field Properties dialog, allowing


you to specify a group name, add/edit a group, and
specify a qualifier label

Copy Field

Copies a selected field (or fields) onto the clipboard


Note: Copy/Paste of fields MUST be done using the
toolbar menu options. The use of Ctrl-C and Ctrl-V is
NOT supported for AZ fields

10

Cut Field

Copies the selected field(s) onto the clipboard and


deletes it from the current worksheet

11

Paste Field

Pastes the previously copied field (or fields) onto the


worksheet
Note: Copy/Paste of Fields MUST be done using the
toolbar menu options. The use of Ctrl-C and Ctrl-V is
NOT supported for AZ fields

12

Field
Properties

Opens the Properties dialog associated with the


selected field; e.g., if a Radio Button field is selected,
the Radio Button Properties dialog is displayed

13

Refresh

Refreshes the datasheet to update any changed fields

14

Delete

Deletes the selected field (this button must be used to


delete fields)

15

Browser

Opens the Browser window

16

Link

Links the currently selected field(s)

Datasheet Definer Browser


The Datasheet Definer contains a class view attribute browser that lets you
examine the attributes of the selected class views and associate the attribute
with fields.
To start the Browser:

From the Excel menu, click Datasheets | Tools | Attribute Browser.

A separate Browser window is displayed:

52

3 Datasheets and the Datasheet Definer

This window has one pane with five columns (which display descriptive
content) and two menu options.

Browser Menu Items


Class View Menu
Item

Description

Individually named Class


Views

Class views selected in the Document


Properties dialog

Exit

Quits the Browser application

Options Menu
Item

Description

Always on Top

Sets the Browser window to display in


front of open applications.

3 Datasheets and the Datasheet Definer

53

Datasheet Editor Template


Migration Tool
Starting with 7.2 EP1, the Aspen Basic Engineering Excel Datasheet Editor
uses a runtime template to improve performance. This template has a ZTX
file type and is installed with the ZTF templates on the server in the
Templates folder. The Datasheet Definer automatically generates this
template during the Template Generation Process.
The Datasheet Editor Template Migration Tool creates ZTX templates for
custom datasheets and migrates templates that have been cached. Cached
templates are used to open these datasheets so the datasheet appears as it
did when it first entered the submit, check, and issue process.
Note: If you do not have custom datasheets and have not used V7.1 CP2
document revision control, you do not need to use the Datasheet Editor
Template Migration Tool.
Migration steps depends upon your situation:

If you have custom datasheets, use the Template Migration Tool to create
ZTX files for custom datasheets and put them in the templates folder.

If you used V7.1 CP2 document revision control, use the Template
Migration Tool to convert the XLS files cached on your workspaces to ZTX
files.

If you had custom datasheets and used V7.1 CP2 document revision
control, you need to follow these steps in this order:
o

Use the Template Migration Tool to create the ZTX templates for each
custom datasheet.

Migrate the server cached templates for the workspaces containing


submitted Excel datasheets.

Copy the custom ZTX templates to the server Workspace


Libraries\Templates folder.

Getting Started
Before starting any conversions, you will need to set Excel to Trust access to
Visual Basic Project.
In Microsoft Excel 2003:

54

From Tools menu, click Macro | Security

On Trusted Publishers tab, select Trust access to Visual Basic Project.

Click OK.

Close Excel.

3 Datasheets and the Datasheet Definer

In Microsoft Excel 2007 or 2010:


1

Click the Office button. Select Excel Options.

Select Trust Center from the list of topics on the left.

Click Trust Center Settings

Select Macro Settings from the list of topics on the left.

Select Trust access to the VBA project object model.

Click OK.

Close Excel.

To open the Datasheet Editor Template Migration Tool, double-click the


DatasheetEditorTemplateMigration executable in C:\Program
Files\AspenTech\Basic Engineering xx.x\UserServices\bin. The Datasheet
Editor Template Migration Tool dialog box appears.

Creating a ZTX Template for each Custom


Datasheet Template
You have two options for creating ZTX Templates for custom datasheet
templates:

Batch Migration creates a ZTX template for each custom datasheet


template in batch mode.

Single Template Option creates a single ZTX template from a single XLS
and XTF file combination and is useful when resolving errors encountered
during batch operations.

Batch Migration
To create a ZTX template for each custom datasheet template in batch
mode:
1

In the Datasheet Editor Template Migration Tool dialog box, select the
Batch Migration tab.

Select the Create ZTX templates from XLS and ZTF templates option.

Use the Browse buttons to identify the folders where the XLS and ZTF
templates are located.

Use the Browse button to identify a folder for placing the log file for
recording any errors and warnings.

Click Start.

After the Datasheet Editor Template Migration Tool creates the ZTX
templates, click Open log file. The log has an entry for each template
that has been generated along with any errors or warnings. If any
template has errors or warnings, resolve the issues and regenerate the
ZTX template for that datasheet using the Single Template Options.

3 Datasheets and the Datasheet Definer

55

Single Template Options


To generate the ZTX template for a single template:
1

In the Datasheet Editor Template Migration Tool dialog box, select the
Single Template Options tab.

Select the Create ZTX template from selected template option.

Use the Browse buttons to identify both the XLS and ZTF file locations for
a single template.

Click Start. The Datasheet Editor Template Migration Tool creates the ZTX
template.

Migrating Server-Cached Templates


After a ZTX template has been created without error for each custom
template, the cached templates can be migrated for each workspace.
Note: This migration is required for all workspaces containing datasheets
submitted using release V7.1 CP2. However, the migration is not required for
the following:

All workspaces created before V7.1 CP2


V7.1 CP2 workspaces where document revision control was not used
(documents not submitted).

You have two options for migrating the server-cached templates:

Batch Migration migrates the templates in batch mode.

Single Template Option migrates a single template and is useful when


resolving errors encountered during batch operations.

Batch Migration
To migrate the templates in batch mode:
1

Perform a database backup and an AZBackup for each workspace.

In the Database Template Migration Tool dialog box, select the Batch
Migration tab.

Select the Convert cached server templates to ZTX format option to


migrate the cached templates.

Use the Browse button to locate a work folder in which to place the
cached XLS and ZTF templates.

Click Start.

The standard Open Aspen Basic Engineering Workspace dialog box


appears; choose the appropriate workspace to open.

The XLS and ZTF files for each cached template are placed in the Cached
template folder as read-only files along with a log of the migration process.
Archive the contents of this folder for future reference.

56

3 Datasheets and the Datasheet Definer

If a problem occurs with a particular template, resolve the problem and


replace the template using the Single Template Options.

Single Template Options


To migrate a single template:
1

In the Database Template Migration Tool dialog box, select the Single
Template Options tab.

Select the Replace cached server template with ZTX file option to
migrate the cached templates.

Use the Browse button to locate a ZTX file to be used to replace the
cached version on the workspace.

Click Start.

The standard Open Aspen Basic Engineering Workspace dialog box


appears; choose the appropriate workspace to open.

3 Datasheets and the Datasheet Definer

57

58

3 Datasheets and the Datasheet Definer

4 Preparing Datasheets in
Microsoft Excel

The Datasheet Definer automatically picks up the graphical structure of


datasheets, but you also need to tell it what Aspen Basic Engineering data
you wish to display.
To do this, you use buttons on the Datasheet Definer to specify that cells on
the worksheet are fields. It is possible to specify a cell to represent any of the
field types available in Aspen Basic Engineering.
This chapter contains information on the following items:

Value fields.

Quantity type fields.

Revision fields.

Sketch fields.

Bitmap fields.

Checkbox fields.

Radio button fields.

Qualifier fields.

Viewing and checking fields.

Using the browser.

Fields
You set up cells for active fields in the Excel worksheet. The Datasheet
Definer picks these up when it creates the datasheet template, and stores the
information in a .ztf (Aspen Basic Engineering template file) file for use by
Aspen Basic Engineering. Later, when you open the datasheet in Aspen Basic
Engineering, the active fields link to the correct part of the class store.
Use the Datasheet Definer menu options to set up these cells. The toolbar
contains buttons, which represent the types of field that can be defined on the
datasheet.

4 Preparing Datasheets in Microsoft Excel

59

Each type of field defines a different aspect of how the datasheet operates
when it is incorporated into Aspen Basic Engineering.
Important! Merging Cells
Do not merge cells after a field has been placed in a cell.
Instead:
Delete the field using the Delete toolbar button.
Merge the cells left and or up.
Add a new field to the empty cell.

Value Fields
Value fields are used to display database values on a datasheet.
A value field gives the database location, in terms of a class view attribute,
from where values are retrieved. This specifies the location of the data in the
database.
A typical datasheet displays data for four different objects:
This Data

For Example

Is Accessed From

Global data

Project name, customer


name

GlobalsClass object

Document specific
data

Document number, revision


history

Document object

Page specific data

Page number

Page object

Object data

Pressures, temperatures

Equipment object and related


sub-objects (e.g., vessel,
agitator and nozzles)

Inserting Value Fields


To insert a value field:

Select a cell on the worksheet then click the Value Field button.

Value Field Routes


A route is the most important property for a value field. You set routes using
the browser.

60

4 Preparing Datasheets in Microsoft Excel

Value Field Options


You can attach options to a value field to give the user a list of possible
values for the field. Field options can be either:

A list of predefined values.


-or-

The name of a knowledge base method that is used at runtime to


determine the list of applicable values.

Note: If the field attribute type is an enumeration, Options cannot be set.


To add or modify field options:
1

Select the Value field(s).

Select the Properties toolbar button to display the Value field


Properties dialog and select the Options tab.

Select one of the option modes: Forced, Free or Method:


o

Forced restricts the field to accept only those values listed in the
Options property.

Free lets the user ignore the list of options and type in any value.

Method specifies the name of a method for generating the list.

Forced Option Mode


To specify Forced as the option mode:
1

Select the Forced radio button.

Type in the text you wish to appear in the options list.

Click the Add button.


Your text is added to the Options list.

To remove an item from the list:

Select the item and click the Remove button.

Free Option Mode


To specify Free as the option mode:
1

Select the Free radio button.

Proceed as for Forced, earlier.

Method
This topic explains how to specify Method as the option mode, then gives
background information on methods.
1

Select the Method radio button.

In the Method Name box, enter the name of the method.

4 Preparing Datasheets in Microsoft Excel

61

Multi-line Fields
Multi-line fields enable you to place text that is longer than the field itself,
over multiple lines on the datasheet.
To create a multi-line field:
1

Create a value field as described in Inserting Value Fields.

Select the Properties button to open the Properties dialog and specify the
number of lines in the lines field.
Note: Lines of a multi-line value control are equally spaced, so
the taller you make the control, the wider the spacing between
the lines.

Field Cases
By default, datasheets display information from a single database case, but
certain types of datasheet need to be defined that can display information
from two or more cases on the same document.
When you define a datasheet, you do not know in advance the names of the
cases in a workspace. The Datasheet Definer enables you to group fields that
display data from the same case. You group them by defining a name. This
name is not necessarily used as a workspace case name and exists only at
the datasheet definition stage.
If the datasheet is to display data from a single case, you need not assign the
fields to a case. Any fields not assigned to a named case group are assumed
to display information from the overall case of the datasheet.
To set the case for a field:
1

Select the Properties for the field.

Type or select a case name to use, in the case window.

Overspill Fields
Overspilling of datasheets allows the automatic spilling of objects onto an
overspill sheet, when there is no room left for additional objects. The
overspilling process can be likened to the association of one datasheet to
another. Overspilling dictates where the current datasheet overspills onto.
For example, consider a vessel datasheet that has 20 nozzles, and no space
left for any more. Any subsequent nozzles require an overspill. The overspill
sheet or association in this case is a separate nozzles sheet, which only
displays nozzle information. By defining an overspill association, the
subsequent sheet is automatically created, containing only those nozzles that
do not fit on the first sheet.

62

4 Preparing Datasheets in Microsoft Excel

Defining Overspill Associations


To define an overspill association:
1

Select the value controls from which you wish to overspill.

From the Datasheet Definer Edit menu, click Overspill.


The objects in the selected controls are added to the overspill and an Edit
Overspill dialog box is displayed:

Overspill Template
The Overspill Template box is at the top of the Edit Overspill dialog box.
It gives the name of the template representing the overspill page. This can be
the same as the current template. You must define the overspill template
against either the same class of object or one of its superclasses.

Routes
Below the Overspill Template box, there is a list of routes that cause
automatic overspilling.
To add an entry in this list:
1

Select the control.

From the Datasheet Definer Tools menu, click Overspill.

Note: In the vessel example described above, you should also define an
overspill association for the nozzles sheet so that, if this second page is filled,
a third identical page is created. That is, the vessel sheet overspills onto a
nozzles sheet, and the nozzles sheet overspills onto another nozzles sheet.
To stop a route overspilling:

In the Edit Overspill dialog box, select the route and click the Delete
button.

Quantity Type Fields


Many value fields have associated unit fields, for example mm for a lengthdependent field. A quantity type field controls the unit of measure in which
one or more value fields are displayed. The quantity type field displays the
current units; values linked to the quantity type field are automatically
converted to the displayed unit, then redisplayed.

Inserting Quantity Type Fields


To insert a quantity type field, select a cell on the worksheet, then click the
Quantity Type Field button.
A quantity type field is inserted, but is not yet linked to any value fields.

4 Preparing Datasheets in Microsoft Excel

63

Linking Quantity Type Fields


A single quantity type field represents the units of either a single value field,
or a set of value fields.
To link a quantity type field to a single value field or a set of value fields:
1

Select the quantity type field together with the value field(s) that you wish
to link to.

From the Datasheet Definer Link menu, click Link. (Alternatively, click
the Link button on the Datasheet Definer toolbar.)

A link is made between the quantity type field and the value field(s). The
quantity type field is redrawn to show the name of the quantity type.

Unlinking Quantity Type Fields


You can remove the link between a value field and the quantity type field.
To unlink a quantity type field:
1

Select the quantity type field or fields.

From the Datasheet Definer Link menu, click Unlink.

Revision Fields
Many datasheets have markers on the edge of the page indicating values that
have changed between successive issues of the datasheet.
Use revision fields to place these markers on the datasheet. Revision fields
are linked to specific value fields; they display the current issue number, if
any of the fields to which they are linked, changed since the previous issue.

Inserting Revision Fields


To insert a revision field:

Select a cell on the worksheet then click the Revision Field button.

A revision field is inserted, but is not yet linked to any other fields.

Linking Revision Fields


A single revision field can link to one or more value fields.
To link a revision field to one or more value fields:
1

Select the revision field together with the value field(s) to which you wish
to link.

From the Datasheet Definer Link menu, click the Link button or toolbar
button.

A link is made between the revision field and the value field(s).

64

4 Preparing Datasheets in Microsoft Excel

Unlinking Revision Fields


You can remove the link between a revision field and the value field.
To unlink a revision field:
1

Select the revision field or fields.

From the Datasheet Definer Link menu, click Unlink.

Sketch Fields
Datasheets often contain a sketch area in which the end-user can add an
illustration of the equipment, or additional detail about the equipment.
A sketch field enables OLE (Object Linking & Embedding) objects to be
inserted and edited at runtime via an OLE application such as Paintbrush,
Microsoft Excel or Microsoft Word.

Inserting Sketch Fields


To insert a sketch field:

Select a cell on the worksheet then click the Sketch Field button.

You can add any number of separate sketch fields to a datasheet, with each
sketch area representing a single OLE field.

Bitmap Fields
Datasheets often have a corporate logo displayed in the header of the
datasheet, and sometimes a project or client logo. If these logos are provided
as bitmaps, you can easily change them in the runtime system without
modifying the datasheet definitions. To change logos on the datasheet, you
need only replace a single bitmap file. Bitmaps are scaled automatically to fit
within the defined bitmap field.

Inserting Bitmap Fields


To insert a bitmap field:

Select a cell on the worksheet then click the Bitmap Field button.

This displays the bitmap selection dialog allowing you to select from a list of
available bitmaps in the current workspace.
The bitmap is automatically scaled to fit, and centered within, the selected
area when the datasheet is used in Aspen Basic Engineering.

4 Preparing Datasheets in Microsoft Excel

65

Checkbox Fields
A Checkbox represents a Boolean attribute (True/False). Checkboxes take the
form of shapes on the sheet and are marked to indicate if the option is
selected, normally with a tick or cross).
To create a Checkbox field:

Select a cell.

Select the Checkbox button from the toolbar. The Checkbox dialog is
displayed (with two tabs; Attribute and Shape).

The Attribute tab is similar to the Value Fields tab and allows the
specification of; rate, case and read-only flags.

The Shape tab allows you to specify:


o

The Checkbox shape.

The indicator used to show it is selected.

Shape properties such as weight, color, indent and aspect ratio.

Set the properties required and click OK.

A Checkbox is inserted in the selected field.


Note: A route must be specified.

Radio Button Fields


A radio button allows you to choose one item from a set of options for the
attribute. Radio buttons take the form of a set of shapes and when one is
selected, it is marked to indicate the choice. All other choices in the group are
unmarked.
To create a radio button:

Select a cell.

Select the Radio Button toolbar icon, a Radio Button dialog is displayed
allowing you to configure the button.

The Shape, Indicator and Shape Properties areas allow you to specify the
button shape, indication type and properties (similar behaviors to the
Checkbox dialog).

The Group and Value area allows you to specify the route and final value
in the database.

To create a set of linked radio buttons:

Create a number of buttons that select different values for the same
group.

To create a new group:

66

Select the New Group button from the dialog.


Note: Other fields are also possible with radio buttons, see Other Fields
for further details.

4 Preparing Datasheets in Microsoft Excel

Radio Groups
Radio groups are used in the definition of radio buttons. A radio group
comprises a name, route and a set of Radio Buttons that provide the visual
display.
The name is a tag used within the datasheet definition to refer to this group.
The route is a link to the associated class view attribute. This attribute is
usually an enumeration type and from the class view will supply the possible
values to use.

Other Fields
Other fields are a special type of value field associated with a set of radio
buttons. They are used where there are a number of common options, but
where the common options do not cover all possibilities.
To create an Other field:
1

Select a cell and insert a Radio Button that is defined against an open
enumeration.

Set the option of this button to be "Other value..." (this appears at the
bottom of the set of options for the enumeration).

Add a Value field to the datasheet and link the button previously defined
with this value field.

Set the route for the Value field to be the same as the route for the radio
button group.

The button and value fields are now linked and in the Datasheet Editor you
are only able to edit the value field when the button is selected.

Qualifier Fields
Qualifier fields are fields on a datasheet that modify the route associated with
one or more other fields. They take one of two appearances:
1

A set of texts, one of which is normal, the rest are struck-out. (For
example, Duty Clean / Duty FouledFailed 10.)

A set of radio buttons, one of which is selected.

If no qualifier has been selected, the associated value fields display no values
and cannot be edited.
To create a Qualifier field:

Select a cell.

Select the Qualifier Field toolbar button.

4 Preparing Datasheets in Microsoft Excel

67

Checking Fields
At any time, you can check the fields on the worksheet. To do this:

From the Datasheet Definer Tools menu, click Validate Fields. Aspen
Basic Engineering checks the validity of the routes and links. Any
problems are listed in a validation dialog box.

Using the Browser


The Datasheet Definer contains an attribute browser that lets you examine
the class view and specify the routes of the fields.
To start the Browser:

From the Datasheet Definer Tools menu, click Browser.


A separate Browser window is displayed. This window is divided in two:
o

A tree view on the left side, which displays the nodes in the class view.

A list view on the right, which displays the attributes in the selected
class view node.

Navigating the Class View Hierarchy


You navigate the class view hierarchy by opening the nodes displayed in the
tree view, on the left:

Different data types are shown using individual icons.

Specifying a Route
To specify the route of a value field from the Browser:
1

Select the value field.

In the Browser list view, double-click the attribute.

Assigning Wildcards
If you are defining a datasheet with a large number of almost identical routes,
for example to show the bore of 10 nozzles on a vessel, use a wildcard in the
route to signify that the numerical position of the object is not specified. This
speeds up the field creation process.
Having inserted one set of fields representing the values required from a
single nozzle, you can copy them many times to produce a table of values.
To convert the wildcard into a numerical value:

68

Select the Value field(s).

From the Datasheet Definer Tools menu, click Set Wildcard.

Specify the position number to use.

4 Preparing Datasheets in Microsoft Excel

Assigning Objects
Assigning objects is common practice when defining summary sheets or
equipment lists. Occasionally, a datasheet representing data for more than
one object may also use this operation. This is similar to using a wildcard as
part of the route. The route to a field always starts with the top level object
behind the field.
For example, the route to the temperature-operating attribute for a vessel
datasheet would be Vessel (1). On a summary sheet, multiple top level
objects appear and you must specify from which of the objects the route
should start.
To speed up summary sheet definition, it is good practice to add all of the
fields for the sub-objects that represent one object, then copy them for the
other objects. After you have added all of the rows of fields, the top level
object for each set of sub-object fields can be assigned.
To set the starting object for each set of fields:
1

Select the controls.

From the Datasheet Definer Tools menu, click Set Object.

4 Preparing Datasheets in Microsoft Excel

69

70

4 Preparing Datasheets in Microsoft Excel

5 Generating Datasheets

Generating a Datasheet
Before generating a datasheet, ensure that you have added any necessary
fields to the Excel worksheet. See the previous chapter for information.
Note: You must pre-install Microsoft Excel to use the Datasheet Generator.
This section describes the steps you need to take to generating a datasheet,
ready to load into Aspen Basic Engineering.
To create a datasheet:

From the Datasheet Definer menu, click Generate Template.

The datasheet template file (.ztf) is generated and saved in the same location
as he .xls workbook. It is not loaded into Aspen Basic Engineering
immediately.
For information on loading datasheets, see the next section.
Note: This process creates the templates, but does not save the original
Excel spreadsheet. You must do this separately, within Excel. If you change
the contents of the Excel worksheet, you must regenerate the datasheet and
load it into the worksheet to make the changes visible in Aspen Basic
Engineering.

Using Excel Features


Use Excels built-in features to format cells and lines on the datasheet:

Cells The text you enter into a cell and its font and position are used by
the datasheet. Any borders you draw around the cell are also used.

Lines Lines drawn on the worksheet are transferred to the datasheet,


but arcs are not.

Shapes Circles, hexagons, rectangles and triangles are recognized, but


other shapes are not.

5 Generating Datasheets

71

72

5 Generating Datasheets

6 Symbols, Labels and the


Graphics Definer

This chapter describes the role of symbols and labels in the Aspen Basic
Engineering Drawing Editor. It also gives an overview of the (Aspen Basic
Engineering) Graphics Definer tool for modifying and creating symbols and
labels.

Symbols and Labels in the


Aspen Basic Engineering
Drawing Editor
The Aspen Basic Engineering Drawing Editor is supplied with a selection of
symbols and labels, used to construct drawings.
Typically, a drawing contains equipment items linked together by a network of
connections. The equipment items and connections are labeled with text, and
may have data displaying in their vicinity:

Symbols are used to represent the equipment items and connections.

Labels are used as placeholders for text and data.

In this picture, two columns (C-100 and C-101) are linked by a connection
(stream number 3):

6 Symbols, Labels and the Graphics Definer

73

About Symbols
Symbols comprise a drawing with a specified datum that controls the
symbol's behavior when it is dragged or placed on the drawing:

Some of the graphical elements of the drawing may be nominated as parts,


which means they act as place-holders for connections when placed on the
drawing.
Each symbol must be associated with the class of object that it represents
(for example, a pump).

74

6 Symbols, Labels and the Graphics Definer

About Labels
Labels comprise one or more fields that display database values, units and
other drawing data.

You can use graphics and annotations (plain text) to enhance labels. As with
symbols, labels have a datum point that controls their behavior when dragged
or placed on the drawing.
The choice of fields are:

Value fields for displaying data.

Units fields for displaying units of measure.

Labels must be associated with the class view for which the label is intended.

Graphics Definer
The (Aspen Basic Engineering) Graphics Definer is a tool specifically designed
for creating symbol and label definitions for use in the Aspen Basic
Engineering Drawing Editor.

6 Symbols, Labels and the Graphics Definer

75

You use the Graphics Definer to draw graphical symbols that represent
equipment, then define their behavior such as connectivity, placement and
interaction with other symbols.
With the Graphics Definer, you can design labels that can be associated with
classes in the drawing, and which display data in fields within the label. The
individual fields display live data from the database.
Here is some guidance for using the Graphics Definer:

Launch the Graphics Definer from the desktop Start menu, in the same
way as the Aspen Basic Engineering Drawing Editor.

You must create separate symbol and label files.

Different toolbar buttons and menu commands are enabled, depending on


whether you are working with symbols or labels.

Completed label files are saved and compiled; completed symbol files are
only saved.

Starting the Graphics Definer


To start the Graphics Definer:

From the Start menu, point to Programs | Aspen Technology | Aspen


Basic Engineering | Configuration then click Graphics Definer.

This launches the Graphics Definer as a separate working window:

76

6 Symbols, Labels and the Graphics Definer

7 Defining Symbols and


Labels: Worked Examples

This chapter provides two worked examples that show you how to create a
new symbol and a new label.

Example of Creating a New


Label
This example takes you through the steps for creating a new label using the
Graphics Definer.
The key stages in the process are:

Create a new label file.

Specify any label characteristics, such as the class of object for which the
label is intended.

Place and specify Value fields.

Place and specify Plain Text fields.

Place and associate Units fields.

Draw any supplementary graphics to enhance the label (for example, a


rectangular border).

Set the datum for the label.

Compile the new label file.

7 Defining Symbols and Labels: Worked Examples

77

Creating a New Label File


To open a new label file:
1

Launch the Graphics Definer from your desktop Start menu:


Start | Programs | AspenTech | Aspen Basic Engineering |
Configuration | Graphics Definer
This launches the Graphics Definer as a separate working window.

If not already connected to a workspace through the Graphics Definer,


connect now by clicking the Open Workspace button.

Click the New Label button.

In the New Label dialog box that appears, specify a name and location
for your new label file, and save it as type *.sym.

A new label sheet appears in the Graphics Definer working window. This is the
canvas where you create the new label.

78

7 Defining Symbols and Labels: Worked Examples

Specifying Label Characteristics


Having opened the new label file, you now specify any label characteristics:

Label information You must specify the class view for which the label is
intended, but the other settings are optional.

Sheet Size Contains default settings, so is optional.

Text properties for the label Contains default settings, so is optional.

Specifying Label Information


To specify label information:
1

From the Graphics Definer Edit menu, click Properties. (Properties is


also available as a right-click menu option.)
The Label Properties dialog box appears, with the Label Information tab
visible.

Most of the settings in the Label Properties tab are optional, but you must
specify a class view suitable for use by the fields that you want to add.

7 Defining Symbols and Labels: Worked Examples

79

In Global, Document or Object Class view, specify the class view for which
the label is intended. Either:
o

Navigate to the class view, by clicking one of the Browse buttons and
using the browser in the Class View dialog box (recommended)

-or-

Type in the class view for which the label is intended.

The other settings have default values. They govern how the label will
behave when the label is placed on a drawing.

Specifying the Sheet Size


This task is optional.
If your label is intended as a border for sheets, you may wish to change the
size of your new label sheet, to serve as a guide for the placement of objects.
The size of a label sheet acts only as a guide, and serves no other purpose.
To specify the sheet size:

Open the Label Properties dialog box and go to the Sheet Size tab.

Changing Text Properties for Labels


This task is optional.
You can change the default text properties for your new label. These changes:

Remain in force for any future labels that you create.

Do not affect existing labels.

To change the default text properties:

80

Click the Default Text Properties button.

7 Defining Symbols and Labels: Worked Examples

The Default Text Properties dialog box appears.

Use the three radio buttons at the foot of the dialog box, to specify text
properties for Value fields, Units fields and Plain Text fields. The settings
can be different for each type of field.

Note: To change the text properties of any previously placed text fields,
double-click the text to access the appropriate 'properties' dialog box.

Creating Multi-Line Value Fields


This task is optional.
You can change the properties of the text boxes that house the Value fields,
so that they appear on two or more lines. This makes long Value fields tidier
on the drawing.
You do this in the Default Text Properties dialog box, using the Border
Dimensions settings at the bottom right hand corner of the (expanded) dialog
box.
Y (height) and X (width) have three settings. You can choose the same or
different settings for Y and X:

Auto The text box sizes in the selected dimension(s) to fit the text in
the field.

Exactly The text box excludes text outside its limits in the selected
dimension(s).

At Least The text box has a fixed, minimum size in the selected
dimension(s), but will expand beyond if required.

7 Defining Symbols and Labels: Worked Examples

81

To define a multi-line Value field:


1

Set the font type and size.

In Border Dimensions, specify the width (X) as Exactly.

Set the height (Y) to either:

Auto for a text box with fixed width, which expands in the vertical to
accommodate text.

-or-

Exactly for a text box with a fixed height and width.

Click OK to preserve the changes for all subsequent text boxes.

Note: Text justification with Y and/or X set to Auto:


1 Height (Y) If you specify the text justification as Text Top, Text Capline
or Shape Top, then the text box is fixed at the top edge and expands
downwards. If you specify text justification as Text Baseline, Text Bottom or
Shape Bottom, the text is fixed at the bottom and expands upwards.
2 Width (X) This is similar to the height, with 'Left' and 'Right' replacing
'Top' and 'Bottom'.
You are now ready to create the content of the label. This involves adding
Value fields, Units fields and Plain Text fields, and setting the datum point.

Placing and Specifying Value Fields


Value fields are the main components of a label. They display data for the
object for which the label is intended. In our example, we are going to place
two Value fields for the object class view PUMP, the first is capacity and the
second is pressure difference.

Placing Value Fields


To place a Value field:

Click the Place Field button.

The Graphics Definer is now in Value field placement mode. Each time you
click on the sheet, a question mark in square brackets appears. To stop this
process, click any other command button (the Select button is a good choice
for this).
Once you have placed a Value field on the sheet, you need to specify its
characteristics. In particular, you need to specify a route for the field so that
it displays the correct data. You do this through the Field Properties dialog
box.

82

7 Defining Symbols and Labels: Worked Examples

Opening the Label Field Properties Dialog Box


To open the Label Field Properties dialog box:

Double-click the Label field.

Tip: For a selected Value field, there are two other ways of opening the Label
Properties dialog box:

Right-click on a blank part of the sheet, and from the menu that appears,
click Properties.
From the Graphics Definer Edit menu, click Properties.

Setting Up Routes to Value Fields


You need to set up a route between the Value field and the class of object, so
that the field displays the correct data.
To do this:
1

Open the Label Field Properties dialog box (see earlier) and go to the
Route tab.

7 Defining Symbols and Labels: Worked Examples

83

Select from the three class view options in the Browse from section. In
our example we have selected the Object class view which we set up in
the document properties earlier. Next select an attribute from those
displayed in the Data View list.

Tip: Right mouse click on any item to display detailed properties. Together, these two
selections define the route for the Value field. In our example, we have specified a
route for our Value field, with the attribute Capacity within the GraphicDefinerPump
class view.

Note:

You can also type in the route, but this is not recommended.
You can fill in your own tag, or have it done automatically once you have specified
the route. If you filled in the tag yourself, this will not update when you specify the
route.
A suitable tag will be suggested in the Tag box, the first time you select a route
from the Class Browser.
You may add a description, which will be used to aid identification of fields in the
Drawing Application. This allows you to define short tags if you wish to clarify your
label definition.

Setting Up Lists of Options for Value Fields


You may want a Value field to display a list of options. For example, the field
may be the list of contributors to a plant design, so the Value field should
show these peoples' names, and nobody elses.
To set up option lists:

84

Open the Label Field Properties | Options/Method tab.


In our example, we are not specifying the CAPACITY Label field:

7 Defining Symbols and Labels: Worked Examples

Note: Options cannot be set if the route of the field produces an enumerated
data type.
The table outlines the three available choices: None, Options and Method.
Choice

Description

None

No options specified. This is the default

Options

Create a list of (static) options, which you type in on the left, and then
transfer to the right using the various arrow buttons
You can move items up and down the list, but you cannot duplicate them

Method

Run a specified method that resides on the server, to create a dynamic list
of options
The method runs and returns one or more options for the user to choose
from, or performs an action that requires no user response
If the method does not exist on the server, then an error occurs when the
label is installed and used

If you select Selection from Options/Methods Only checkbox, this restricts the
choice of the user to the list of options, or the list returned from the method.

Making Fields Read Only


To make fields read only:

In the Label Field Properties dialog box, select the Field is Read Only
checkbox.

This checkbox is available for all tabs.

Example Label with Two Value Fields Added


In our example label, we have placed and then specified two Value fields,
CAPACITY and DIFF P.

7 Defining Symbols and Labels: Worked Examples

85

Placing and Specifying Plain Text


You can add plain text to annotate your label.
To add plain text to a label:
1

Click the Place Plain Text button.

The Graphics Definer is now in plain text placement mode. Each time you
click on the sheet, a question mark appears. To stop this process, click
any other command button (the Select button is a good choice for this).
2

Double-click the plain text, and in the dialog box that appears, type in the
text for the annotation. You can also change the text properties.

Example Label with Plain Text Added


In our example, we have added two pieces of plain text, Capacity and Diff
Press:

Placing and Associating Units Fields


If your Value field displays data for physical quantities, such as temperature
or pressure, then it will need matching units of measure. You add units of
measure using Units fields.

Placing Units Fields


To place a Units field:

Click the Place Units Fields button.

The Graphics Definer is now in field placement mode. Each time you click on
the sheet, a question mark in round brackets appears. To stop this process,
click any other command button (the Select button is a good choice for this).

86

7 Defining Symbols and Labels: Worked Examples

Associating Units Fields to Value Fields


Having placed a Units field on the sheet, you need to associate it with a Value
field. There are two ways of doing this:

Select the Units field and the Value field it serves, then click the
Associate Field button. This is the recommended approach; we have
used it in our example.

- or

Double-click the Units field and in the Label Units Field Properties
dialog box, manually define the associations.

Making Units Fields Read Only


To make Units fields read only:

In the Label Units Field Properties dialog box, select the Field is Read
Only checkbox.

This checkbox is available for all tabs.

Example Label with Units Fields Added


In our example, we have selected the CAPACITY Value field and the
neighboring Units field, ready to datasheet the association using the
Associate Field button.

Tracking Unit Field Associations


You can keep track of any associations that you have set up.
To do this:

Click the Associations button.

.
The picture shows our example label, with two associations flagged: one for
CAPACITY and one for DIFF P.

7 Defining Symbols and Labels: Worked Examples

87

Drawing Supplementary Graphics


You can add graphics. For example, you may want to draw a rectangle around
the label. Graphics are added to labels using the standard drawing tool
buttons on the left side of the of the Graphics Definer working window.

Defining a Datum for the Label


The datum defines how a label is dragged and placed on a drawing.
To view the datum for a label:

Click the Show/Hide Datum button.

.
The datum point appears as a green target, which you cannot manipulate.
To set a datum for a label:
1

Click the Set Datum button

.
A red interactive target appears.
2

Either:
o

Drag-and-drop the target at your chosen datum point.

- or -

Click at the new datum point.

In our example, we have set a datum to the lower left of the fields:

88

7 Defining Symbols and Labels: Worked Examples

Defining a Mass Balance Insert Point for


the Label
If your label is a Mass Balance Header or a Mass Balance Column, you
will need to define a Mass Balance Insert Point for it. This is a point at which
the next column will begin. The datum of the next column will be positioned
to coincide with this point.
Setting a Mass Balance Insert Point is similar to Setting a Datum. Just click
on the Set Mass Balance Insert Point button or menu entry and position it on
the sheet with a mouse click.

The Show/Hide Mass Balance Insert Point button or menu item results in the
current Mass Balance Insert Point location being displayed.

Example of a Mass Balance Grid Header with Datum and Mass Balance Insert
Point displayed:

7 Defining Symbols and Labels: Worked Examples

89

Compiling the New Label File


When you have completed your label, you need to compile it before using it in
the Aspen Basic Engineering Drawing Editor.
To compile your label:
1

Click the Compile Label button.

This creates an xml definition of the label. Any errors are reported in a
list, which you can double-click for more information.
After successful compilation, you are prompted to save the label files.
2

Save the xml definition file with the extension .ztf.

Save the label file with the extension .sym.

Example of Creating a New


Symbol
This example takes you through the steps for creating a new symbol using
the Graphics Definer.
The key stages in the process are:

Create a new symbol file.

Draw the symbol.

Specify any symbol characteristics, such as part definitions.

Specify any parts and tool tips.

Set the datum for the symbol.

Add any dimensions to the symbol (optional).

Save the new symbol file.

Creating a New Symbol File


You create a new symbol file in the same way as a new label file (see earlier),
but use the New Symbol button instead.

90

7 Defining Symbols and Labels: Worked Examples

Drawing a New Symbol


Having opened a new symbol file, you can now draw the symbol using the
tools on the Drawing toolbar, which is on the left of the Graphics Definer
working window.
In our example, we have used a circle with an internal triangle to represent a
centrifugal pump.

Specifying Symbol Characteristics


You must specify some characteristics for a symbol, such as the class of
object that it represents.
To do this:
1

From the Graphics Definer Edit menu, click Properties. (Properties is


also available as a right-click menu option.) The Symbol Properties
dialog box appears, with the Symbol Information tab visible.

This illustration shows the Symbol Properties dialog box:

7 Defining Symbols and Labels: Worked Examples

91

In Class, set the class of object that the symbol represents. To do this,
click the Browse button and in the Class Browser that displays, navigate
to the class of object.

In Symbol Type, select a type of symbol from the list provided. Be careful
to choose a type that does not conflict with your choice of object class (for
example, the choice Stream will conflict with the object class PUMP).

Modify the other settings as required.

If necessary, change the sheet size by going to the Sheet Size tab. See
Specifying Label Information, earlier.

Specifying Parts and Tool Tips


Parts are graphical elements of a symbol that are nominated place holders for
connectors, such as inlet and outlet points.
You can create tool tips for parts. These are meant to guide users as they
make connections to symbols in the drawing. Tool tips appear in the drawing,
when you place the cursor over a nominated part.
To specify a graphical element as a part:

Click the Parts Definition button.

The Edit Part Definition dialog box appears.

92

7 Defining Symbols and Labels: Worked Examples

To create a tool tip:


1

In the Name box, type in the name of the part.

In the Tool Tip box, type in the tool tip to be seen by the user.

Note: If you have previously filled in the Name text box, the text is
automatically transferred over to the Tool Tips text box.

Example Symbol with Parts and Tool Tips Defined


In our example, we nominated one of the graphical elements in the center of
the symbol as a part. Physically, this part is an input to the equipment item,
so we want to restrict connections to one angle, 180 degrees, which is at
right-angles to the part. We have added the tool tip 'inlet' to guide the user.

7 Defining Symbols and Labels: Worked Examples

93

Defining a Datum for the Symbol


You define a datum point for a symbol in the same way as for a label (see
earlier). In our example, the datum is placed in the center of the symbol.

Adding Dimensions to the Symbol


This is an optional task.
You may want to annotate the lines and angles on your symbol with
dimensions, as commonly seen on engineering drawings. For example, your
symbol may be a column on a refinery, and you want to show that the column
is 15 meters high.
To do this, you must first create the Dimensions toolbars, as follows:
1

From the View menu, click Toolbars.

In the Toolbars dialog box that appears, click Customize.


The Customize dialog box appears.

In the Categories list, select Dimension.


The Dimension suite of buttons appear in the dialog box.

Drag-and drop these buttons onto the toolbar area of the Graphics
Definer.

You can now add dimensions to your symbol:

Click the appropriate button on the Dimensions toolbar. For example, click
Smart Dimension to add the length of a line.

To change the format of dimensions (for example, the style of the arrow
heads):

From the Format menu, click Dimensions.

Saving the New Symbol File


Unlike a new label file (which needs compiling), you need only save a new
symbol file.

94

7 Defining Symbols and Labels: Worked Examples

8 Extracting Legacy Symbols


and Labels

This chapter explains how to use the Graphics Definer to extract legacy
symbols and labels created in other products (AutoCAD in particular) for use
in the Aspen Basic Engineering Drawing Application and includes the
following:

Overview of extracting symbols and labels.

Extracting symbols from AutoCAD to the Graphics Definer.

Extracting labels from AutoCAD to the Graphics Definer.

Extracting legacy symbols and labels from other packages.

Working with extracted symbols and labels.

Overview of Extracting Symbols


and Labels
The Graphics Definer has a conversion facility that lets you re-use legacy
symbol and label data from imported drawings:

If the legacy data is from AutoCAD Aspen Basic Engineering's drawing


application prior to version 10.3 much of the information is
automatically retained. This includes geometry, part definitions and some
symbol and label attributes, but not label data for routes, options and so
on.

If the legacy data is from a simple drawing, the extraction process


extracts geometry, but you continue the symbol or label definition in the
Graphics Definer.

8 Extracting Legacy Symbols and Labels

95

Symbols: Extracting from


AutoCAD to the Graphics
Definer
Extracting symbols from AutoCAD to the Graphics Definer is a two-stage
process:
Stage 1 Preparation.
Stage 2 Conversion.

Preparation and Background Information


If your AutoCAD symbols have been defined using the Symbol Definer utility,
the chances are that very little needs to be done to prepare a file for
conversion. The following points are important:

Make sure that each symbol and its attribute data can be selected easily.

Check the text attributes in the CLASS layer. If necessary, you can change
them later, once the symbol is in the Graphics Definer.

Ensure that all leader lines for named parts have a text box at one end to
name the part, and a single graphical object (primitive) at the other end,
which is identified by the leader line.

Set the Foreign data options (accessed from the Graphics Definer Tools
menu, then Options) to the correct scale for your symbol drawings.

Check or uncheck the Extract all geometry as parts menu item in the
Graphics definer menu. This determines whether or not all geometry, not
just named parts, can be connected.

What is and isn't Extracted?


Many of the attributes of your original symbols will be preserved through the
conversion process, but some have no meaning in the Graphics Definer, and
others cannot easily be converted. Here is a summary:
Extent The extent of the symbol has no meaning in the Graphics Definer,
and it ignores any geometry in the EXTENT layer.
Datum The Graphics Definer determines the datum point of the symbol
using a single point in the POINTS layer. More than one point in that layer
causes an error. Other geometry in the POINTS layer is ignored. If no point is
present in the POINTS layer, the conversion process issues a warning then
continues, assuming the datum is the center of the symbol bounds.
Parts The extraction process converts graphical elements of the symbol
into parts. There are two categories of parts:

Named parts, which are the authentic parts from the original AutoCAD
symbol.

Anonymous parts, which are the remaining graphical elements.

Both types of part are now described:

96

8 Extracting Legacy Symbols and Labels

Named Parts Named parts are extracted with their name intact. For this
process to be automated, each leader line in the PART-NAMES layer must
have a single text box (also in the PART-NAMES layer at one end) and a
single primitive in the OBJECTS layer at the other. The primitive may also be
in another layer, as long as that layer does not have special meaning as
described in this document (for example, CLASS, EXTENT, PART-NAMES,
POINTS layers). The text in the text box is used as the name of the new part
definition. All other geometry in the drawing, without a special meaning to the
extractor, is defined as an anonymous part, so enabling it to be used for
connection.
Anonymous Parts As well as importing named geometry as named parts,
the remaining geometry can be identified as "anonymous" parts so that it can
be connected to. This promotes consistency between the current Aspen Basic
Engineering and pre-Aspen Basic Engineering 10.3 versions using AutoCAD,
for which all parts of an object could be connected. You can choose to have
the remaining geometry imported as anonymous parts by checking the
Extract all geometry as parts menu item in the Graphics definer menu.
CLASS Layer Text boxes in the class layer are read and have special
meaning. The text boxes must be ordered from top to bottom, like they were
originally created in the Symbol Definer. The Graphics Definer refers to this
order when determining which text boxes are used to set which attributes.
Attributes are set in the following order:
Order

Attribute

What Happens to the Attribute

Name

Sets the name, type and description of the new symbol

Filename

Sets the default file name for the new symbol (.sym is
appended as a file extension)

Scale

Ignored

Rotate

Ignored

Reflect

Ignored

Leader

Ignored

Connect

Determines whether or not the symbol can split a


connector when placed

The following example shows the class data extracted as attributes of a new
symbol:
SHELL-AND-TUBE-HEAT-EXCHANGER
Filename:

exch-ht

Scale:

no

Rotate:

yes

Reflect

no

Leader

no

Connect

yes

8 Extracting Legacy Symbols and Labels

97

Connect Angles
When symbols are extracted from AutoCAD into the Graphics Definer, their
parts are given default connection angles of 0, 90, 180 and 270. Once the
symbol is in the Graphics Definer, you can change the connection angles from
the default setting.
Newly created symbols in the Graphics Definer can have any connection
angle.
Newly created symbols in the Graphics Definer have no parts nominated, and
you need to nominate them yourself.

Converting Symbols from AutoCAD to the


Graphics Definer
To extract legacy symbols from AutoCAD to the Graphics Definer:
1

Load the dwg file containing your symbol definitions, into the Graphics
Definer.
Note: The original layers, such as POINTS and OBJECTS, are preserved.

Select all of the graphical data that comprises an individual symbol.


Often a box selection works well for this, but if symbols are close together
or even overlapping, you may need to select items individually.
Ensure that all the symbol graphics, the text boxes from the class layer,
the part name leader lines and the text boxes and the datum point are
selected.
Select Symbol:

98

Symbol is Selected:

8 Extracting Legacy Symbols and Labels

Click the Extract button.

At this stage, you are warned of any irregularities and omissions.


4

If the conversion proceeds smoothly, you are prompted for the directory
and filename for the newly-converted symbol.
The filename is already set from the CLASS layer data (if present), but
you can change it if you want.

Check and add symbol attributes using the Graphics Definer; then drag
the symbol onto a diagram in the Aspen Basic Engineering Drawing
Application to check that it is correctly scaled and can be connected to.

Repeat this process for each new symbol.

Labels: Extracting from


AutoCAD to the Graphics
Definer
As with symbols, extracting labels from AutoCAD to the Graphics Definer is a
two-stage process:
Stage 1 Preparation.
Stage 2 Extraction.

Preparation and Background Information


If your AutoCAD labels have been defined using the Symbol Definer utility,
the chances are that very little needs to be done to prepare a file for
conversion. The following points are important:

Make sure that each label and its attribute data can be selected easily.

Set the Foreign data options (accessed from the Graphics Definer Tools
menu, then Options) to the correct scale for your label drawings.

What is and isn't Extracted?


Many of the attributes of your original labels will be preserved through the
conversion process, but some have no meaning in the Graphics Definer and
others cannot easily be converted. Here is a summary:
Extent The extent of the label has no meaning in the Graphics Definer, and
it ignores any geometry in the EXTENT layer.
Datum The Graphics Definer determines the datum of the label using a
single point in the POINTS layer. More than one point in that layer causes an
error. Other geometry in the POINTS layer is ignored. If no point is present in

8 Extracting Legacy Symbols and Labels

99

the POINTS layer, the conversion process issues a warning then continues,
assuming the datum is the center of the label bounds.
CLASS Layer Text boxes in the class layer are read and have special
meaning. The text boxes must be ordered from top to bottom, like they were
originally created in the Symbol Definer. The Graphics Definer refers to this
order when determining which text boxes are used to set which attributes.
Attributes are set in this order, as follows:
Order

Attribute

What Happens to the Attribute

Name

Sets the name, type and description of the new label

Type

Sets the Aspen Basic Engineering class of the label

Filename

Sets the default file name for the new label (.sym is
appended as a file extension)

Document

Sets the associate-label-to-document property

Rotate

Ignored

The example shows the class data extracted as attributes of a new label:
Stream Diamond
Type:

IN-LINE

Filename:

lab-sdia

Document:

No

Rotate

No

Field Information
Field information does not survive the extraction.
Extracted fields appear as plain text boxes in the Graphics Definer. These text
boxes retain their original style, but all field definitions are lost.
To prepare for this, note the legacy field information so that you can recreate
it once the label is in the Graphics Definer.
Tip: To recreate field information for this plain text in the Graphics Definer:
select the text, click either the Convert Text to Field button or the Convert
Text to Units Field button, then double-click the field and complete the
dialog box that appears.
For more information, see the Labels example.

Converting Labels from AutoCAD to the


Graphics Definer
To convert labels from AutoCAD to the Graphics Definer:
1

Load the dwg file containing your label definitions, into the Graphics
Definer.
Note: The original layers, such as POINTS and OBJECTS, are preserved.

100

Select all of the graphical data that comprises an individual label.

8 Extracting Legacy Symbols and Labels

Often a box selection works well for this, but if labels are close together or
even overlapping, you may need to select items individually.
Ensure that all the label graphics, the text boxes from the class layer, and
the datum point are selected.
Select Label:

Label is Selected:

Click the Extract button.

At this stage, you are warned of any irregularities and omissions.


4

If the conversion proceeds smoothly, you are prompted for the directory
and filename for the newly-converted label.
The filename is already set from the CLASS layer data (if present), but
you can change it if you want.

Check and add the label attributes using the Graphics Definer; then drag it
onto a diagram in the Aspen Basic Engineering Drawing Application to
check that it is correctly scaled.

Repeat this process for each new label.

If you have extracted fields, redefine each field using the procedures
below:
o

Select the text.

Click either the Convert Text to Field button or the Convert Text to
Units Field button.

Double-click the field and complete the dialog box that appears.

For more information, see the Labels example.

8 Extracting Legacy Symbols and Labels

101

Extracting Legacy Symbols and


Labels from Other Packages
You can produce symbols and labels from non-AutoCAD packages, such as
MicroStation and SmartSketch, as long as the drawing loads into the Graphics
Definer.
You extract non-AutoCAD drawings in the same way as their AutoCAD
counterparts, but during the procedure, you are usually prompted to clarify
whether the drawing is to be a symbol or label once in the Graphics Definer.
The reason for this prompt is that, unlike AutoCAD drawings, non-AutoCAD
drawings typically have no text items in the class layer, and it is these text
items that tell the Graphics Definer whether it is dealing with a symbol or a
label.
Note: Aspen Basic Engineering 2006 and Aspen Basic Engineering is
compatible with SmartSketch version 4. To open SmartSketch version 5
symbols in the Graphics Definer you must first, within SmartSketch, save
them as Smartsketch version 4 symbols.

Working with Extracted


Symbols and Labels
Once the extracted symbols and labels are in the Graphics Definer, you can
work with them using any of the available tools. For example:

102

Extracted symbols You may want to remove parts status from some
elements or add or amend port definitions for others.

Extracted labels Because field information is not extracted, your first


priority may be to convert the (extracted) plain text back to a Value or
Units field.

8 Extracting Legacy Symbols and Labels

9 Graphics Definer Menus


and Toolbar Buttons

This chapter describes the menus and toolbar buttons in the Graphics Definer.

Menus
The Graphics Definer has the following menus:

File menu.

Edit menu.

View menu.

Definer menu.

Insert menu.

Format menu.

Tools menu.

Window menu (not described).

Help menu (not described).

File Menu
The File menu contains the following commands, which apply to both symbols
and labels unless stated otherwise:
File Menu Command

Action

New Symbol

Creates a new document (.sym file) for you to create a


new symbol

New Label

Creates a new document (.sym file) for you to create a


new label

Open

Opens an existing symbol or label document (.sym file)

Close

Closes the active symbol or label document

Save

Saves the active symbol or label document, with its


present name and location
(For a label, you must also compile before it is ready to
use.)

9 Graphics Definer Menus and Toolbar Buttons

103

File Menu Command

Action

Save As

Saves the active symbol or label document with a


specified name and location

Open Workspace

Connects you to the server and opens a workspace in the


Graphics Definer

Close Workspace

Disconnects you from the server and closes the


workspace

Document Properties

Displays the document properties, for you to view and


edit

Sheet Setup

Displays specifications of the document sheet, such as


the paper size, which you can edit

Print

Prints the contents of the active window

Send

Dispatches a document via email

Exit

Ends your session with the Graphics Definer

Edit Menu
The Edit menu contains the following commands, which apply to both symbols
and labels:
Edit Menu Command

Action

Undo

Undoes your last action in the Graphics Definer.

Redo

Reverses the Undo command

Cut

Removes the selection to the clipboard

Copy

Copies the selection to the clipboard

Paste

Places the contents of the clipboard at the cursor position

Paste Special

Designed for pasting images. As for Paste, but you can


specify the format for the pasted image (for example, a
picture or a bitmap)

Delete

Deletes selected items in the active document, but not


from the workspace

Select All

Selects all the items in the active document

Properties

Displays properties for the selected item within a


document, for you to view and edit

Links

Displays any links to external files, such as a graphic in a


separate document. You can update the links

View Menu
The View menu contains the following commands, which apply to both
symbols and labels:

104

View Menu Command

Action

Grid Display

Shows or hides the snap grid (a rectangular array of


points on the document that may be visible or hidden)

Grid Snap

Toggles the point snapping to the grid, between on and


off

Zoom Area

Zooms in to a specified area of the document

9 Graphics Definer Menus and Toolbar Buttons

View Menu Command

Action

Zoom In

Magnifies the view of the document

Zoom Out

Shrinks the view of the document

Previous

Returns the view to its previous setting

Fit

Adjusts the view so that the document fills the drawing


window

Pan

Changes the cursor to a navigation tool, which you use


to scroll around the document

Toolbars

Displays the list of toolbars. You can choose to show or


hide each toolbar. Also use this command to customize
toolbars and menus

Definer Menu
The Definer menu contains the following commands:
Definer Menu Command

Action

Set Datum

Makes the datum mobile, for you to set at your


chosen location

Show/Hide Datum

Toggles between showing and hiding the datum

Place Field (labels only)

Places a Values field on the document, at the cursor


position

Place Units Field (labels


only)

Places a Units field on the document, at the cursor


position

Place Plain Text

Places a Plain Text field on the document, at the


cursor position

Associate Fields (labels


only)

Graphically associates one Units field with one or


more Value fields

Show Associations (labels


only)

Displays any associations between Value and Units


fields

Convert Text to Fields


(labels only)

Converts any plain text boxes in the selection, to a


Values field

Convert Text to Units


Fields (labels only)

Converts any plain text boxes in the selection, to a


Units field

Default Text

Sets a default text style, which is adopted by all new


fields thereafter

Part Definition (symbols


only)

Enables you to create and edit nominated parts for a


symbol

Extract

Extracts both symbols and labels created in an


external package (typically AutoCAD), for use in the
Graphics Definer

Extract all geometry as


parts

When this menu option is checked, all geometry is


imported as either named or anonymous parts. If left
unchecked, only named parts are imported

Compile Label (labels only)

Compiles the label (symbols are not compiled)

9 Graphics Definer Menus and Toolbar Buttons

105

Insert Menu
Use the Insert menu to import graphics and objects.

Format Menu
Use the Format menu commands to:

Modify the appearance of the lines and text used to construct the symbols
and labels.

Modify the style of any dimensions added to your symbol drawing.


(Dimensions are the lines and arrow heads typically seen on engineering
drawings, to convey the length of lines and the size of angles.)

Tools Menu
The Tools menu contains the following commands, which apply to both
symbols and labels:

106

Tools Menu Command

Action

PinPoint

Activates a toolbar that displays geometrical


information, such as the (x,y) position of the cursor,
and the length and angle of any lines you are drawing

Character Map

Displays a list of special characters, which you select,


then copy and paste onto the document

Layers,
Layer Groups

For legacy AutoCAD drawings extracted into the


Graphics Definer. Displays the layers and layer groups
in the drawing

Measure Distance

Displays the straight-line distance between two


selected points on the document

Measure Area

Click on or within a selected (enclosed) region to


display the area (in the default sheet unit). You can
also group-select areas to display the total group area

Alignment Indicator,
Maintain Relationships
and Relationship Handles

Specialist settings to help you create complex shapes.


These are best left at their defaults

SmartSketch

Changes the cursor from a (passive) arrow to a


responsive tool that portrays information on the
features over which it is passing. For example, you
can configure a SmartSketch-enabled cursor to
identify the midpoint of a line as the cursor moves
along the line

Macro

Enables you to select and then run a macro on the


active document

Add-Ins

Incorporates extra groups of commands and


functionality into the Graphics Definer. Similar to
Microsoft Excel addins

Customize

Enables you to modify the Graphics Definer toolbars


and menus, and create new toolbars

Options

Sets options for the document, such as the spacing of


the snap grid

9 Graphics Definer Menus and Toolbar Buttons

Toolbar Buttons
When you start the Graphics Definer, a default set of toolbars appear above
and alongside the Drawing window:

Main toolbar.

View toolbar.

Graphics Definer toolbar.

Ribbon toolbar.

Draw toolbar.

In common with many Windows applications, you can modify which toolbars
display and customize each toolbar (see Customizing Menus and Toolbars in
Chapter 2 of Using Diagrams).

Main Toolbar
The Main toolbar contains the following buttons:
Toolbar
Button

Name

Description

Open
Workspace

Connects you to the server and opens a workspace


in the Graphics Definer

New Symbol

Creates a new document (.sym file) for you to


create a new symbol

New Label

Creates a new document (.sym file) for you to


create a new label

Open
Document

Opens an existing symbol or label document (.sym


file)

Save

Saves the active symbol or label document, with its


present name and location. (For a label, you must
also compile before it is ready to use.)

Print

Prints the contents of the active window

Cut

Removes the selection to the clipboard

Copy

Copies the selection to the clipboard

Paste

Places the contents of the clipboard at the cursor


position

Undo

Undoes your last action in the Graphics Definer

Redo

Reverses the Undo command

Grid Snap

Toggles the point snapping to the grid, between on


and off

Grid Display

Shows or hides the snap grid (a rectangular array of


points on the document that may be visible or
hidden)

9 Graphics Definer Menus and Toolbar Buttons

107

Toolbar
Button

Name

Description

PinPoint

Activates a toolbar that displays geometrical


information, such as the (x,y) position of the cursor,
and the length and angle of any lines you are
drawing

Help

Displays Online Help for Graphics Definer

View Toolbar
The View toolbar contains the following buttons:
Toolbar
Button

Name

Description

Zoom Area

Zooms in to a specified area of the document

Zoom In

Magnifies the view of the document

Zoom Out

Shrinks the view of the document

Fit

Adjusts the view so that the document fills the drawing


window

Pan

Changes the cursor to a navigation tool, which you use to


scroll around the document

Previous
View

Returns the view to its previous setting

Graphics Definer Toolbar


The Graphics Definer toolbar contains the following buttons:
Toolbar
Button

108

Name

Description

Document
Properties

Displays the document properties, for you to view


and edit

Set Datum

Makes the datum mobile, for you to set at your


chosen location

Show/Hide Datum

Toggles between showing and hiding the datum

Set Mass Balance


Insert Point

Makes the Mass Balance Insert Point mobile, for


you to set at your chosen location

Show/Hide Mass
Balance Insert
Point

The Show/Hide Mass Balance Insert Point button or


menu item results in the current Mass Balance
Insert Point location being displayed

Place Field

Places a Values field on the document, at the


cursor position

9 Graphics Definer Menus and Toolbar Buttons

Toolbar
Button

Name

Description

Place Units Field

Places a Units field on the document, at the cursor


position

Place Plain Text


Field

Places a Plain Text field on the document, at the


cursor position

Associate Fields

Graphically associates one Units field with one or


more Value fields

Show Fields/Units
Fields Associations

Displays any associations between Value and Units


fields

Convert Text to
Fields

Converts any plain text boxes in the selection, to a


Values field

Convert Text to
Units Fields

Converts any plain text boxes in the selection, to a


Units field

Default Text
Properties

Sets a default text style, which is adopted by all


new fields thereafter

Part Definition

Enables you to create and edit nominated parts for


a symbol

Extract Symbol

Extracts both symbols and labels created in an


external package (typically AutoCAD), for use in
the Graphics Definer

Compile Label

Compiles the label (symbols are not compiled)

Ribbon Toolbar
The Ribbon toolbar contains the following buttons:
Toolbar
Button

Name

Description

Inside

Restricts a selection to items entirely within the boundary


of that selection. This is the default setting

Overlappin
g

Enables the selection to include all items overlapped by the


boundary of that selection

Top Down

Ensures that, on selecting a constituent line or arc from an


item, the whole item is selected. This is the default setting
For example, a column comprises two lines for the sides,
and two arcs for the top and bottom. With Top Down
pressed, if you select either a line or an arc, the whole
column is selected

Bottom Up

The reverse of Top Down. Use this feature if you want to


select individual lines or arcs from items

9 Graphics Definer Menus and Toolbar Buttons

109

Draw Toolbar
The Draw toolbar contains the following buttons, which you use for drawing
lines and arcs.
For all the buttons, the procedure is:
1

On the Draw toolbar, click the appropriate button.

In the Drawing window perform your chosen action, such as drawing a line
or a tangent arc.

When you are happy with your creation, right-click to commit the changes
on the drawing.

On completing a drawing task, it is good practice to revert to the (neutral)


Select/Pointer tool. See the following table for a description of the buttons:
Toolbar
Button

110

Name

Description

To Use

Select Tool
(Pointer)

Selects items

This is a neutral tool, for selection


purposes only

Line

Draws a straight
line

Click at the start and end of the line

Tangent Arc

Draws a tangent
arc to an existing
line

Click an existing line at the point


where you want the arc to start. This
is the tangent point. Move the pointer
to create the arc

Line/Arc
Continuous

Draws straight
lines and arcs
between
successive points

Click at successive points to form a


series of connected lines or arcs. (To
toggle between lines and arcs, click
the Line button or Arc button on the
newly displayed toolbar that appears
directly above the drawing)

Circle by
Center Point

Draws a circle
about a fixed
center

Click at the center point. A red circle


appears that you can expand or
contract

Ellipse by
Center Point

Draws an ellipse
about a fixed
axis. (You define
the fixed axis by
its center and one
of the end points)

Click at the center point. A line


appears which you can rotate and
lengthen: this is the fixed axis for
your ellipse. Click to fix this axis. A
red ellipse appears, which you
manipulate through the second, free
axis

Rectangle

Draws a rectangle
with one side
fixed. (You define
the fixed side by
its end points)

Click two points that will be the fixed


side of the rectangle. A red rectangle
appears, and you can widen or shrink
the free dimension

Curve

For drawing freestyle curves


through a
sequence of fixed
points

Click to display a red line, which you


can manipulate to form a curve.
Successive clicks create fixed points
through which the curve must pass

Free Sketch

For free-style
drawing

With the mouse held down, move the


cursor to create a free-style drawing

9 Graphics Definer Menus and Toolbar Buttons

Toolbar
Button

Name

Description

To Use

Fillet

Rounds off sharp


vertices

Click the two lines that form the


vertex. A red curve appears between
the lines, which you manipulate.
When you are happy with the
proposed rounding, click to delete the
unwanted sharp vertex

Chamfer

Replaces sharp
vertices with a
chamfer

As for Fillet, above, but the process


creates a line rather than a curve

Trim
Element

Trims lines from


one intersection
to the next

For lines or arcs that contain


intersections.

Extends lines to
the next
intersection

Click the portion of the line or arc that


you want extending

Fills enclosed
shapes with color
and/or hatching

Click within an enclosed shape. Select


a fill color and style from the toolbar
that appears directly above the
Drawing window

Extend to
Next

Fill

Click the portion of the line or arc you


want trimmed. The portion is deleted

The line or arc extends until it hits an


intersection

Parametric Symbols
Parametric functionality within Aspen Basic Engineering allows you to design
and utilize symbols that can be controlled by modifiable parameters. This
section describes parametric symbols from the perspective of the designer. All
Aspen Basic Engineering symbols can be modified by uniform transformations
such as rotation, scaling and reflection. However, if you wish to change the
height of a column without at the same time changing its width, this must be
achieved using parametric symbol functionality.

Parametric Symbol Toolbars


Parametric Symbols are designed within the Graphics Definer.
Two toolbars provide this functionality. These are:

Dimension toolbar.

Relationship toolbar.

9 Graphics Definer Menus and Toolbar Buttons

111

These toolbars can be added to the Graphics Definer by right clicking with the
mouse on the existing toolbars and selecting the required toolbar in the list of
toolbars displayed, or by using the View | Toolbars menu command.
A parametric symbol is a symbol which has dimensions and also relationships
between the graphical elements of that symbol.
To enable a symbol to contain relationships, check the Tools | Maintain
Relationships option. Once this menu item is checked, the system sets up
intelligent choices for relationships while you are drawing your symbol. These
choices can be removed or added. To see evidence of relationships, click the
Relationship Handles button. Relationships are displayed in the following
ways:
Connect relationship. The
square denotes connection
between the two lines

Horizontal/Vertical
relationship. The plus
symbol denotes the line is
constrained to vertical or
horizontal
Parallel relationship. The
double bar indicates that the
two lines are to be kept
parallel. (Note: Moving the
mouse over one of the
double bars results in it and
its partner being
highlighted)
Perpendicular relationship.
The right-angle symbol
indicates that the two lines
are to remain perpendicular
to each other

112

9 Graphics Definer Menus and Toolbar Buttons

Tangent relationship. The


small circle at the junction
of the large circle and the
line, indicates that the line
should remain tangential to
the circle
Colinear relationship. The
small, bold circles on each
line indicate that the lines
should be kept collinear.
(Note: Moving the mouse
over one of the circles
results in it and its partner
being highlighted)
Concentric relationship.
The two outer circles shown
here are to be kept
concentric as indicated by
the small, central doublecircle symbol
Symmetric relationship.
The two crosses on the arcs
indicate that the arcs are
symmetrical about the line

Equal relationship. The bold


double bars on the lines
indicate that they are of
equal length. (Note: Not to
be confused with parallel)

Lock relationship. The end


of the line indicated by the
lollipop, is fixed in space

To remove a relationship, select it and press the delete key. To add a


relationship, follow the instructions later in the document.

9 Graphics Definer Menus and Toolbar Buttons

113

Dimensions
Dimensions are the key to parameterizing symbols.
Dimensions supply information about the size, location, and orientation of
elements, such as the length of a line, the distance between points, or the
angle of a line. Dimensions are associative to the elements they refer to, so
you can make design changes easily.
There are two dimension types, driving and driven.

Driving Dimensions
Driving dimensions are set up so that when the numerical value changes, so
does the geometry they are attached to. When a driving dimension is
selected, the Driving/Driven button is inset (depressed). To change the
dimension to be driven, toggle the Driving/Driven button.

Driven Dimensions
Driven dimensions do not control geometry, they simply report its
dimensions. When a driven dimension is selected, the Driving/Driven button is
not depressed. To change the dimension to be driving, toggle the
Driving/Driven button.
Note: The Driven/Driving button is only visible when a dimension is selected
on the sheet.
You can also indicate the status of dimensions using their color scheme.
Select the required dimensions and click the right mouse button to set
dimension properties. A color scheme is available to indicate dimensions
which are driving, driven or in error.
Note: A useful color scheme to use might be green for driving, yellow for
driven and red for error.

114

9 Graphics Definer Menus and Toolbar Buttons

Variables
Variables can be used in a symbol definition as placeholders for any value you
wish to represent. In addition, if a variable is subsequently used for setting a
driving parameter and if its name corresponds to the Aspen Basic Engineering
convention, it will ultimately be used to control the symbol when it is placed
on an Aspen Basic Engineering sheet.
A Variable Table is used to define and edit functional relationships between
the dimensions of a design in a familiar spreadsheet format. The Variable
Table is accessed using the Variables command on the Tools menu.
There are two types of variables:

Dimensions displayed in the design.

Variables you create directly in the Variable Table.

Dimension variables directly control elements of a design. A user variable


must be set equal to a value or mathematical expression; for example, PI
= 3.14159.

The variable table is similar to a spreadsheet. You can type into an empty row
to create a new variable, giving its name, its type and its value (or formula).
If you want to control the symbol in Aspen Basic Engineering using graphical
handles, you must create a variable that corresponds to the handle you want
to utilize.
The name of the variable should be one of:
Top, Bottom, Left or Right,

9 Graphics Definer Menus and Toolbar Buttons

115

corresponding to the relative location of the GUI Handle on the placed symbol
(refer to the Glossary in the on-line Help for a definition of handles). Note
that the capitalization of the first letter and the spelling must be exact.
The formula column of the variable table can contain any valid formula and
you can use variables within these formulae. This means that you can set a
driving dimension using formulae containing variables.

Drawing With Relationships


As mentioned earlier, when the Tools | Maintain Relationships menu
option is checked, any drawing automatically contains relationships as shown
in the following figure. The two shapes were drawn and the relationships were
added automatically:

How these relationships are automatically created can be controlled by the


Tools | Smartsketch menu. Check the relationships you want to have
added.

116

9 Graphics Definer Menus and Toolbar Buttons

Relationship Commands
Using Feedback from the Pointer as You
Draw
As you move the pointer, the software automatically updates values in the
ribbon bar, giving you constant feedback on the size and position of the
element you are drawing. As you draw, the software shows a temporary,
dynamic display of the element you are drawing by the pointer this
feedback is called a relationship indicator. This temporary display shows the
look of the elements if you place the element at the current location.
The software gives you more information about the element that you are
drawing by displaying relationships between the temporary, dynamic element
and the following items:
Other elements in the drawing comprise:

Horizontal and vertical orientations.

Origin of the element that you are drawing.

When the software recognizes a relationship, it displays a relationship


indicator at the pointer. As you move the pointer, the software updates the
indicator to show new relationships. If a relationship indicator appears by the
pointer when you click to draw the element, the software applies that
relationship to the element.
For example, if the horizontal relationship indicator appears when you click to
place the second end point of a line, then the line is exactly horizontal.

Relationships
You can set the types of relationships you want the software to recognize with
the Settings command on the Tools menu. The software can recognize one or
two relationships at a time. When the software recognizes two relationships,
it displays both relationship indicators at the cursor.

Locate Zone
You do not have to move the pointer to an exact position for the software to
recognize a relationship. The software recognizes relationships for any
element within the locate zone of the pointer. The circle around the pointer
crosshair or at the end of the pointer arrow indicates the locate zone. You can
change the size of the locate zone with the Settings command on the Tools
menu.

9 Graphics Definer Menus and Toolbar Buttons

117

Infinite Elements
The software recognizes the Point On Element relationship for lines and arcs
as if these elements were infinite. In the following example, the software
recognizes a Point On Element relationship when you position the pointer
directly over an element and also when you move the pointer off the element.
To delete a relationship, select it and press the delete key. Often, box
selection is the best way to select.
To add a relationship, press one of the relationship buttons on the relationship
toolbar and select the objects to be related as described:
Connect relationship. The first object selected will snap
to the second object

Horizontal/Vertical relationship. The line selected will


snap to the nearest axis, horizontal or vertical. Note that
the line must already be nearly horizontal or vertical

Parallel relationship. The first line selected will move to


be parallel with the second line selected

Perpendicular relationship. The first line selected will


move to be perpendicular to the second

Tangent relationship. The first object selected will move


to be tangential to the second

Colinear relationship. The first line selected moves to


become collinear with the second

Concentric relationship. The first circle or arc selected


will move to have its center point coincident with the
second circle or arc

118

9 Graphics Definer Menus and Toolbar Buttons

Symmetric relationship. First a line must be selected


which represents a mirror. The next object selected
moves to be symmetrical (by reflection) with the third

Equal relationship. The first of two objects selected will


move to be equal (usually in length or radius) to the
second

Lock relationship. Placing a lock on an object, fixes it in


space. If the lock is placed on the endpoint of an object,
only that endpoint is fixed in space

Variables. Clicking this button will toggle the visibility


of the variables dialog

Adding and Deleting Dimensions


SmartDimension. Places a dimension for:

Length and angle of a line.

Radius and diameter of a circle.

Length, angle, radius, and diameter of an arc.

Radius of an ellipse or curve.

Distance Between. A linear dimension measures the


length of a line or the distance between two points or
elements. You can place linear dimensions with the
Distance Between and SmartDimension
commands
Angle Between. An angular dimension measures the
angle of a line, the sweep angle of an arc, or the
angle between two or more lines or points. You can
place angular dimensions with the Angle Between
and SmartDimension commands
Axis. A dimension axis allows you to place
dimensions that are perpendicular to or parallel to an
element. After you set a dimension axis with the Axis
command, you can place a dimension that runs
parallel or perpendicular to the dimension axis. To
use the axis, you must set the type of dimension axis
that you want to use on the dimension ribbon bar.
You do this by clicking the Distance Between or
Coordinate Dimension buttons on the Dimension
Toolbar. Then, you click Explicit in the Dimension Axis

9 Graphics Definer Menus and Toolbar Buttons

119

box on the ribbon bar


Measure Distance. You can measure the length of a
line or the diameter of a circle by selecting the
element and looking at the value on the ribbon bar.
For more detailed work, the software provides
commands for measuring distances or areas in a
drawing. The Measure Distance command measures
the distance between points on elements and points
in free space. The distances are shown using the
current units of measure for the document.
Note: This is a tool for measuring distance when
working with the drawing. The visual feedback is not
saved with the sheet.
Measure Area. The Measure Area command
measures the area inside one or more closed
boundaries. To set the units for measuring distances
or areas, you can use the Properties command on the
File menu.
Note: This is a tool for measuring area when working
with the drawing. The visual feedback is not saved
with the sheet.
Coordinate Dimension. Places a dimension that
measures the distance from a common origin to one
or more key points or elements. The coordinate
dimensions that refer to the common origin are
members of a coordinate dimension group.
You can place coordinate dimensions in any order and
on either side of the origin with respect to the
dimension axis. You can also add additional
coordinate dimensions to existing coordinate
dimension groups.
Symmetric Diameter. Places a dimension that
measures the distance between a center line and
another element or key point, multiplies the distance
by two, and displays the value as a diameter.

120

9 Graphics Definer Menus and Toolbar Buttons

Linking Variables to Aspen


Basic Engineering GUI Handles
When the parameterized symbol is used in Aspen Basic Engineering, it can be
manipulated using a graphical user interface. If any variables are defined
corresponding to Top, Bottom, Left or Right, then these will be
represented in the GUI by a diamond shaped handle at the top, bottom, left
or right of the symbol respectively.

Clicking on this handle and dragging the mouse results in the value of the
variable changing and therefore any geometrical dependencies within the
symbol that are based on the variable, will change too.

Example
The following example shows the design of a parametric symbol, in this case
a column, which can change its height or width independently.
Create a new symbol:
1

Place the datum in the center of the sheet. We will also use this as a fixed
point for the parametric operations.

Draw two lines horizontally to each side of the datum (switching on the
grid may help).

9 Graphics Definer Menus and Toolbar Buttons

121

122

Use the lock relationship to lock one end of one of the lines at the datum
(the other line is implicitly locked by the connect relationship, note the
hollow square indicator).

Use the equal relationship to constrain the lines to be of equal length. If


the lines are not already constrained to be horizontal, use the Horizontal
Vertical relationship.

Now draw two vertical lines near each free end of the horizontals. These
form the sides of the column. Constrain the lines to be vertical.

Connect the center point of each line to the end point of the horizontal,
being careful to select the vertical line before the horizontal.

Use the horizontal relationship to constrain the end points of the vertical
lines to be horizontal to one another. (Select the button, then the end
point of each line, a dotted line will be drawn to show the relationship).
Only one set of ends need be constrained since the verticals will expand
and contract about their center points.

9 Graphics Definer Menus and Toolbar Buttons

You should find that you can now move one end point of one of the
vertical lines and this will drive all the other endpoints keeping the object
symmetrical about the datum.

Now add parameters to drive the end point that drives all the others. Use
the Distance Between parameter.

10 Create an arc by center and end points, being careful to place the center
point in line with the datum and the end points connecting (automatically)
to the ends of the vertical lines.
11 Repeat for the arc forming the base of the column. Constrain the center
points of the arcs to be in line with the datum.

9 Graphics Definer Menus and Toolbar Buttons

123

12 Use SmartDimension to add a dimension to the radius of the (driving) arc.


13 Open the variable table (by pressing the variables button).

Open the variable table (by pressing the variables button). Define new
variables Top and Right. In the formula field of the width-ways
parameter type Right and in the formula field of the height controlling
parameter, type Top. These parameters are now driven by the value of
the variable. You may also set the radius dimension based on another
variable or parameter. In the example it is set to 1 x V352.

124

9 Graphics Definer Menus and Toolbar Buttons

14 Make the arcs equal using the equal relationship.

14 Save the symbol after setting its properties for use in Aspen Basic
Engineering.

15 You may want to hide the construction lines (the original horizontals) and
the dimensions in an invisible layer. You may also shade the resulting
symbol if you wish.
To create an invisible layer:
a) Select the menu item Tools | Layers
b) In the ribbon bar, simply type the name of the new layer to create it.
When you draw an element, it is assigned to the active layer.
c) To see which layer is active, or to change the active layer, you can use the
Layers button on the Main toolbar.
d) To view elements on specific layers, you can turn on one or more layers
with the Layers button.

9 Graphics Definer Menus and Toolbar Buttons

125

Note: Because the icon representing the symbol is generated automatically


from all of its drawing elements, large parameters placed outside the
geometry of the symbol, will cause the resulting icon to appear smaller. To
avoid this, reduce construction lines and parameters and place them within
the bounds of the symbol geometry.

16 When the symbol is place on a drawing, it appears with a diamond shaped


handle at the top and one at the right, corresponding to the variables you
defined. These diamonds may be dragged with the mouse to change the
parameters of the symbol.

126

9 Graphics Definer Menus and Toolbar Buttons

10 Class Library Editor

The Class Library Editor is a client application, which allows authorized users
to create and edit Class Libraries and compile them into a Class Store
(previously a Prototype Store).
A Class Library comprises a named collection of related class and association
definitions (organized according to an XML Schema). Typically, the set of
definitions contained in each class library will be related by a common
purpose, e.g. a class library may contain classes for mechanical parts for
rotating equipment, or classes of heat transfer equipment.
Aspen Basic Engineering supports multiple class libraries and a class library
may reference other class libraries (Referenced Libraries) to allow
relationships between classes in different class libraries.
In addition to user-defined Class Libraries, a number of other Class libraries
are provided with Aspen Basic Engineering, these include a System Library (a
protected, non-editable library containing classes required by the Aspen Basic
Engineering system to function) and a range of engineering libraries.

10 Class Library Editor

127

Class Library Repository


Library files are contained in the directory ClassLibraries. Each Library file has
an .azcl file extension (a AZCL file) and is an XML document containing all
properties of the following entities for a single class library:

Associations.

Class Views.

Classes.

Composite Views.

Enumerations.

Included Libraries.

Each entity has a namespace, i.e., no two classes can have the same name.
The Name property of an entity is its identifier.
On loading a library the system performs the following consistency checks
for:

Namespace violations.

Missing dependencies.

Class Store
The Class Store is a compiled version of the Class Library used by the Aspen
Basic Engineering server. It contains a flattened representation of the
classes in the Library and its referenced libraries, with all dependencies
checked and properly mapped.

Class Library Editor Window


The Class Library Editor window contains the following elements:

128

Menu bar.

Toolbar (with tooltips).

Status Bar Displays summary details of the Class and Library.

Navigation Pane (left pane) Displays top level constructs in the library
via eight tabs.

Content Pane (right pane) Displays the content of constructs displayed


in the Navigation pane (e.g., Attributes of Classes).

10 Class Library Editor

Class Library Editor Menus


The Class Library Editor has the following menus:

File menu.

Edit menu.

View menu.

Insert menu.

Tools menu.

Window menu (not described).

Help menu (not described).

File Menu
The File menu contains the following commands:
File Menu
Command

Action

New

Creates a new, blank class library. If an existing class library is


loaded with unsaved changes, you are prompted to save the
changes

Open

Open an existing class library. The default directory is the Class


Library Repository. If an existing class library is loaded with
unsaved changes, you are prompted to save the changes

Close

Close the current class library, (all open contents pane windows).
If the existing class library is loaded with unsaved changes, you
are prompted to save the changes

Save

Save the class library to its class library (.azcl) file. If the library
has never been saved, the Save As dialog is displayed prompting
you to name the file

Save As

Enter the name for a new file and choose a directory to save it in.
The default directory is Class Library Repository

Library
Properties

Opens the New Library Properties dialog

Recent File

Displays the most recently loaded libraries(s). Choosing one of


these files opens that library

Exit

Close/Shutdown the Class Library Editor. If an existing class


library is loaded with unsaved changes, you are prompted to save
the changes

10 Class Library Editor

129

Edit Menu
The Edit menu contains the following commands:
Edit Menu Command

Action

Undo

Reverses your last action in the Class Library Editor

Redo

Reverses the Undo command

Cut

Removes the selection and copies it to the clipboard

Copy

Copies the selection to the clipboard

Paste

Places the last item copied to the clipboard at the cursor


position

Delete

Deletes selected item (Class, Attribute or Association)

Find

Brings up the Find dialog

Stop Sorting

Returns a view back to the original order

Properties

Opens the selected items Properties dialog

View Menu
The View menu contains the following commands used to show/hide the
associated item:
View Menu Command

Action

Toolbars

Displays/hides the Class Library Editor toolbars

Status Bar

Displays/hides the Class Library Editor status bar

Navigation View

Displays/hides the Navigation View pane

Output

Displays/hides the Output window

Insert Menu
The Insert menu contains the following commands:

130

View Menu
Command

Action

Class

Opens the Class Properties dialog and allows you to insert a new
class

Association

Opens the Association Properties dialog and allows you to insert a


new Association

Enumeration

Opens the Enumeration Properties dialog and allows you to insert


a new Enumeration

Composite
View

Opens the Composite View Properties dialog and allows you to


insert a new composite class

Class View

Opens the Class View Properties dialog and allows you to insert a
new class view

10 Class Library Editor

Tools Menu
The Tools menu contains the following commands:
Tools Menu
Command

Action

Make Class Store

Allows you to compile a current library to create a Class Store

Check Library

Checks the Library for errors and puts the result in the Report
tab of the output bar

Check the
selected
Construct

Check the currently selected item in the navigation view for


errors and puts the results in the Report tab of the output bar

Show Usage

Finds where the currently selected item in the navigation view


is used and puts the result in the Report tab of the output bar

Preferences

Opens a dialog allowing you to set the Class Library Editors


preferences

UOM Definitions

Allows you to navigate to and open an XML (default format)


unit of measurement (UOM) definitions file

Class Library Editor Toolbars


When you start the Class Library Editor, the default toolbars appear below the
menu. All toolbar icons have tooltips for quick reference. In addition to
displaying standard buttons, you can customize this toolbar to display Class
Library Editor specific buttons (also see Customizing Menus and Toolbars in
Using Diagrams).
The Class Library Editor toolbar contains the following default buttons within
two default toolbars. (Icons displayed may vary according to customization):

Toolbar Button

Name

New

Creates a new Class Library

Open Document

Opens an existing Class Library

Save

Saves the active Class Library

Cut

Cuts the selection to the clipboard

Copy

Copies the selection to the clipboard

Paste

Pastes the contents of the clipboard at the


cursor position

Delete

Deletes the selected construct from the library

Undo

Reverses your last action in the Class Library


Editor

Redo

Reverses the last Undo command

10 Class Library Editor

Description

131

10

Properties

Displays a dialog box containing the properties


of the selected Construct or Attribute

11

Find

Allows you to search for a Construct in t the


library and puts the result in the Find tab of
the output bar

12

Show Usage

Shows the usage of the selected construct

13

Check Construct
for Errors

Checks the selected construct for error

14

Check Library
for Errors

Check the whole library for errors

15

Make Class
Store

Compiles the library into a Class Store

16

Help

Displays on-line help for the Class Library


Editor

17

Open

Open an alternative view depending on the


currently selected item

18

Show System
Order

Stops any sorting and reorders the view in the


original system order

19

Insert Attribute

Inserts an attribute in the selected position

20

Move Up

Moves selected item up

21

Move Down

Moves selected item down

22

Expand All

Expands all the items one level

23

Collapse All

Collapses all items

Navigation Pane Context-Menu


A context-menu is displayed when you click the right mouse button while the
cursor is in the left pane. Context-menu options are also available within the
main menu bar (and toolbar where relevant).
The menu displayed shows the following options (black titles active; gray
titles currently inactive):

132

Open.

Insert.
o

Class.

Association.

Enumeration.

Composite View.

Class View.

SubClass.

Seed New Composite View.

Rename.

Delete.

Check for Errors.

Show Usage.

Find Attribute.

Properties.

10 Class Library Editor

Class Library Editor Status Bar


The status bar displayed at the bottom of the main window provides item
summary details in three fields:

Class.

Superclass.

Library.

Navigation Pane
This pane is displayed on the left side of the window and contains the
following tabs:

Library tab Displays all library elements hierarchically.

Classes tab A summary of classes in the current library.

Associations tab A summary of associations in the current library.

Enumerations A summary of enumerations in the current library.

Class Views A summary of class views in the current library.

Composite Views A summary of composite views in the current library.

Quantity Types Displays all the Units Of Measure hierarchically.

Libraries A summary of libraries in the current library.

Inheritance tab Displays classes by inheritance.

Compare Library Show the differences between two libraries.

Library Tab
The Library tab displays all elements in the library hierarchically. The root of
this view is the current library. All library elements are visualized, organized
by containment (i.e., Enumerations of LibraryX are displayed under LibraryX/
Enumerations). Classes and Associations are further organized by category.
Entities with no category are placed under the Classes/Associations node.

10 Class Library Editor

133

Construct Tabs
The following tabs, Classes, Associations, Enumerations, Class Views and
Composite Views display a list of all constructs of that type and display details
of each construct. The lists can be sorted by any column and the appropriate
content view or properties can be displayed by double clicking on an item or
using the right mouse button context menu, which has the same choices as in
the Library tab for each construct.

Inheritance Tab
The Inheritance tab displays a graphical view and represents multiple base
classes. It shows all current classes and all referenced libraries organized by
inheritance. This view can only be modified via the Edit Class Properties
dialog.

Quantity Types Tab


The quantity types tab displays all the known quantity types and their
associated units. Quantity types can be edited and modified and will be saved
when the library is saved.

134

10 Class Library Editor

Compare Library Tab


Content Pane
The contents of Classes, Class Views, Composite Views and Enumerations can
be shown in a contents pane.
The content view for Classes is shown in the Content (right) pane. In this
window, attributes are displayed in columns (scroll horizontally to view
columns) and all columns can be sorted. Attributes can be displayed in
various colors, depending on state and context. Attributes defined in base
classes are de-emphasized.
The content view is hierarchical, by aggregation, i.e., the view contains a
hierarchical representation of aggregation, with aggregated attributes
emphasized in large bold text. The type column displays the base type
(Integer, String, etc.) or Class name of the attribute, if the attribute is an
aggregated class instance. If this is the case, the attribute name is
emboldened and the attributes contained within it are displayed beneath it
and indented.
Associations (references to other objects) are also shown in this view.
Enumerations list their options.

Managing Class Libraries and


Class Stores
A Class Store is a compiled Class Library used by the Aspen Basic Engineering
server to define the objects and attributes in the Aspen Basic Engineering
database.
A Class Library consists of:

A single root Library file with the extension AZCL.

Any number of included library files with the extension AZCI.

Any number of included Class Store files with the extension AZCS.

Extensions to class stores. (Normally stored in the root library)

The root library and the included libraries contain definitions of Classes,
Composite Views, Class Views, Associations and Enumerations. The difference
is that only the root library can include other libraries and Class Stores, and
only the root library can be compiled into a Class Store. As such the root
library with its included libraries must be complete; all reference from one
class to another must be contained within the root library and its included
files.
Class Stores are compiled class libraries. Aspen Basic Engineering delivers
precompiled libraries. The System class store is always delivered. Class stores
cannot be modified but can be included in a new Class Library and constructs
in a class store can be extended.

10 Class Library Editor

135

Though class stores cannot be edited or changed you can extend a class store
in your class library by adding to a construct e.g. adding an attribute to a
class, or by modifying certain properties such as an attributes description but
not the name or any other property that the Aspen Basic Engineering server
depends on. The extensions/modifications are stored in the new class library.

Library Operations
Creating a New Class Library
This procedure creates a new Class Library displayed in the Navigation pane
Library tab and assumes the Class Library Editor is already open:
1

Select File | New.

If a current library is open, a Save prompt is displayed. Click Yes to save


any changes and save the current library to file.

A new (empty) Class Library is created and displayed in the Library tab.
This becomes the current library.

Opening an Existing Class Library


This procedure opens an existing Class Library for editing.
Note: Class Libraries can only be edited using the Class Library Editor, not
from within a Workspace.
1

Launch the Class Library Editor application.

Select File | Open.

If a current library is open, a Save prompt is displayed. Click Yes to save


any changes and save the current library to file.

The Open dialog is displayed allowing you to open a file (the default file
display format is .azcl) or navigate to the directory containing the required
.azcl library file(s).

Select the required Library filename to open it in the Library tab.

Editing Library Properties


This procedure allows you to edit the properties of a Class Library and
assumes the Class Library Editor is already open:

136

Select File | Library Properties to open the Edit Library Properties


dialog.

Data in the Name, Description, Author, and Organization fields can be


edited by an authorized user.

When complete, click OK to save changes and close the dialog, or Cancel
to discard changes and close the dialog.

If the library name has been modified, this is displayed in the Library tab.

10 Class Library Editor

Refer to the following table for Library property descriptions:


Library Property

Property Description

Name

A short name for the library

Description

A general description of the contents and purpose of this library

Author

The name of the author of this library

Organization

The name of the company or other organization originating this


library

Adding Revision Control to a Library


A revision can be set for a library. Only the current revision can be modified.
The current revision can be closed at which point no further changes will be
allowed to the library until either the revision is reopened or a new revision is
created. To create, modify, reopen or close a revision:
With the Class Library Editor already open:
1

Select the current library or an included library in the Library View.

Select the Properties command to open the Library Properties dialog.

Select the Revision tab.

Adding an Include Library


This procedure adds an include library to the current library, allowing you to
load the modeling constructs in the included library into the Class Library
Editor.
Modeling constructs in the included library can be edited and references can
be created from modeling constructs in the current library to modeling
constructs in the include library.
With the Class Library Editor already open:
1

Select the current library or an included library in the Library View.

Select the Properties command to open the Library Properties dialog.

Select the Add Existing Referenced library icon; a File Open dialog is
displayed.

Locate a directory on the user or a networked computer (the system


displays the files in that directory with a .azci extension.

Select one of the files listed (the system displays the description property
of the selected file).

Confirm the selection of the class library (the system adds the selected
class library to the list of included libraries).

Confirm the changes to the library properties (the system loads the
contents of the include library if it is not already loaded).

The library is added as a library node in the Library View.

10 Class Library Editor

137

Removing an Include Library


This procedure allows you to remove an include library from the current
library or an include library.
With the Class Library Editor and a library already open:
1

Select a library from the Library View.

Select the Properties command (the system displays the Edit Properties
dialog for the selected library).

Select the name of an include library from the list of included libraries.

Select the Remove icon.


A warning is displayed advising that removing the include library may
invalidate modeling constructs in the current library that depend on the
include library. The include library is deleted from the list of included
libraries.

Click Yes on the dialog box to confirm the changes to the library
properties.
Note: If the library is not included by any other library currently loaded,
the system unloads the contents of the library and removes the included
library from the library view. Any changes made to the include library
since it was loaded are saved.

Cutting and Pasting Library Content


This procedure allows you cut and paste a construct between include libraries.
With the Class Library Editor and a library that includes one or more other
libraries already open:
1

Select a construct shown in the Library View. The selected construct may
be in more than one source library.

Select Cut. (The selected construct in the Library View is displayed in a


different rendering to show that removal is pending.)

Select a target library in the Library View and select Paste. The selected
constructs are placed in the target library and the constructs are removed
from the source libraries.
Note: If you attempt to paste the selected constructs into a library that
already contains one of the selected constructs, an error is reported and
none of the constructs are pasted.

138

10 Class Library Editor

Dragging and Dropping Library Content


This procedure allows you to drag and drop a construct between include
libraries.
With the Class Library Editor, and a library that includes one or more other
libraries, already open:
1

Select a construct shown in the Library View.

Drag the selected construct while holding down the left mouse button.
(Visual feedback that the selected objects are being dragged is indicated.)

Release the left mouse button over the target library. The selected
construct is placed in the target library and the construct is removed from
the source libraries.
Note: If you attempt to drop the selected construct into a library that
contains one of the selected constructs, an error is reported and none of
the constructs are dropped.

Viewing and Selecting Library Contents


This procedure allows you to view the content of the current class library and
any included libraries.
With the Class Library Editor already open:
1

Select View | Navigation view from the menu. A multi-page navigation


window is displayed with a tab for each page.

Select the Library tab.


The library contents are displayed as a tree view.
The root node of the tree is the current library.
Nodes below the library node represent the data model construct by type.
The last node contains the included libraries.
Nodes immediately below the data model construct type nodes are the
data model construct instances.

Click on the + symbol to expand the nodes in the tree view and find
constructs of interest.

Saving a Class Library


This procedure allows you to save changes to the current library and assumes
the Class Library Editor is already open:
1

Select File | Save to save any changes to the library and keep the
current library open. If this is the first save, the Save As dialog prompts
you to save as a filename.

If changes have previously been made and saved, no dialog is displayed


and the file is saved with the existing name to the existing location.

10 Class Library Editor

139

Searching a Library
This procedure helps you ensure you do not duplicate modeling constructs,
thus creating redundancy in the Class Libraries. You may search class libraries
for matches against a plain text string or matches against a regular
expression. The scope search can be configured to look selectively for
matches in one or more kinds of modeling construct and modeling construct
properties.
With the Class Library Editor already open:
1

Select Find from the toolbar or Edit menu and enter a text string.

Select the property to compare the string with, and modeling constructs
the search should consider.

Specify whether or not the search should look for the exact string
specified or any result containing the string.

Selects whether or not the search uses regular expression pattern


matching.

Confirm the search criteria.

The system presents a report showing all the instances where a match
with the search string was found, in the Find tab of the output bar.

Checking a Library for Errors


This procedure causes the system to check all constructs in the library for
semantic errors (such as invalid references or missing required properties).
With the Class Library Editor already open:
1

Select Tools | Check Library. This generates a report in the Report tab
of the output bar listing all messages generated by the check. Messages
are classified into one of the following categories: Warning, Error, Severe
Error.

Click on the column headings to sort by any heading.


Hint: Warnings can be switched off in the Tools | Preference dialog.

Creating a Class Store


This procedure creates a Class Store file containing all the data model
constructs from the current library and any included libraries.
With the Class Library Editor already open:

140

Select Tools | Make Class Store. (The system checks whether any
changes have been made to the library contents since the library was
opened or last saved.) The Save As dialog is displayed.

Enter a file name and file location for the Class Store file (the system
writes the Class Store file).

You can now load the Class Store into the Aspen Basic Engineering server
without generating errors and use the data model constructs in a
Workspace.

If errors are generated, an error report is displayed and the Class Store
file is not created.

10 Class Library Editor

Class Operations
Creating a New Class
This procedure shows you how to use a graphical interface to create new
classes and define their properties.
With the Class Library Editor already open and a class library created or
opened:
1

Select Insert | Class to open the New Class Properties dialog.

Enter class properties in the Name, Display Name, Description, Category


and Known Category fields.

Class Property

Description

Class name

The name that identifies the class within the class libraries
and by the system

Display name

The name by which the class is identified by an end user

Description

A text description of the class (may include a URL)

Category

The category of the class

Known name

The name of the attribute of this class used to identify an


instance of this class

Superclasses

An ordered list of the classes with which this class has a


generalization/specialization relationship and from which this
class inherits its attributes. (Note: Only immediate
superclasses are shown.)

Click OK to create a new class and close the dialog.

Editing Class Properties


This procedure shows you how to edit the properties of a class. You may
perform edit operations in any order and accept or reject edits.
With the Class Library Editor already open in Library View:
1

Select a class in the Library View.

Select File | Properties to open the Edit Class Properties dialog.

Edit the class properties (as shown in the table).

Click OK to create save class edits and close the dialog.

Showing Class Usage


This procedure allows you to obtain a report showing where a class is used in
the current library or the reference libraries.
With the Class Library Editor already open and a class selected in the library
view.

Select Tools | Show Usage to display the Report dialog showing the
constructs in the current library where the classes are referenced.

10 Class Library Editor

141

Checking a Class
This procedure allows you request the system to check a class for semantic
errors such as invalid references or missing required properties.
With the Class Library Editor already open:
1

Select a class in the Library View.

Select Tools | Check Selected Construct.

The system performs checks on the properties of the class and the
properties of the class attributes for errors.

The system shows a report on the display listing all messages generated
by the check. The user selects a class in the Library View.

Inheritance View Operations


Showing the Class Inheritance View
This procedure allows you to display the inheritance relationships between all
the classes in the current library and any included libraries graphically.
With the Class Library Editor already open and a class selected in the Library
view.
1

Select the Inheritance tab in the Navigation View.


A graphical view of the classes in the current library and any included
libraries is displayed.

The view consists of a graph of nodes and arrows:

142

Nodes represent classes and are shown as rectangular boxes


containing the class name.

Arrows represent inheritance relationships. They are not labelled.

The root GenericClass is shown on the extreme left.

Nodes are laid out so that they do not overlap.

Arrows are laid out left to right except where multiple arrows enter or
leave a node, in which case the arrow vector may have a vertical
component.

All inheritance relationships have the superclass on the left of the arc
and the subclass at the right-hand end of the arc. Nodes are laid out to
achieve this objective.

A context menu allows you to select a class node and Class Operations
that require a class as a context.

10 Class Library Editor

Expand Inheritance View Depth


This procedure allows you to request the system to expand the Inheritance
view to a specified depth.
With the Class Library Editor already open and the Inheritance view as the
current view.
1

Right-click the mouse button (a context menu is displayed).

Select the Expand to n levels command (a dialog for entering the


depth of the expansion is displayed).

Enters a positive integer value (the system redisplays the Inheritance tree
expanded to the depth specified).

Refocus Start of Inheritance View


This procedure allows you to request the system to start the Inheritance view
tree at a particular class.
With the Class Library Editor already open and the Inheritance view as the
current view:
1

Select a Class node in the Inheritance view.

Right-click the mouse button (a context menu is displayed).

Select the Refocus command (the system re-displays the Inheritance tree
with the selected class at the root).

Refocus Start of Inheritance View on Root Class


This procedure allows you to request the system to start the Inheritance view
tree at the root class.
With the Class Library Editor already open and the Inheritance view as the
current view:
1

Right-click the mouse button (a context menu is displayed).

Select the Refocus on Root Class command (the system redisplays the
Inheritance tree with the root class at the start of the class Inheritance
tree).

Expand Node in Inheritance View


This procedure allows you to expand the Inheritance view to show the
subclasses of a selected class.
With the Class Library Editor already open and the Inheritance view as the
current view:
1

Select a class node in the Inheritance view.

Right-click the mouse button (a context menu is displayed).

Select the Expand command (the system re-displays the Inheritance tree
with all the subclasses of the selected class shown).

10 Class Library Editor

143

Collapse a Node in Inheritance View


This procedure allows you to collapse the Inheritance tree view below a
selected node.
With the Class Library Editor already open and the Inheritance view as the
current view:
1

Select a class node in the Inheritance view.

Right-click the mouse button (a context menu is displayed).

Select the Collapse command (the system redisplays the Inheritance tree
with all the subclasses of the selected class shown).

Printing the Inheritance View


This procedure allows you to print the currently displayed Inheritance view.
With the Class Library Editor already open and the Inheritance view as the
current view:
1

Right-click the mouse button (a context menu is displayed).

Select the Print command (the system prints the class Inheritance tree as
currently expanded in the Inheritance view).

Class Attribute Operations


Opening the Class Attribute View
This procedure allows you to display and edit the class attributes.
With the Class Library Editor already open and a class selected in the library
view.

Select Open from the right mouse button context menu or double click
the class to display the Attribute view of window which contains a list of
all attributes in the class and all the attributes inherited from superclasses
of the class.

Expanding Object Attributes


This procedure allows you to expand an attribute of type object to show the
attributes of the objects class.
With the Class Library Editor already open and the Class Attribute view as the
current view.

144

Click on the + next to an attribute that has a type of Object. The system
expands the attribute in the attribute view to show attributes of the
objects class.

You can expand all nodes one level or collapse all nodes using the + and
on the attribute tool bar.

10 Class Library Editor

Creating and Editing An Attribute


This procedure allows you to create a new attribute in a class.
With the Class Library Editor already open and the Attribute View of window
open:
1

Select an attribute or the end of the attribute list as an insertion point.

Right-click the mouse and select Insert attribute.

A new attribute is inserted in the attribute list at the insertion point.

Edit the attribute properties, clicking in each field to enter edit mode.

Refer to the following table for attribute details.

Note: You cannot insert into or edit an attribute belonging to another class.
Class
Attribute
Property

Description

Possible values and constraints

Name

The name of the attribute the


system uses to internally
identify the attribute within
the class

(default = none)

Display
Name

The name of the attribute the


system uses to identify the
attribute to an end user

(default = none)

Descriptio
n

A description of the attribute

A text description. May include a URL

Type

The data type of the attribute

(default = none)
One of the following:
String
Integer
Real
Boolean
Date
Binary
Enumeration
Object
If Enumeration is specified, the
name of an existing enumeration type
in the current or an included library
must also be specified
If Object is specified, the name of an
existing class in the current or an
included library must also be specified.
This specifies that the attribute will
contain instances of an object of the
specified class. An implicit containment
association is created between the
parent object and the sub-object

Category

A string that assigns a


category to the attribute for
sorting, searching and
filtering purposes

(default = none)

Multiplicit

The number of values that

1 (default = 1)

10 Class Library Editor

145

Class
Attribute
Property

Description

Possible values and constraints

may be stored or contained in


an instance of the attribute. A
value of 1 represents a scalar
and a value of n represents a
vector

Default
Value

A default value for the


attribute to be supplied by
the system when an object is
created. (Note: Default
values may be specified for
sub-objects, that is,
attributes of sub-objects)

1 (default = 1)

Default
Fixed

Used to show if the default


value can be modified on
objects of this class

True

Quantity
Type

If the Type property is real


and the attribute is intended
to hold values of a physical
quantity such as temperature
or pressure, this property
specifies the quantity type of
the attribute

One of the quantity types defined in the


current UOM Definitions file. Examples
are:

Case
Fixed

Specifies whether the


attribute can be different for
different cases

True

Clone
Fixed

Specifies whether the


attribute can have different
values between clones

True

Disciplines

A list of discipline privileges


an end user must possess to
change the attribute value

(default = none)

False (default = False)

Length
Heat Transfer Coefficient
(default = none)
False (default = False)

False (default = False)

Deleting an Attribute
This procedure allows you to delete an attribute from an existing class.
With the Class Library Editor already open and the Attribute View of window
open:
1

Select an attribute in the Attribute View of window.

Select Edit | Delete to remove the attribute from the attribute view.

Moving an Attribute
This procedure allows you to move an attribute up or down in the system
order of attributes in a class.
With the Class Library Editor already open and the Attribute View of window
open:
1

146

Select an attribute in the attribute view.

10 Class Library Editor

Click the toolbar Move Up or Move Down icon (or right-click the mouse
to display the context-menu.
The selected attribute is moved up one position or down one position in
the attribute view, but remains the selected attribute. The system
preserves the new system order when the class attributes are saved to a
library file.
Note: The Move Up command is disabled if you select an attribute
belonging to a subclass or superclass of the class for which the attribute
view is current.

Copying and Pasting an Attribute


This procedure allows you to copy attributes from one location in a class and
make a copy of the attributes in another location in the same class or another
class.
With the Class Library Editor already open and the Attribute View of window
open:
1

Select an attribute in the class attribute view (the selected attributes may
not be contiguous).

Select Copy Attribute from the right mouse button context menu.

Select another attribute in the same class attribute view or a different


class attribute view.

Select Edit | Paste. A copy of the attribute is inserted immediately before


the selected attribute and all properties of the copied attribute are
replicated in the inserted attribute.
Note: The Edit | Paste command is disabled if you select a target
attribute that belongs to a subclass or superclass of the class.

Cut Copy and Pasting an Attribute


This procedure allows you to cut, copy and paste the text from any field to
another.
With the Class Library Editor already open and the Attribute View of window
open:
1

Select one of the attributes.

Select Edit | Cut. This removes the selected text from the class attribute
view unsetting the property if allowed.

Select another attribute in the same class attribute view or a different


class attribute view.

Select Edit | Paste. The previously removed text is inserted as the value
for the selected property.
Note: If you select a target attribute that belongs to a subclass or
superclass of the class, the Edit | Cut and Edit | Paste commands are
disabled.

10 Class Library Editor

147

Checking an Attribute
This procedure allows you to check a class attribute for semantic errors such
as invalid references or missing required properties.
1

With the Class Library Editor already open and the Attribute View of
window open, select an attribute in the Class Attribute View.

Select the Check Attribute command. A check on the properties of the


attribute is performed and a report window listing all messages generated
by the check is generated.

Association Operations
Creating and Editing Association
This procedure allows you to create an association between classes. Only
binary associations are supported. .
To create an association:
1

With the Class Library Editor already open and the two classes already
existing in the current library or a referenced library, select Insert |
Association to display the New Association Properties dialog.

Enter data for the new association in the available fields (refer to the
following table for field details).

To edit an association:

148

Select an association in the Navigation View.

Select Edit | Properties to display the Edit Association Properties dialog.

Edit the attributes (shown in the table below) in any order.

Click OK to save the changes (or Cancel to discard) and close the dialog.

Association
Property

Property Description

Possible
Values/Default

Association
Name

The name of the association

Category

The name of the category in which the


association is

Disciplines

A list of the disciplines that are permitted to


update attributes through this association

Role Name

A name for this role in the association

Class

The name of the class that fulfils this role. The


class must exist in the current or included
libraries

Class
Attribute

The name of the attribute in the class fulfilling


this role that will be used to navigate the
association. This property is not directly
enterable by the user. It is set to be the Role
Name at the other end of the Association

Multiplicity

The number of instances of class A that may be


at this end of the association

Description

A text description of this role in the association

1 (default = 1)
n

10 Class Library Editor

Deleting an Association
This procedure allows you to delete an association between classes.
With the Class Library Editor already open:
1

Select an association in the Navigation View.

Select Edit | Delete. The association is deleted from the current library,
and the property view of the association is closed (if open).

Renaming an Association
This procedure allows you to rename an association.
With the Class Library Editor already open:
1

Select an association in the Library View.

Right-click and select Rename. The system allows you to change the
name of the Association in-situ in the Library View.

Enumeration Operations
Creating and Editing an Enumeration Type
This procedure allows you to create an enumeration data type. An
enumeration data type is a data type that specifies a list of allowed values for
an instance of that data type.
With the Class Library Editor already open:
To create an enumeration data type:
1

Select Insert | Enumeration to display the New Enumerations dialog (or


right-click to display the context-menu).

Enters properties for the enumeration type (refer to the following table for
field details).

Click OK to save the new enumeration type (or Cancel to discard and
close the dialog).

To edit the properties of an enumeration:


1

Select an enumeration from the Library View.

Select Edit | Properties to display the Edit Enumeration Properties


dialog.

Edit the displayed values of the properties (refer to the following table for
field details).

Click OK to save the new enumeration type (or Cancel to discard) and
close the dialog.

10 Class Library Editor

149

Enumeration
Property

Property Description

Possible
Values

Name

The name of the enumeration

Display Name

The display name of the enumeration

Description

A description of the enumeration type

Category

The category of the enumeration

Store As

Specifies how the enumeration value is saved and


accessed by default

Integer
(default)
String

Open or
Closed

An open enumeration has an initial option list defined


in the enumeration definition but that is not considered
to be the complete set of possible options. A closed
enumeration is one where the user cannot enter
options not specified in the enumeration definition

Open
Closed
(default)

Deleting an Enumeration
This procedure allows you to delete an enumeration data type from the
current library.
With the Class Library Editor already open:
1

Select the name of an enumeration from the Library View.

Select Edit | Delete. The enumeration is deleted from the current library.

Renaming an Enumeration
This procedure allows you to rename an enumeration.
With the Class Library Editor already open:
1

Select an enumeration in the Library View.

Select Rename from the right mouse button context menu. The system
allows you to change the name of the enumeration in-situ in the Library
View.

Showing Enumeration Usage


This procedure allows you to obtain a report showing where an enumeration
is used.
With the Class Library Editor already open:

150

Select the name of an enumeration from the Library View.

Select Tools | Show Usage to display the Report Usage of


Enumeration name window. The report details the places in the current
library and the included libraries where the enumeration is referenced.

10 Class Library Editor

Check Enumeration
This procedure allows you to obtain a report showing errors in the
enumeration properties or options.
With the Class Library Editor already open:
1

Select the name of an enumeration from the list of enumerations in the


current library or enumeration options view.

Select Tools | Check to display the Report Result of Check for


Enumeration name window. The report provides details of any errors in
the enumeration properties or enumeration options.

Creating and Editing an Enumeration Option


This procedure allows you to create and edit an option in an enumeration.
With the Class Library Editor already open and an enumeration option view as
the current view:
1

Select an option or the end of the option list as an insertion point.

Right click the mouse and select Insert Option.

A new option is inserted in the option list at the insertion point.

Edit the option properties, clicking in each field to enter edit mode.

Refer to the following table for option details:

Class Option
Property

Description

Possible Values and


Constraints

Name

The name of the attribute the


system uses to internally
identify the attribute within the
class

(default = none)

Display Name

The name of the attribute the


system uses to identify the
attribute to an end user

(default = none)

Description

A description of the attribute

A text description. May include a


URL (default = none)

Type

The data type of the attribute

One of the
following:StringIntegerRealBoolea
nDateBinaryEnumerationObject
If Enumeration is specified, the
name of an existing enumeration
type in the current or an included
library must also be specifiedIf
Object is specified, the name of
an existing class in the current or
an included library must also be
specified. This specifies that the
attribute will contain instances of
an object of the specified class. An
implicit containment association is
created between the parent object
and the sub-object

10 Class Library Editor

151

Class Option
Property

Description

Possible Values and


Constraints

Category

A string that assigns a category


to the attribute for sorting,
searching and filtering purposes

(default = none)

Multiplicity

The number of values that may


be stored or contained in an
instance of the attribute. A
value of 1 represents a scalar
and a value of n represents a
vector

1 (default)

A default value for the attribute


to be supplied by the system
when an object is created.
(Note: default values may be
specified for sub-objects, that
is, attributes of sub-objects)

1 (default)

Used to show if the default


value can be modified on
objects of this class

True

If the Type property is real and


the attribute is intended to hold
values of a physical quantity
such as temperature or
pressure, this property specifies
the quantity type of the
attribute

One of the quantity types defined


in the current UOM definitions file.
Examples are:

Specifies whether the attribute


can be different for different
cases

True

Specifies whether the attribute


can have different values
between clones

True

A list of discipline privileges an


end user must possess to
change the attribute value

(default = none)

Default Value

Default Fixed

Quantity Type

Case Fixed

Clone Fixed

Disciplines

False (default)

Length
Heat Transfer Coefficient
(default = none)
False (default)

False (default)

Deleting an Enumeration Option


This procedure allows you to delete an option in an enumeration.
With the Class Library Editor already open, an Enumeration option view as the
current view and an option selected:

152

Select the Delete command.

The option is removed from the list.

10 Class Library Editor

Class View Operations


Creating and Editing a Class View
This procedure allows you to create a new Class View in the current library.
With the Class Library Editor already open:
1

Select Insert | Class View to display the New Class View dialog.

Enter Class View properties in the Name, Description and Category fields.

Click OK to save the new Class View (or Cancel to discard and close the
dialog).

To edit a Class View:


4

Select a Class View in the Library View.

Select Edit | Properties to display the Edit Class View Properties dialog.

Edit Class View properties (in any order).

Click OK to save the new enumeration type (or Cancel to discard) and
close the dialog. The dialog is closed and changes are applied to the Class
View properties.

Renaming a Class View


This procedure allows you to change the name of a Class View in the current
library.
With the Class Library Editor already open:
1

Select a Class View in the Library View.

Select Rename from the right mouse button context-menu.

Edit the Class View name and click anywhere outside of the edit field to
save the change(s).

Editing Class View Content


This procedure allows you to display the content of a Class View. Class View
content is organized in a structure of nodes and attributes. A node can
contain any number of other nodes and attributes.
With the Class Library Editor already open:
1

Select an existing Class View in the Library View.

Select Open command.

The system displays the Class View content as a tree view.

10 Class Library Editor

153

Creating a Class View Node


This procedure allows you to create a new node anywhere in the Class View
tree structure.
With the Class Library Editor already open and with Class View content view
as the current view:
1

Select a Class View node or attribute.

Select Insert Class View Node and select Before or After or Sub-node
option. The system creates a new Class View node at the requested
location and makes the new node the current node.

Expanding and Collapsing Class View Nodes


This procedure allows you to expand and/or collapse a selected node in the
Class View content.
With the Class Library Editor already open and with Class View content view
as the current view:
1

Select a node in the Class View content.

Select the Expand All toolbar icon to display the Class View content with
the selected node expanded to show the subordinate nodes and attributes.

Select the Collapse All toolbar icon to display the Class View content with
the selected node collapsed.

Creating and Editing a Class View Attribute


This procedure allows you to create and edit a Class View attribute.
To create a Class View Attribute (with the Class Library Editor already open
and with Class View content view as the current view):
1

Select an attribute or node in the content view.

Select Insert Attribute to create an attribute in the position immediately


prior to the selected item, at the same level as the selected item.

Enter the properties of the new Class View attribute. Class View attribute
properties can also be edited in-line in the Class View content view.

To edit a Class View Attribute (with the Class Library Editor already open and
with Class View content view as the current view):

154

Select a Class View attribute to be edited.

Select Edit | Properties to display the Attribute Properties in an Attribute


Property View.

Edit the attribute properties (refer to the following table for field
descriptions). Class View attribute properties can also be edited in-line in
the Class View content view.

10 Class Library Editor

Class View
Attribute
Property

Description

Possible Values and Constraints

Name

Used by the AZ system to uniquely


identify the attribute in the Class View.
This name is used to identify this
attribute in scripting

The name must be unique in the scope of


the Class View

Display
Name

A name used to identify the attribute in


the Class View. This does not have to be
unique in the context of the Class View,
but must be unique within the scope of
the owning node

Description

Description of the attribute using the


terminology of the target application

Data Type

The implied data type of this attribute

One of the following:


String
Integer
Real
Boolean
Date
Binary
Enumeration
Object
If Enumeration is specified, the name of
an existing enumeration type in the current
or included library must be specified
If Class View is specified, the name of an
existing class view in the current or an
included library must also be specified. This
specifies that the attribute will contain the
specified class view

Quantity
Type

If the Data Type is Real this property


contains the quantity type of the attribute

The quantity type reference must exist in


the current UOM definitions file

Units

If the attribute has a quantity type then


this property may be set to a valid units
reference. The units reference determines
the units of measure that a value of this
attribute is expressed in when
transmitted to or from the application

Any units reference that is valid for the


quantity type property of the attribute. The
units reference is validated against the UOM
definition file
Defaults
Pa
K
W

Multiplicity

The number of instances of this attribute


that the application allows in the context
of the owning node

1 (default = 1)

Help Text

Text or reference to text that describes


the usage of the attribute in the context
of an application and the context of a
specific user organization

The name must be unique in the scope of


the Class View

Link

The Link to the corresponding attribute in


the Composite View

10 Class Library Editor

155

Creating a Class View to Composite View Link


This procedure allows you to create a link between an attribute in a Class
View attribute and an attribute in the Composite View.
With the Class Library Editor already open and with a Class View attribute
selected:
1

Select Create link to display the content view of the corresponding


Composite View.

Browse the content view of the composite Class View and select an
attribute of the Composite View.

Select Create link to create a link between the Class View attribute and
the Composite View attribute.

Composite View Operations


Creating a Composite View
This procedure allows you to create a new Composite View in the current
library, or select a Class View to seed a new Composite View.
With the Class Library Editor already open and with the Library View selected.
To create a new Composite View:
1

Select Insert | Composite View to display the New Composite view


Properties dialog.
o

Enter the Composite View Properties in the Name, Description and


Category fields.

Enter the Class the composite view relates to, using the browse
button.

Click OK to save the new Composite View (or Cancel to discard) and close
the dialog.

To seed a new Composite View:


1

Select a Class View not already associated with a Composite View.

Select Insert | Seed New Composite View. A new Composite View is


seeded with the content of the Class View.

Editing a Composite View


This procedure allows you to edit an existing Composite View.
With the Class Library Editor already open:

156

Select an existing Composite View in the Library View.

Select Edit | Properties to display the Edit Composite View Properties


dialog, or double-click on the title.

Enter new Composite View properties.

Click OK to save the new title (or Cancel to discard) and close the dialog.
If you double-clicked on the title only, click anywhere away from the edit
field.

10 Class Library Editor

Editing Composite View Properties


This procedure allows you to enter or edit Composite View properties.
With the Class Library Editor already open:
1

Select a Composite View and select Edit | Properties to display the Edit
Composite View Properties dialog.

Edit the properties (in any order).

Click OK to save the changes (or Cancel to discard) and close the dialog.

Renaming a Composite View


This procedure allows you to change the name of a Composite View in the
current library.
With the Class Library Editor already open:
1

Select a Composite View in the Library View.

Select Rename (right-click to display the context-menu) to change the


name of the Composite View in situ.

Editing Composite View Content


This procedure allows you to display the content of an Composite View.
Composite View content is organized as a flat list of attributes.
With the Class Library Editor already open:
1

Select an existing Composite View in the Library View.

Select Open (right-click to display the context-menu) to display the


Composite View attribute content.

Edit the content by clicking in the fields required to activate edit mode.

Creating and Editing a Composite View Attribute


This procedure allows you to create a Composite View attribute. Refer to the
following table for field details.
With the Class Library Editor already open and a Class View content view
current displayed.
To create a Composite View Attribute:
1

Select an attribute or node in the content view.

Select Insert Attribute from the context-menu and select Before or


After. An attribute is created in the position immediately before or
immediately after the selected item.

To edit a Composite View Attribute:


With the Class Library Editor already open; a Composite View contents view
current and a Composite View attribute selected:
1

Select the Composite View attribute properties in-line in the Composite


View content view.

Edit the properties and click anywhere off the edit field when finished.

10 Class Library Editor

157

Edit Composite View Attribute Properties


This procedure allows you to edit the properties of a Composite View.
With the Class Library Editor already open and a Composite View contents
view as current:
1

Select a property of an attribute in the Content view. The system presents


an editor for the property (the style of the editor depends on the
property).

Edit the property as required.

Composite View
Attribute Property

Description

Possible values
and constraints

Name

A name used by the AZ system to


uniquely identify the attribute in the
Class View. This is the name that will
be used to identify this attribute in
scripting

The name must be


unique in the scope
of the Attribute Class
View

Description

Description of the attribute using the


terminology of the target application

Type

The data type of this attribute

Selected from the list


of data types
supported by the AZ
Object Model

Quantity Type

The quantity type of this attribute


selected

Selected from the AZ


quantity type list

Multiplicity

The number of instances of this


attribute that the application allows in
the context of the owning node

1 (default = 1)

Route

The route to the corresponding


attribute starting from the Class
specified for this Composite View

Creating and Editing a Route


This procedure allows you to set the route property for a composite view
attribute by choosing an attribute from an attribute view of the class that the
composite view represents. The system sets the route property value based
on the selected attribute. You can then refine the route by adding attribute
selection criteria.
With the Class Library Editor already open and a Composite View contents
view as current:

158

Browse the Class Attribute view for the class corresponding to the
composite view.

Expand attributes of type object where appropriate to locate the class


attribute that the composite view attribute will be mapped to.

Select any valid subclass of an object attribute to expand.

Drag and drop the class attribute onto the composite class view route
property. The system writes the route of the selected class attribute into
the route property.

10 Class Library Editor

Locate Corresponding Class Attribute


This procedure allows you to locate the class attribute to which a composite
view attribute is routed.
With the Class Library Editor already open and a Composite View contents
view is current:
1

Select a composite view attribute and click the Open icon on the toolbar.

The class attribute is highlighted.

Show Composite View Attribute Usage


This procedure allows you to obtain a list of the Class View attributes in the
current library or an include library that are linked to a Composite View
Attribute.
With the Class Library Editor already open and a Composite View contents
view as current:
1

Select a Composite View attribute.

Select the Show Usage command.


The system displays a usage report showing the Class View name and
Class View Attribute name for each existing reference.

Click an entry in the usage report and the Class View content view of the
referenced Class View is displayed.

User Preferences and Options


The Tools menu is used to select preferences and options.
User preferences and options are saved when the Class Library Editor is
closed and they are reused next time the application is launched.
If you do not select any preferences or options system defaults are applied for
all settings.

Selecting a UOM Definitions File


A UOM definitions file is used by the Class Library Editor to populate the
Quantity Type and Units selection dialogs and for the validation of Quantity
Types and Units.
A default UOM Definitions File is supplied by the system and this is used if the
user does not explicitly select a UOM Definitions file. The user is able to select
a different UOM Definitions File.
With the Class Library Editor already open:
1

Select Tools | UOM Definitions. The system shows the pathname of


the currently selected UOMDefinitions file.

Select browse. A file Open dialog is displayed.

Locate the directory containing a UOM Definitions file. The system displays
the files in the selected directory that have an xml file type.

10 Class Library Editor

159

Select one of the files in the file open dialog and confirm the selection. The
system loads the contents of the selected UOM Definition file.

The system subsequently uses the selected UOM Definitions file to


populate the Quantity Type selection dialog whenever you edit an
attribute Quantity Type property and, uses the selected UOM Definitions
file to validate the Quantity Type property of attributes and Units
properties of attributes when the Check command is given.

Set Option to Test for Warning Conditions in


Check Command
To select whether the system looks for warning conditions on a Check
command.
1

Select Tools | Preferences. The Preferences dialog is displayed.

Select the Check option Show Warnings when Checking.

Note: The existence of warning conditions does not prevent a Class Store
from being generated. Opting to omit checks for warning conditions can
reduce the time taken to execute the Check command.

Set Option to Scroll with Fixed Column


To select whether the system keeps the name column in the content pane
always visible and on the left check this box.
1

Select Tools | Preferences. The Preferences dialog is displayed.

Select the Check option Scroll using Fixed Column.

Select Level of Output


The system outputs status of its progress in the output tab of the output bar.
To select how much output is written select the required level from the drop
down list.

160

Select Tools | Preferences. The Preferences dialog is displayed.

Select the required level of output from the drop-down list.

10 Class Library Editor

11 Explorer

The Aspen Basic Engineering Explorer provides an organizational view of


objects, data, diagrams and datasheets in an open workspace. Database
content is collected into a tree of folders from which a variety of operations
can be performed.

Subject to permissions, authorized users (those with a valid username and


password) can perform basic object operations, such as, copying and cloning,
through to browsing or editing object attributes of Workspaces. Authorized
users can also assign security to folders; this provides another way to
manage access to objects, documents and data.
The attribute views allow users to navigate the actual stored object structure
or view the data in a flat engineering-oriented display, which is helpful to
end-users rather than configuration users.

11 Explorer

161

The Explorer can also be used to launch other Aspen Basic Engineering
applications. For example double clicking a datasheet item within a folder will
launch the Datasheet Editor application to display the datasheet.
Within the Explorer, Workspaces can be exported for re-use, archiving or
external delivery. External design packages can also be imported into an
existing Workspace hierarchy.

Main Window Elements


The Aspen Basic Engineering Explorer window comprises of six standard
elements:

Explorer Menu Menu options depend upon the type of view that is
currently selected.

Toolbar (with tooltips).

Status Bar Displays user and server information.

Folders view Displays the current folder tree structure.

Filters view Displays the currently available workspace filters

Right pane Displays tabbed views of the currently open view windows.

These windows can be any number of the three main types:


1

Folder view Displays the contents of a folder selected in the folders


view.

Filter view Displays the objects for a filter selected in the filters view.

Attribute views Displays the attributes for a selected object.


The folder tree and filter views are dockable windows so can be positioned
according to the users preferences.

Explorer Menus
The Explorer has the following menus:

162

File menu

Edit menu

View menu

Case menu

Folder menu

Object menu

Run menu

Tools menu

SmartPlant menu

Window menu

Help menu (not described)

11 Explorer

File Menu
The File menu contains the following commands:
File Menu Command

Action

Open Workspace

Allows you to select a Workspace

Close Workspace

Closes the currently open Workspace

Refresh Workspace

Refreshes the current view of the Workspace

Open Folder View

Opens a new folder view window

Open Filter View

Opens a new filter view window

Print

Prints the displayed information

Print Setup

Opens the Windows Print Setup dialog

Exit

Exits the Explorer application

Edit Menu
The Edit menu contains the following commands:

11 Explorer

Edit Menu
Command

Action

Rename

Renames the selected item

Copy

Copies the selection to the clipboard (used to move data within


the same Workspace)

Paste

Places the last item(s) copied to the clipboard at the cursor


position (used to move data within the same Workspace)

Copy as Package

Copy selected folder as an import/export package (used to


move data between different Workspaces)

Paste as Package

Paste selected folder as an import/export package (used to


paste data between different Workspaces)

Component
Management

Opens the Component Management dialog allowing you to


display and manage mapped and unmapped components

Enumeration
Management

Opens the Enumeration Management Dialog

Project
Management

Opens the Project Management dialog

BEDD Management

Opens the Basic Engineering Design Data (BEDD) datasheet


which contains environmental data for the Workspace

163

View Menu
The View menu contains the following commands used to show/hide the
associated item:
View Menu
Command

Action

Toolbars (dropdown menu)

Standard Toolbar: Shows/hides the toolbar (toggle)


Filter Bar: Displays the filter bar (this allows you to add your
own filters, e.g., add a filter to display all pumps, etc.)
Status Bar: Shows/hides the status bar (toggle)
Customize: Allows you to customize the menu configurations

Folder Settings

Allows you to specify folder settings

Case Settings

Allows you to specify how the case column information is


displayed in the attribute views

Query Editor

Displays a query window for script execution

Folder Tree View

Shows/hides the folder tree view window (toggle)

Filter Tree View

Shows/hides the filter tree view window (toggle)

Attributes

Displays the attributes of the selected Object

Properties

Displays the properties of the selected folder

Case Menu
The Case menu contains the following commands:
Case Menu
Command

Action

Create

Creates a new Case (Global/Restricted)

Rename

Renames an existing case

Governing Case
(drop-down menu)

Set Global Default: Allows you to set the global default


governing case
Set Object Governing Case: Allows you to set the governing
case for a selection of objects
Reset Object Governing Case: Allows you to reset the
governing case back to the default for a selection of objects

164

Copy Object Case

Copies an object case

Remove Object
Case

Removes an object case

Delete

Deletes an existing case

11 Explorer

Folder Menu
The Folder menu contains the following commands:
Folder Menu
Command

Action

New Folder

Creates a new folder

Remove

Removes items from the selected folder but keeps these items in
the database

Delete

Deletes the selected folder and all contents from the Workspace.
Note: As deleted objects cannot be retrieved, a warning dialog is
displayed before deletion asking you to confirm/cancel delete

Add Diagram

Adds an existing diagram to the selected folder

Add Object

Adds an existing object to the folder

Add Datasheet

Adds an existing datasheet to the folder

Add File

Adds a file to the current folder

Export Package

Exports a Workspace Package (in .zpkg file format)

Import Package

Imports a Workspace Package

Object Menu
The Object menu contains the following commands:
Object Menu
Command

Action

Create

Creates a new object

Copy

Creates a copy of an existing object

Clone

Creates a clone of an existing object

Remove

Removes items from the selected folder, but keeps these items in
the database

Delete

Deletes an object from the Workspace

Claim

Claim a selected object

UnClaim

Release a claim on a selected object

File (dropdown menu)

Check Out: Checks a file out to your local PC


Check In: Checks in a file from your local machine including any
changes made
Undo Check out: Cancels a check out undoing all changes made
Save As: Saves the selected file to a specified location

Export
Package

11 Explorer

Exports a Workspace Package for the objects selected

165

Run Menu
The Run menu contains the following commands:
Run Menu Command

Action

Local Method

Runs a method on the currently selected object

Global Method

Runs a method

Rule

Runs a rule

Tools Menu
The Tools menu contains the following command:
Tools Menu
Command

Action

Customize

Opens the Customize Tools dialog and allows you to customize


(add/remove) menu commands

Framework Menu
The Framework menu contains the following commands:
Framework Menu
Command

Action

Publish

Allows you to publish to SmartPlant

Find Documents to
Publish

Allows you to find specific documents to publish to SmartPlant

Retrieve

Allows you to retrieve from SmartPlant

Todo List

Opens the Todo dialog allowing you to create a number of To


Do operations

Browse

Allows you to browse SmartPlant

Window Menu
The Window menu contains the following commands:

166

Window Menu
Command

Action

Cascade

Arranges windows so that they overlap

Tile Horizontally

Arranges windows horizontally as non-overlapping tiles

Tile Vertically

Arranges windows vertically as non-overlapping tiles

Arrange Icons

Arranges icons at the bottom of the window when windows are


minimized

11 Explorer

Help Menu
The Help menu contains the following commands:
Help Menu
Command

Action

AZ Explorer Help

Launches the AZ Explorer help file

Training

Launches an internet connection to the AspenTech Training


Center for Aspen Basic Engineering

Product Support on
the Web

Launches an internet connection to the AspenTech Support


Center for Aspen Basic Engineering

Contacting Support

Provides you with information about how to contact customer


support

About Aspen Basic


Engineering

Shows the help about information for Aspen Basic Engineering

Explorer Toolbar
The Toolbar displays commonly used menu operations as icons (buttons) on
the toolbar.
The icons used on the toolbar buttons display a tooltip (action) when the
cursor is floated over them.
Other menu options can be added to the toolbar (as icons) through the
customization feature:

Toolbar icons comprise:

11 Explorer

Item

Name

Description

Open Workspace

Opens an Aspen Basic Engineering Workspace

Refresh Workspace

Refreshes the current Workspace

Rename

Renames the selected item

Copy

Copies the selection to the clipboard

Paste

Places the last item(s) copied to the clipboard at


the cursor position

Remove from Folder

Removes the selected items from the containing


folder

Delete from
Workspace

Delete the selected items permanently from the


workspace

Add Diagram

Adds a diagram to the current folder

Add Datasheet

Adds a datasheet to the current folder

10

Add Object

Adds an object to the current folder

167

Item

Name

Description

11

Add File

Adds a file to the current folder

12

New Folder

Creates a new folder

13

Create Object

Creates a new object

14

Copy Object

Copies the selected objects

15

Clone Object

Clones the selected objects

16

Display Help

Opens the Explorer online help

Aspen Basic Engineering


Explorer Status Bar
The status bar (seen at the bottom of the Explorer window) displays the
following information:

CAPS LOCK (keyboard status).

NUM LOCK (keyboard status).

SCROLL LOCK (keyboard status).

User (current user of the application).

Data server (currently connected).

Folders View
The folders tree view window allows you to organize a hierarchy of folders so
that related objects can be grouped together. A folder can be used to group
together datasheets, diagrams and Workspace objects. A hierarchy of folders
can be created so that the Workspace content can be organized, by process
section and within a section, by process unit to an arbitrary degree of nesting.

Working with Folders


Viewing Folders
A specific folder view is displayed when a folder is selected in the folders tree
view window. Within the folder view customizable columns display the status
and attributes of the objects in the folder. The folder view can also be sorted
based on the values of any column by clicking on the column header. An
arrow indicates sort direction.
The folder view can also be filtered so that a sub-set of the objects in a folder
can be displayed by invoking the filter bar from the view menu and selecting
one of the filters from the drop down list. Information on how to create these
filters is given in the section Customizing Folder Settings below.

168

11 Explorer

An object displayed in the folder view can be used to invoke an application to


edit/display that object (e.g., the Drawing Editor for a drawing object, or the
Datasheet Editor for a datasheet).

Customizing Folder Settings


Folder settings can be customized within the Folder Properties dialog. This
dialog has two tabs, View and Filter.
To specify columns displayed in the Folder view
1

In the Explorer window, click View | Folder Settings.

By default, you are placed on the View tab.

The Icon and KnownName properties can be added as a column along with
any attribute name.

Select a field and click the Add button to add the field to the list in the
Displayed fields list.

To delete fields from the Available Fields list


1

Select a field in the Available Fields list.

Click the Delete button to remove the field from the list.

To update the Available Fields list

Click the Update button.

To set the order of columns displayed

11 Explorer

Select a field from the Displayed Fields list and click the Up or Down
button to move the field to the required position in the list.

Click OK to save settings and close the dialog, or Cancel to discard the
settings and close the dialog.

169

To add a filter to the folder view

170

Click the Filter tab to display the Filter area.

Click the Add Filter button to open the Add Filter dialog.

In the Name field, add a name for the filter (e.g., Diagrams).

Enter a meaningful description in the Description field.

In the Column field select a column title from the drop-down list, select
one of the four arguments and click the Add button to add this filter to
the right pane.

11 Explorer

Creating a New Folder


To create a new folder:
1

Select the folder in the hierarchy in which the new folder is to be created.
The folder can be selected either from the folder tree view window or by
selecting an open folder view.

In the Explorer window, click Folder | New Folder, (or click the New
Folder toolbar button).

The new folder is added to the hierarchy in the previously selected


position.

Renaming a Folder
To rename a folder:
1

Select the folder to be renamed from the hierarchy.

In the Explorer window, click Edit | Rename. (An in-place edit control is
displayed in the tree control.)

Enter the new name of the folder.

Click the Enter (keyboard) key to update the folder name. (To leave the
folder name unchanged hit the Escape key.)

Removing a Folder
To remove a folder:
1

Select the folder to be deleted from the hierarchy.

In the Explorer window, click Folder | Remove.

The folder is deleted, from the tree view, but any items contained in the
folder still exist within the workspace.

Deleting a Folder
Note: This operation deletes folder contents from the database permanently.
A warning is displayed before the deletion is executed allowing you to
confirm/cancel the deletion.
To delete a folder:

11 Explorer

Select the folder to be deleted from the hierarchy.

In the Explorer window, click Folder | Delete.

A warning dialog is displayed allowing you to proceed with folder (and


containing items) deletion from the database, or cancel the deletion.

If you select Yes (to delete) the folder and content(s) are permanently
deleted from the database.

171

Adding Existing Diagrams to a Folder


To add an existing diagram to a folder:
1

Select the folder from the hierarchy that diagrams are to be added to.

In the Explorer window, click Folder | Add Diagram. This opens the
Select Objects dialog. A list of available diagrams is displayed.

Select the diagram(s) to be added and click the OK button. This adds the
selected diagram(s) to the folder. (To cancel this action, click the Cancel
button.)

Adding Existing Datasheets to a Folder


To add an existing datasheet to a folder:
1

Select the folder from the hierarchy that a datasheet is to be added to.

In the Explorer window, click Folder | Add Datasheet. This opens the
Select Objects dialog. A list of available datasheets is displayed.

Select the datasheet(s) to be added from the list displayed and click the
OK button. This adds the selected datasheet(s) to the folder. (To cancel
this action, click the Cancel button).

Adding Existing Objects to a Folder


To add existing objects to a folder:
1

Select the folder from the hierarchy that an object is to be added to.

In the Explorer window, click Folder | Add Object. This opens the Select
Objects dialog. A list of existing objects is displayed.

Select the object(s) to be added from the list displayed and click the OK
button. This adds the selected object(s) to the folder. (To cancel this
action, click the Cancel button.)

Note: There is a checkbox on the dialogs for the actions adding diagrams,
datasheets and objects that when checked will filter the items listed to only
display editable items. This is useful when working with projects.

Adding Files to a Folder


To add files to a folder:
1

Select the folder from the hierarchy, where the file is to be added.

In the Explorer window, click Folder | Add File. This opens the Select
File dialog. A list of existing files is displayed.

Select the file(s) to be added from the list displayed and click the OK
button. This adds the selected file(s) to the folder. (To cancel this action,
click the Cancel button.)

Note: Drag and drop. Files can be dragged and dropped from your local
machine directly into folders in the explorer application.

172

11 Explorer

Dragging & Dropping Folders and Objects


Folders and objects can be dragged and dropped from the:

Folders tree to the folders tree.

Folders tree to the folder view.

Folder view to the folder tree.

When dragging and dropping, the following conditions apply:

The default drop action is to move the Object/Folder from the drag source
to the drop destination folder.

Note: Cut and Paste. The cut and paste options from the Edit menu can also
be used to achieve drag and drop behavior.

Working with Files


Files can be added to an open workspace and viewed/edited within the
Explorer, allowing individual users to modify files which may be shared by
many other users.
A file can be edited by any privileged user (a user with write access enabled)
but only by one user can edit a file at any one time.
Before a file can be edited, it must be checked out from the server into a
currently open workspace (a copy of the file is sent to the local PC of the
user). The original copy of the file on the server is not changed until the local
(checked out) copy is modified and checked back in, at which stage the file on
the server is updated with any changes.
If the checked out file is not modified locally, no changes are made to the
original file. If the checked out file is modified locally, but the Undo Check
Out option is selected, no changes are made to the original file.
A read-only copy of a file can be accessed and viewed by multiple users
simultaneously. A copy of a file can also be saved with a different name to a
user specified directory (locally or across a network).
Note: Files can only be checked in or out of the Explorer individually (they
cannot be group selected).

Explorer File Menu Options


The following Explorer File menu options are available via the Object menu
and/or the context (right mouse-click) menu:

11 Explorer

Check Out
Checks a file out from the server to your local machine. This option is
activated in the main/context menu when a file has been selected in a
folder view.

Check In
Checks in a file from your local machine back to the server (including any
changes made to that file). This option is activated in the main/context
menu when a file has been selected in a folder view.

173

Undo Check Out


Cancels a check out and also cancels any changes made to that file while
checked out. This option is activated in the main/context menu when a file
has been selected in a folder view.

Save As
Allows you to save the selected file to a specified location. This option is
activated in the main/context menu when a file has been selected in a
folder view.

Launching a File from the Explorer


When a file is first launched from the Explorer the File Services dialog is
displayed prompting selection of the following options:

Check out a read-only file.

Check out an editable file.

Selecting to view the read-only version of the file allows you to view a copy of
the file and save it as another name (to a user specified directory). Multiple
users may view a read-only version of the file simultaneously.
Selecting to check out the file and edit it copies the file onto your local PC and
allows you to modify the file, save it with a new name (to a different location)
and update the original copy by checking the file back in.
You can also add a file to the currently open workspace. This file can
subsequently be checked out/in and edited as required.

Adding a File
To add a new file to the currently open workspace:

174

Select a folder in the Explorer folders tree view window or by selecting a


folder item in a folder view.

Right mouse click and select File | Add.

Navigate to the location of the file you want to add and click OK. A new
file is added to the workspace.

11 Explorer

Checking Out a Read-only File


If you check out a read-only version of the file, it can be viewed but not
edited. The current version of the file is recorded in the workspace.
To check out a read-only file:
1

Select an existing file in an open Explorer folder view.

Double-click on the file to display the File Services prompt.

Select View the current version of this file (Read-only). A read-only


copy of the file is opened allowing you to review the content. No editorial
rights are granted.

Checking Out an Editable File


If you check out an editable file it is copied onto your computer and you have
full editorial privileges. When you have finished editing the file (and have
saved it), you can check it back in and the file on the server is updated with
any changes made.
Note: If you do not save the local file before checking it back in, no changes
will be made to the original file.
To check out an editable file:
1

Select an existing file in an open Explorer folder view.

Double-click on the file to display the File Services prompt.

Select Check out this file and edit it. An editable file is opened allowing
you to review and edit the content. Full editorial rights are granted.

Check Out Status


The check out status (locked or open) is indicated in the locked and locked by
columns in the Explorer (these columns can be shown by configuring the
folder settings).
Any changes to this information are updated when the file views are
refreshed.
If you save and close the file, then double-click to open it again without
checking it back out, any current changes are retained on your local copy of
the file.

11 Explorer

175

If the File is Already Checked Out


If a second user attempts to check out a file that is already checked out, a
prompt is displayed stating that the file is already checked out to
DOMAIN\Username and only a read-only copy of that file can be checked out:

The second user cannot review any changes made by the first user until the
local file has been checked back in. (This is because any changes made up to
that point only exist in the file on the local machine.)

Checking In a File
When you are satisfied with any changes made, the file can be checked back
in enabling these changes to be available to all other users in the workspace.
The file can then checked out by any other privileged user(s).
Note: Files must be checked in by the user.
Check in is user-initiated, not an automatic procedure.
To check a file in:

Select the file and select Object | File | Check In (or right mouse click
to display the context menu). The locked and locked by columns in the
Explorer are updated to indicate the check in was successful. (This
information will be available to other users the next time they refresh
their views on the file.)

Undo Check Out


If you do not wish to keep any changes you have made to the file on your
local machine (even if you have saved the file locally), you can select the
Undo Check Out option.
This ensures the original file (on the server) is not updated with any locally
made changes.
To discard local changes:

Select Object | File | Undo Check Out. This option cancels any local
changes and leaves the contents of the original file intact.

Save As
The Save As option allows you to save a copy of the file on your local PC to a
user specified directory. This new file has no link back to the workspace. If

176

11 Explorer

the file saved to the local machine is then edited, changes to that file are not
reflected in the file contained in the workspace.
To save a file with a different name:

Select Object | File | Save As. The Windows Save As dialog is displayed
allowing you to save the file to a user specified directory.

Note: The reverse also applies when a file from your local machine has been
dragged into an Explorer folder or added via the add File menu option. Once
the file has been added to the workspace it exists as a separate entity to the
file on the local machine. Any changes to the original (or to the file in the
workspace) are not reflected in the other file.

Working with Objects


Creating New Objects
To create new objects in the database:

11 Explorer

Select the folder from the hierarchy that an object is to be created in.

Click Object | Create to open the Select Class dialog.

Select the required class, and click the OK button. The object is placed in
the selected folder with the name New Object. (To cancel this action, click
the Cancel button.) If the name of the class is known it can be typed in
the edit box to scroll the selection list.

Rename the object as required.

177

Copying an Object
To copy an object:
1

Select the object to be copied from either an open folder or filter view.

Click Object | Copy to copy the currently selected object. The copy is
placed in the same folder as the original object.

Rename the object as required.

Cloning an Object
To clone an object:
1

Select the object to be cloned from either an open folder or filter view.

Click Object | Clone to clone the currently selected object. The cloned
object is placed in the same folder as the original.

Rename the object as required.

Removing an Object
To remove an object from its containing folder:
1

Select the object to be removed from an open folder view.

Click Object | Remove.

3 The object is removed from the containing folder. It still exists within the
workspace.

Claim an Object
To claim an object to your current project:
1

Select the object to be claimed from an open folder or filter view.

Click Object | Claim.

You are prompted to make a selection between taking out an exclusive or


a shared claim on the object.

Selecting OK on the dialog claims the selected object.

For more information, see Adding Objects to the Project scope.

UnClaim an Object
To unclaim an object from your current project:

178

Select the object to be unclaimed from an open folder or filter view.

Click Object | UnClaim.

A warning dialog is displayed asking you to confirm the action.

Selecting OK to the dialog unclaims the selected object.

11 Explorer

Deleting an Object
Note: This operation deletes the object from the database permanently. A
warning is displayed before the deletion is executed allowing you to
confirm/cancel the deletion.
To delete an object:
1

Select the object to be deleted.

In the Explorer window, click Object | Delete.

A warning dialog promts you to proceed or cancel the deletion.

Object Properties
To view the properties of an object:
1

Select the object for which we want to view the properties.

In the Explorer window, click View | Properties.

The Object Properties dialog is displayed showing two tabs:


o

General: Displays general property information about the item.

Security: Displays the roles and privileges information for the object
currently selected.

For more information, see the section Managing Workspaces.

Viewing Object Attributes


Object attributes views are launched by double clicking an object in an
Explorer window. The view is added to the tabbed window collection of folder
and filter views that you may already have open:

11 Explorer

179

If you repeat this action on another object then a new attribute view will be
opened for that object. If you repeat this action for an object for which they
already have a view open then the existing view will just be brought to the
front of the tabbed window collection. Attributes views that are open for an
object when it is deleted from the workspace will be automatically closed.
The attribute views are made up of a number of columns. The first two
columns (always present) are the attribute name and the units columns. Any
subsequent columns displayed show the attribute data values for this object
for any cases that apply. Case columns can be configured to make the view
easier to read. Please see the section Customizing Case Settings for more
information.
If the governing case column for this object is visible with the current case
settings it will be identifiable to you by a red g in a red circle before the case
name.
Attribute views have the following specific menu options:

Object

180

Select Object Opens the Select Object dialog. If another object is


chosen then the attributes view will change to report the attribute
information for the object selected.

Select ClassView Opens the Select ClassView dialog. Selecting a


specific ClassView here will result in the attributes view reporting the
attribute data for the currently selected object in the structure defined by
the ClassView.

Print Opens the Windows Print dialog, allowing you to print the
displayed information from the attributes view.

Refresh Refreshes the contents of the open window to catch any


updates in the attribute data displayed.

11 Explorer

Options
These menu options specify how the attribute information for the object
selected is displayed in the window; these options can be selected individually
or in any combination:

Show All Attributes Displays all available attributes.

Show Associations Displays all available associations.

Show System Attributes Displays all available system attributes.

Right-clicking on any cell in the attributes view displays a popup menu which
shows the following options for the attribute row and case selected:

Insert Item Allows you to insert an object into a selected object vector
attribute.

Remove Item Allows you to delete an object from a selected object


vector attribute.

Change Class Allows you to change the class of a selected object in a


parent object vector attribute to any of the classes that derive from the
class of the containing attribute.

Claim Allows you to claim the object for which the attributes are being
displayed.

UnClaim Allows you to unclaim the object for which the attributes are
being displayed.

Properties Allows you to launch the specific attribute properties for the
cell selected. These are specific for the case column selected.

Units Sets that are used when displaying the attributes in the view are
controlled by selecting from the drop down list in the top right hand corner of
the attributes view.

11 Explorer

181

Attribute Properties
The attribute properties displayed are for the specific attribute cell selected
and represent the case data for the column from which the dialog was
initiated:

The attribute properties dialog has three main tabs:

Data View Allows you to view and edit the attribute specific data
values.

Property View Allows you to view the attribute specific properties.

History View Allows you to view the attribute modified information.

In the data view tab you have a number of options available:


1

You can view the data value in different units of measure by selecting
different units of measure from the drop down list in the Unit
Measurement Selection section.
The data value changes automatically to represent the selection made.
This is only possible when the Edit Attribute Data check box is not
checked.

If you check the Edit Attribute Data check box, you can edit the data
value and set the descriptive test information for the attribute. Once the
check box is checked the units of measure no longer alter the data value
on selection.
If you make changes on this tab they are saved to the workspace when
the dialog is confirmed. The descriptive text options displayed in the drop
down lists indicate the currently recognized options available that are
loaded on the server.

182

11 Explorer

Customizing Case Settings


The case columns displayed in an attribute view by default show all of the
cases that apply to the object in question. It may be that you want to
compare some specific cases across a number of different attribute views. In
this scenario you can override the default case settings and configure the
cases that will be visible in the attribute views by customizing the case
settings for their Explorer application.
These case configurations when made are stored on the particular client
machine and will only affect the views for the particular workspace you are
using at the time. The changes are persisted between login sessions.
To specify the case columns displayed in the attribute views:

11 Explorer

In the Explorer window, click View | Case Settings.

The Case Settings dialog is displayed which allows you to choose:


o

A checkbox to show all cases.

A list of all cases (global and restricted) which shows the users
preference order whether displaying all cases or just a few.

A check box against each case to indicate if it should always be


displayed (i.e. when the Show All Cases option is unchecked).

183

Uncheck Show All Cases, select the cases to display their order and
confirm the dialog. The system records the settings and applies them to
any open attribute views. If the case selection does not include the
governing case then it will not be shown. The governing case now appears
in a selected position rather than being automatically put at the start as it
is when Show All Cases is checked.

You can now open up other attribute views for other objects in the
workspace. The system displays the attributes of the object for only the
cases selected in the dialog.

If the case selection includes a restricted case that is not applicable for the
object being viewed then the column for the restricted case is not displayed.
The system writes out to you the names of any non-applicable cases that are
hidden in a text box at the top of the attributes view.
If you have previously configured the case view settings, checked the Show
All Cases option and confirmed the dialog, the system retains the
preferences but refreshes all attributes views in the current client to display
all applicable cases for the object being viewed.
When you open new attribute views for other objects in the workspace the
system displays the attributes of the object for all cases of the object in the
order selected in the Case Settings dialog.

Default Object Classviews


The Explorer can be configured to display a specific classviews attributes by
default when an object of a particular class is selected.
You will know when you are looking at a default classview because it is
indicated in the status bar.
Selecting the Object | Select Classview menu option gives you the option
of either selecting a different class view or selecting the Attribute View option
which returns you to the default attribute collection for that object.
Default Classview definitions are configured using the Meta data property
available in the datamodel via the Class Library Editor application.
To view the class properties dialog:

184

Select the Class in the navigation pane on the left hand side.

Right-click to display the context menu, then select Properties.

Select the Custom Properties button in the left hand corner.

Set the property to DefaultClassView. This is the property name the


Explorer client uses to locate the class view definition.

Set the value to be the classviews name you want to display by default:

11 Explorer

Packages
Packages, also called Modular Designs, are sections of a workspace that have
been saved externally in an XML format. They can be used to transfer data
between workspaces and to preserve sections of a plant as modules. To
create a package, select an object to export from one of the Explorer windows
and select the Export Package menu option. This displays the Export Package
dialog from where you can specify the name of the file to be exported.
As well as the selected object, related objects are also exported:

Datasheets export the datasheet document and all objects that appear on
it.

Drawings also export the document and all objects that appear on it. The
connectivity between items in the package is also exported.

Folders export all objects contained in that folder.

Bridges export all the items that make up that Bridge definition. They do
not however export the object that is referenced by the linksets. If you
want these objects to be exported as part of the Bridge you should put the
bridge and the linked objects in a folder and export that folder.

To import a Package select a folder from one of the Explorer windows and
then select the Import Package menu option. This displays the Import
Package dialog from where you can specify the name of the file to be
imported. All items in the Package are imported into the selected folder.
During import, the case names in the Package file are matched against the
case names in the current workspace. If new cases are found then they are
created. All objects in the package are created as new objects in the
Workspace.
Note: Data from the Global class is not imported.

Exporting a Package
Select the Folder | Export Package menu option to display the Export
Package dialog. This allows you to specify the package file name and to
enter descriptive data about the contents of the package file. The selected
object can then be exported as a Package.

11 Explorer

185

Importing a Package
Select the Folder | Import Package menu option to display the Import
Package dialog. Use this dialog to specify the Package you wish to import. It
displays a file name and other data that will help to describe and identify the
package file. You can enter a Title, Description, Category and a Purpose.
These just enable you to describe the package and are not used by Aspen
Basic Engineering.

Packages Folder
Package files may be placed in the folder defined by the PACKAGES
parameter in the workspaces config. file. To use this file press the Library
button. Alternatively you can specify the folder for your packages by pressing
the Browse button. You can see which folder is being used for the export or
import of the package files in the Current Folder box.

Query Editor
The Query Editor is used to send Ad-hoc queries to the workspace.
The queries are Visual Basic Scripts that can be typed in to the top half of the
window or loaded from a file. The scripts have access to the same automation
objects and methods as a Rule in a KB script. In addition a Response object is
exposed which supports a "Write" method. All the text written to the
Response object will appear in the bottom half of the window when the query
has completed.
For example the following is a simple query to report the names and
descriptions of all pumps in the workspace:
'List all pumps
Response.Write "Name"
Response.Newline
Response.Write "----"
Response.Newline
' Output name and description
For Each pump in ClassStore.FindClass("Pump").Members
Response.Write Pump.DisplayName & " " & Pump.Description
Response.Newline
Next

186

11 Explorer

When the submit button is pressed the output for the query is displayed in
the lower pane.
Alternatively the response can be modified to return html or xml as shown:
<HTML>
<TABLE>
<TR>
<TD> Name </TD>
<TD> Description </TD>
</TR>
<%
'List all pumps

11 Explorer

187

For Each pump in ClassStore.FindClass("Pump").Members


Response.Write "<TR>"
Response.Newline
Response.Write "<TD>" & Pump.DisplayName & "</TD>"
Response.Newline
Response.Write "<TD>" & Pump.Description& "</TD>"
Response.Newline
Response.Write "</TR>"
Response.Newline
Next
%>
</TABLE>
Now if after you submit the query you choose the View Response as Web
Page item from the view menu, the results are displayed as a web page.

Adding a Query
You type your query into the top Query window using VBScript statements.
When you press the submit button the query is copied to the Aspen Basic
Engineering server where the script is interpreted and run on the server
machine. Each Response.Write statement in the query writes to the servers
response buffer. When the query completes its execution on the server, the
contents of the Response buffer are copied back to the Query Editor on your
client machine and displayed in the bottom Response window.

188

11 Explorer

The Aspen Basic Engineering Query


Language
The Aspen Basic Engineering Query language uses VBScript. This help does
not attempt to be a reference for how to use VBScript for which you should
see one of the many texts available or Microsofts web site. Instead it will just
explain those special considerations needed to use VBScript with Aspen Basic
Engineering.
The Aspen Basic Engineering Query language has access to the objects in the
AZDBQuery library. These are documented in the online Library Object
Reference listing, AZDBQuery.chm (see on-line help).
When you write a script you do not create the objects from the AZDBQuery
directly. Instead four global objects are available. They are:
Name

Class Name

Description

Response

AZQResponse

Writes to the servers text buffer which is returned at


the end of the call to the server

ClassStore

AZQClassStore

The VBScript object containing the definitions of the


data model classes and methods to access them and
objects of those classes

ObjectStore

AZQObjectStore

Provides methods for accessing all the Aspen Basic


Engineering objects in the Aspen Basic Engineering
database

Globals

AZQGlobals

Provides access to the datamodel definitions, that is


class definitions, attribute definitions class view
definitions etc

The full list is in the Library Object Reference.


Response is a reference to The Response Object.
You will frequently start a script by using the ClassStore global. One of its
most useful methods is FindClass. This returns a COM object that represents
the Aspen Basic Engineering class. This is an AZQClass object. You could then
use the Members property of the AZQClass object to loop through all the
Aspen Basic Engineering objects in a workspace that belong to the class you
specified in the FindClass method.
For example:
for each obj in ClassStore.FindClass("GenericClass").Members

next
Here FindClass(GenericClass) will find all Aspen Basic Engineering objects
that are of GenericClass or whose class derives from GenericClass. If you look
at any class in the CLE you will see that ultimately it derives from
GenericClass, so the above example will loop through every item in the
workspace.
The obj variable holds an AZQObject object. Each of these automation objects
corresponds to an Aspen Basic Engineering object in the workspace such as a
pump or port. You can therefore use the methods of the AZQObject class to
query an Aspen Basic Engineering object. Typically you will want to examine

11 Explorer

189

an Aspen Basic Engineering objects attributes which you can do with script
like:
for each ZyqadObject in
ClassStore.FindClass("GenericClass").Members
set ObjectsAttributes = ZyqadObject.Attributes
next
The attributes are again returned as an automation object. In this case, of
class AZQAttributeCollection. This class supports an enumerator so that it can
be used in for each loops and an item property to allow individual attributes
to be accessed.
E.g.:
set ObjectsAttributes = ZyqadObject.Attributes
for each Attr in ObjectsAttributes

next
or
set ObjectsAttributes = ZyqadObject.Attributes
for i = 1 to ObjectsAttributes.Count
set Attr = ObjectsAttributes(i) Item is the default property

next
Note that in both cases the Aspen Basic Engineering attribute is accessed
through a class, this time called AZQAttribute (see Events).
Unless the Aspen Basic Engineering attribute contains another Aspen Basic
Engineering workspace object or is a vector, the value of the attribute can be
retrieved using the AZQAttributes Value property. So the attributes value
could be displayed with:
response.write Attr.Value
For example, the following attempts to write all the attributes of the Aspen
Basic Engineering GlobalsClass.
Set ZyqadObject = ObjectStore.FindObject(1)
Set ObjectsAttributes = ZyqadObject.Attributes
For i = 1 To ObjectsAttributes.Count
Set Attr = ObjectsAttributes(i) ' Item is the default
property
response.write Attr.Value
response.Newline
Next
This example starts by using the ObjectStore global. One of its methods
allows you to retrieve an object by specifying its OID. Every object in the
Aspen Basic Engineering workspace has a unique Object Identifier or OID. As
this is not engineering data it is not normally displayed to the user, although

190

11 Explorer

you can choose to display it in the Explorer. The above example takes
advantage of the fact that the GlobalsObject has an OID of 1.
However if you try to run this example it will almost certainly produce an
error such as Invalid Index. This is because some of the attributes are
vectors and the Value method must supply the index for an array.
Therefore the script should be modified to print out each element of the
array, e.g.
For i = 1 To ObjectsAttributes.Count
' Item is the default property
Set Attr = ObjectsAttributes(i)
response.write Attr.DataTypeName
If Attr.IsVector Then
For j = 1 To attr.Count
set v = attr.Val(i)
response.write Attr.Value
response.Newline
Next
Else
response.write Attr.Value
response.Newline
End If
The IsVector property returns true if the attribute is a vector. But this
example may still not work because the value returned for an attribute could
be another object or not set. Neither of these can be written to the response
buffer which is expecting a string variable. Therefore an error will be
produced. So the example must guard against these:
Set ZyqadObject = ObjectStore.FindObject(1)
Set ObjectsAttributes = ZyqadObject.Attributes
For i = 1 To ObjectsAttributes.Count
Set Attr = ObjectsAttributes(i) ' Item is the default
property
If attr.DataType <> azqDataTypeObject Then
If Attr.IsVector Then
For j = 1 To attr.Count
If attr.HasValue(j) Then
response.write Attr.DataTypeName & " "
response.write Attr.Name & "( "
response.write i & " ) "
response.write Attr.Value( i)
response.Newline
End If
Next
Else
If attr.HasValue Then
response.write Attr.DataTypeName & " "
response.write Attr.Name & " "
response.write Attr.Value
response.Newline
End If
End If
End If

11 Explorer

191

Next
In the above example the type of each attribute is obtained by the DataType
property. This is tested to check that an attribute does not represent an
object.
The HasValue property returns true if the attribute has a value. Note how an
Index is supplied to test if the element of a vector has a value. This example
could be further refined to get the attributes of the intermediary objects
which are currently ignored. Getting the attributes for an intermediary object
is just like getting them for the parent object. So in the example the
intermediary object can be obtained with additions like:
If attr.DataType = azqDataTypeObject Then
Set IntermediaryObject = attr.Value
or value(index) for a vector
End if
IntermediaryObject is an AZObject just like ZyqadObject in the earlier
example.

Class Views
As well as getting all the attributes of an object you can get the attributes for
a Class View. To do this you should get an AZQClassView automation object
representing the ClassView you want. You do this by using the FindClassView
method on the ClassStore global object, in a similar way to which classes are
found using the FindClass method.
E.g.:
set API610ClassView = ClassStore.FindClassView("API610")
To use this ClassView for a particular Aspen Basic Engineering object you
need to get an object that represents the implementation of that ClassView
for a particular Aspen Basic Engineering object.
For example:
set PumpClass = ClassStore.FindClass("CentrifugalPump")
for each pump in PumpClass.Members,
set ClassViewImplementation = pump.View(API610ClassView)
next
ClassViewImplementation is an object of class AZQView. This class has
Attribute and Attributes properties in a similar way to an AZQObject and
these are used to get the attributes values.

192

11 Explorer

Units of measure
Values are stored internally in Aspen Basic Engineering in SI units. If you
simply use the Value property of the AZQAttribute or AZQViewAttribute
classes you will get the SI value. Values can also be returned in other units.
The Value properties can take an optional argument which is the units for that
attribute. If this is supplied then the value returned will be in those units.
For example:
Val = Attr.Value(1, ft3/s)
Will return a value in ft3/s for the first element in a vector. If the particular
units are not valid for that value then an error is raised.
To find out which units are valid for an attribute you need to get its attribute
definition. Both the AZQAttribute and AZQViewAttribute classes have a UOM
property which will return the units string for the attribute. You must specify
the unit set.
For example:
UnitString = Attr.UOM(US) Attr can be AZQAttribute or
AZQViewAttribute class
You can get the list of unit sets in the Aspen Basic Engineering class store
with the UOMSetNames property of the AZQClassStore class.
UOMSets = ClassStore.UOMSetNames
To get the capacity of a pump in all UOMs you could use a script containing:
UOMSets = ClassStore.UOMSetNames
Set PumpObject = ObjectStore.FindObject(8) 8 is the OID of this pump
For Each UOMSet in UOMSets
Response.write "UOMSet: " & UOMSet
UOM = PumpObject.Capacity.UOM(UOMSet)
Response.write " Units: " & UOM & " "
Response.write Pump.Capacity.Value(UOM)
Response.NewLine
Next
PumpObject.Capacity in the above example is an example of a dynamic
property. See KB Dynamic Properties for more information. Note also that
PumpObject is an automation object and is assigned with the Set operator.
UOM is a variant and is simply assigned.
All possible available units for an attribute can be found by examining an
attributes physical quantity.

11 Explorer

193

For example:
Get the definition of the capacity attribute
set AttDefn = Pump.Capacity.Definition
Get the physical quantity for the attribute
set QuantityType = AttDefn.QuantityType
Get the UOMS for the quantity type
UOMS = QuantityType.ValidDisplayUOM
Response.write The Pumps capacity is output using all available
units
Response.NewLine
For each UOM in UOMS
Response.write Pump.Capacity.Value(UOM)
Response.write & UOM
Response.NewLine
Next

Cases
All the values returned in the previous examples have used a default Case,
called the governing case. Cases, like objects, are identified internally by
Aspen Basic Engineering with an integer ID, called the CaseID. If you wish to
get the values for a particular case you need to call the Value property with
the optional CaseID argument.
For example:
Val = Att.Value(2, m/s)
See AZQObjectStore, under Events, for the properties useful when using
cases.

Cases Example
Get the governing case ID from the ObjectStore global
ActID = ObjectStore.GoverningCase
Get its name
ActName = ObjectStore.CaseName(ActID)
Response.Write The current case is & Globals ActName
Get all cases
AllCases = ObjectStore.GlobalCases
Response.NewLine
Write out how many there are
NoCases = ubound(AllCases)
Response.Write "There are " & NoCases & " Cases. "
Write out each cases name
For Each CaseID in AllCases
Response.NewLine
Response.Write "
" & ObjectStore.CaseName(CaseID)
Next

194

11 Explorer

Script to output the values for the pump capacity in each case could be
For Each CaseID in AllCases
Response.NewLine
Response.Write Value:
Set cap=pump.Attribute(Capacity,CaseID)
Response.write cap.Value(m^3/h)
Response.Write Case:
Response.Write "
" & ObjectStore.CaseName(CaseID)
Next

The Response Object


The Query Editor supports the Response global object. This is actually an
instance of the AZQResponse class. It is used for building up a text string, or
response buffer on the server which is returned to the client when the script
has completed. It is the servers response to the client.
Its two most frequently used methods for writing queries are the Write and
NewLine methods. But it also contains some methods that allow the response
to be written more easily in an XML format.
Some of the most useful methods of AZQResponse are:
Method

Description

Write (string)

Writes the string into the response buffer

NewLine

Writes a NewLine character into the response buffer

StartXMLDocument

Starts an XML document (adds the header)

EndXMLDOcument

Completes the XML document started with


StartXMLDocuemt

StartElement

Writes an open XML element to the response buffer

EndElement

Closes the element opened by WriteElement

WriteElement

Writes a complete XML element to the buffer

NewAttributeSet

Returns a new AZQXMLAttributeSet object

The methods of AZQXMLAttributeSet are:

11 Explorer

Method

Description

Add (attr, value)

Creates an XML attribute of the form attr=value

Clear

Clears all attributes from this set

195

Example of Creating XML


response.StartXMLDocument()
'create the attributes for the first element
set attr = Response.NewAttributeSet
attr.Add "AnAttribute", "abc"
'start the first element using the above attributes
Response.StartElement "First" , attr
'reuse the attributes object for the next (child) element
attr.Clear
attr.Add "AValue", True
Response.WriteElement "child1", attr
Response.WriteElement "child2", Nothing, "some data"
'End the first element
Response.EndElement
response.EndXMLDocument
This will produce the output
<?xml version="1.0"?>
<First AnAttribute="abc">
<child1 AValue="1"/>
<child2>some data</child2>
</First>
which can be viewed directly as a web page by choosing View response as a
web page from the view menu.
As well as using the Response object, text can also be written directly to the
response buffer by placing it outside of the scripts. To do this you need to
enclose your scripts with <% and %> symbols. Then anything outside of
these is written into the response buffer. If your query only consists of a
script then these symbols can be omitted as with most of the examples.

Class View Example


This example lists the attributes in the API610 class for all centrifugal pumps.
It formats the response into HTML so that it can be viewed as a web page.
It illustrates writing text directly to the response buffer, using class views and
also shows how to get the attributes for an object that contains intermediary
objects.
<HTML>
<% 'needed because the query contains non scripting text
sub ReportOnView(view, prefix)
'writes out all the attributes in the class view. If an
attribute is an object then this function is called again
For Each attr in view.attributes
'this routine calls itself, a prefix is added each time in
if prefix = "" then
newprefix = attr.Name
else
newprefix = prefix & "." & attr.Name
end if
'Test if the attribute contains an object

196

11 Explorer

if attr.DataType = azqDataTypeObject then


'Test if it is a vector
if attr.IsVector then
For i = 1 To attr.Count
'handle the error from missing values
on error resume next
set v = nothing
set v = attr.Val(i)
Clear the error code and raise errors again
Err.Clear
On Error goto 0
If Not v Is Nothing Then
' v is the class view instance for the intermediary
object.
ReportOnView v, newprefix & "(" & i & ")"
End If
Set v = Nothing
Next
Else ' scalar
on error resume next
set v = nothing
set v = attr.Val
Err.Clear
on error goto 0
If Not v Is Nothing Then
ReportOnView v, newprefix
end if
end if
Else ' not an intermediary
if attr.IsVector then
For j = 1 To attr.Count
Response.Write "<TR>"
Response.Newline
Response.Write "<TD>" & newprefix & "</TD>"
Response.Newline
On Error Resume Next
If attr.HasValue(j) Then
Response.Write "<TD>" & attr.Value(i) & "</TD>"
Else
Response.Write "<TD>" & "not set" & "</TD>"
End If
Err.Clear
On Error goto 0
Response.Newline
Response.Write "</TR>"
Next
Else
Response.Write "<TR>"
Response.Newline
Response.Write "<TD>" & newprefix & "</TD>"
Response.Newline
on error resume next
if attr.HasValue then
Response.Write "<TD>" & attr.Value & "</TD>"
else
Response.Write "<TD>" & "not set" & "</TD>"
end if

11 Explorer

197

Err.Clear
on error goto 0
Response.Newline
Response.Write "</TR>"
end if
end if
next

end sub
'close this piece of script so that more literal text can be written
%>
<TABLE>
<TR>
<TD> Route </TD>
<TD> Value </TD>
</TR>
<% ' next script
'Get the pump class
set c = ClassStore.FindClass("CentrifugalPump")
'Get the class view we want to report on
Set cv = ClassStore.FindClassView("API610")
'loop through all pumps
For Each o in c.Members
' get the class view instance for each pump
Set v = o.View(cv )
' call the subroutine defined above
ReportOnView v, ""
Next
%>
</TABLE>

198

11 Explorer

Query Editor Menus and Options


The Query Editor has the following menus and options:

File Menu
The File menu contains the following commands:
Command

Action

Open Query

Allows you to navigate to and open an AZ Script (.azq format) query


file

Close Query

Allows you to save the current query file (in .azq format) under a
new name

Close
Window

Closes the Query Editor window

View Menu
The Edit menu contains the following commands:
Command

Action

View Response as Web


Page

Allows you to view the response as a Web page (HTML


format)

Submit button
The Submit button has the following effect:
Command

Action

Click Submit

Submits the current query

Asynchronously checkbox
The Asynchronously checkbox has the following effect:
Command

Action

Unchecked

The application waits until the submitted request is returned

Checked

Returns the submitted request immediately

In addition the edit window supports these accelerator keys

11 Explorer

Ctrl-C Copy.

Ctrl-X Cut.

Ctrl-V Paste.

Ctrl-A Select All.

Ctrl-Y Redo last action (following Undo).

Ctrl-Z Undo last action.

199

Logging on to Workspaces and


Projects
Note: Before attempting to log on to a Workspace or Project, ensure you
have a valid username and password for the item(s) you wish to connect to,
or obtain one from your Administrator.
The Open Workspace menu/toolbar option is only active if no
Workspace/Project is currently open.

Logging on to a Preferred
Workspace/Project

200

In the Explorer window, click File | Open Workspace to open the Open
Workspace dialog:

In the Workspace/Project Name field, select the name of a preferred


Workspace/Project from the list displayed.

Click Open to log on to the selected Workspace/Project and close the


Open Workspace dialog.

11 Explorer

Logging on to a User Specified


Workspace/Project
1

In the Explorer window, click File | Open Workspace to open the Open
Workspace dialog.

Click Browse to open the Select Workspace or Project dialog.

Navigate through the tree view of Workspaces/Projects and select


required Workspace/Project.
Note: If you do not have access rights to log on to a Workspace or
Project, the title is grayed out.

Click OK to add the Workspace/Project to the list of preferred items in the


Open Workspace dialog.

Select the Workspace/Project from the list of preferred items in the Open
Workspace dialog and click Open to log on to the selected
Workspace/Project and close the Open Workspace dialog.

Logging on to a Workspace/Project via a


URL Address
1

In the Workspace/Project field, type the URL and name of a known


Workspace/Project.

Click Open to log on to the selected Workspace/Project and close the


Open Workspace dialog.

Connecting as a Different User


Note: Please ensure you have permission from your supervisor before
connecting to a Workspace/Project as a different user.
To log on to a Workspace/Project as a different user:

11 Explorer

In the Explorer window, click File | Open Workspace to open the Open
Workspace dialog.

Select the Connect as a different user link to open the Connect As


dialog.

Enter a valid username in the Connect As field and the password in the
Password field.

Select/deselect the option to use the new username and password by


default in the future, as required.

Click OK to enter the new details and close the dialog.

201

Change Advanced Connection Settings


This option allows you to specify the name of the server to connect to and the
protocol to be used for authentication.
To change advanced connection settings:
1

In the Open Workspace dialog click the Change advanced connection


settings link to open the Advanced Connection Settings dialog.

Enter (type) the required server name in the Server Name field.

Select the required authentication protocol from the drop-down list in the
Authentication Protocol field.

Select/deselect the option to use these settings by default in the future,


as required.

Click OK to enter the new details, close the dialog and retain the settings,
or Cancel to close the dialog without saving the settings.

Invalid Username/Password
If you open the Open Workspace dialog and attempt to log on to a
Workspace/Project using an invalid username and/or password (i.e., you do
not have authority to connect to the selected Workspace/Project, but your
username and password are valid for other Workspaces/Projects), the Log-On
Error dialog is displayed warning that you do not have access to the selected
Workspace:
1

202

Click the OK button to close the dialog and return to the Open Workspace
dialog:

11 Explorer

Select a Workspace/Project you are authorized to use and click OK, or


click the Connect as a different user link to log on using another
identity.
Alternatively, click Cancel to abort the operation.

Incorrect Username/Password
If you open the Open Workspace dialog, then the Connect As dialog and enter
an incorrect username and/or password, the Log-On Error dialog is displayed
warning that your user name and/or password is invalid:

11 Explorer

Click OK to close the dialog and return to the Connect As dialog:

Enter your correct user name and password to access the selected
Workspace.

203

Invalid Business Server


If an unknown business server is specified in the Advanced Connection
Settings dialog, the LogOn Error dialog is displayed stating that the requested
server cannot be found:

204

Click OK to close the dialog and return to the Advanced Connection


Settings dialog.

Enter the correct server name (and Authentication Protocol option) to


access the selected Workspace.

11 Explorer

Invalid Authentication Protocol


If you attempt to log on to a Workspace/Project using an authentication
protocol not supported on the local domain, the LogOn Error dialog is
displayed indicating that the particular authentication protocol requested was
not recognized:

11 Explorer

Click OK to close the dialog and return to the Advanced Connection


Settings dialog:

Enter the Authentication Protocol option to access the selected


Workspace/Project.

Click Open to log on to the selected Workspace/Project.

205

Invalid Workspace/Project Name


If you attempt to log on to a Workspace/Project using an invalid or unknown
name (or the system cannot find the specified item) the LogOn Error dialog is
displayed indicating that the system cannot connect to the specified
Workspace/Project.
1

2
3

Click OK to close the dialog and return to the Open Workspace dialog:

Reselect the Workspace/Project name.


Click OK to connect to the selected Workspace/Project.

Closing the Workspace


To close the Workspace:
1

In the Explorer window click File | Close Workspace to close the


currently open Workspace/Project.

Managing Workspaces
Privileges, Roles and Users
Aspen Basic Engineering check uses a Privilege/Role/User model to control
access to resources.

206

11 Explorer

Privilege: A specific right that the system tests to determine if an action


can be performed. For example, Read privilege is tested before read
access to an object is granted.

Role: A collection of privilege assignments that define the rights of a


particular type of user. For example, the Owner role defines the rights an
owner of the Workspace has.

User: A user is an individual that has access to the Workspace and may be
granted one or more roles.

For a Role each Privilege may be granted, denied or left unspecified, using the
Workspace Explorer it is possible to change the Privileges that a Role has on a
per-object basis.
A user may also be a Windows group in which case all members of that group
share the Roles assigned to the group. The Roles a user has through group
membership are referred to as implicit Roles whereas Roles assigned
directly to a User are referred to as explicit Roles.
Whether a user has a privilege is determined by applying the following rules
in sequence:
1

An explicit Role for the User is granted the Privilege on the object:
The User is granted the privilege

An explicit Role for the User is denied the Privilege on the object:
The User is denied the privilege

An implicit Role for the User is granted the Privilege on the object:
The User is granted the privilege

An implicit Role for the User is denied the Privilege on the object:
The User is denied the privilege

An explicit Role for the User is granted the Privilege globally:


The User is granted the privilege

An explicit Role for the User is denied the Privilege globally:


The User is denied the privilege

An implicit Role for the User is granted the Privilege globally:


The User is granted the privilege

An implicit Role for the User is denied the Privilege globally:


The User is denied the privilege

No Role the user has specifies a state for the Privilege:


The User is denied the privilege

General Privileges
Administrator: This privilege is checked when a user tries to add/modify the
Roles and Users for a Workspace or an Object in the Workspace.

Object Privileges
Read: This privilege is required to be able to view the data of an object. Note
that if Write privilege has been granted then the system treats Read privilege
as being implicitly granted.

11 Explorer

207

Write: This privilege is required to be able to modify data for an object.

Attribute Privileges
Lock Attribute: The privilege required to be able to Lock an attribute.
Override Attribute Lock: If the user has this privilege then they can
override a Lock that has been placed on an attribute.
Secure Attribute: The privilege required to secure an attribute and to view a
secured attribute.

Discipline Privileges
TrespassDiscipline: If this privilege is granted then the User does not have
to be granted the Discipline specific Modify privilege to change attributes.
Modify_Discipline_Data: If TrespassDiscipline is not granted and the
attribute has a specific Discipline then the privilege must be granted to
change the attribute.

Document Privileges
Issue Document: A user must have this privilege to be allowed to issue a
document (i.e., a datasheet or a diagram).
Check Document: A user must have this privilege to be allowed to check a
document.

Drawing Editor Privileges


Author Drawing: The privilege required to create and edit a drawing (other
than mark-up).
View Drawing: The privilege required to view a drawing.
Markup Drawing: The privilege required to apply mark-up to a drawing.
Export Drawing: The privilege required to be able to export a drawing.

208

11 Explorer

Bridge Privileges
Bridge User: The privilege required to open and run a Bridge.
Bridge Definer: The privilege required to create and design a Bridge.

Workspace Components
The example below shows a typical installation, including the example
Workspace az13x.
C:\AspenZyqadServer\BasicEngineering13x\
WorkspaceLibraries/
LibrarySets.lst A file list the default library sets available when creating a
workspace.
StandardLibrarySet.cfg and or TEFLibrarySet.cfg The configuration setting
for workspaces using the Standard or TEF library set.
ClassLibraries/
*.azcs Files containing compiled sets of class and view, composite view,
enumerations and UOM definitions. Delivered .azcs files should not be edited
and can be extended with the Class View Editor.
KBs/
*.azkbs The script files for rules and methods.
*.azkbx The compiled form of the above files.
Symbols/
The tree of drawing symbols accessed by the Drawing Editor.
Templates/
The collection of Datasheet and Label template files.
Workspaces
Workspaces.lst - A file listing the names and locations of the Workspaces that
can be accessed on the computer.
PeerBrokers.lst A file listing the other Data servers that can be accessed
from this machine if it is used as a Business Server.
AZ13x/
The working directory for the example AZ13x workspace.
Workspace.cfg The configuration settings for the workspace.
Privileges.xml The user and roles for this workspace.
Workspace.mdb the Access database that store the object data (when using
Access)
Workspace.udl the RDB connection configuration file. Never copy this to
another workspace directory.

11 Explorer

209

Configuration Management
Configuration Files
Configuration settings are used to control a number of aspects of Workspace
behavior, for example:

What Class Store is to be loaded and therefore what classes and class
views are available.

Which directory to look in for Templates, which governs which datasheets


will be available for the Datasheet Editor and what labels will be available
for the Drawing Editor.

Which directory to look in for KB scripts and which KB scripts to load.

In Aspen Basic Engineering, configuration settings may be defined in one of


two places:

In the Workspace.cfg of the Workspace. This is always located in the


working directory of the Workspace

Or, in a library set cfg file, typically located in the WorkspaceLibraries


directory (e.g., StandardLibrarySet.cfg or TEFLibrarySet.cfg).

Library sets allow an Administrator to create predefined sets of configuration


options that correspond to the requirements of different projects. The list of
available library sets is recorded in the LibrarySets.lst file which contains
lines in the following format:
LIBRARY Standard StandardLibrarySet.cfg The standard
library
Note: The # character can be used to prefix lines which are for comments.
When the user creates a Workspace using the wizard in the Administration
Tool one of the required options is the Library Set to use. The user must
choose a set that is listed in the LibrarySet.lst file.
When the workspace is created the choice of library set is written to that
Workspaces Workspace.cfg file with a line of the form:
LibrarySet = Standard
When a LibrarySet is defined for a workspace the configuration file
corresponding to that file is loaded and its setting merged with those
contained the Workspace.cfg file. Settings in the Workspace.cfg file take
precedence over those in the library set.
Note: LibrarySet and all other configuration parameters can only hold a
single value. If a parameter is defined twice it is the last definition used.
Where a configuration parameter is a file location, relative paths may be
used. The path will be resolved with respect to the location of the
configuration file.

210

11 Explorer

Configuration Parameters
Configuration parameters are added with software updates. The correct and
up-to-date list of parameters is available from the Administration Tool on-line
help.

Configuring the Symbol Library Path


UNC Paths
The symbol library path must refer to the same directory for all client
machines using the workgroup, so you need to use a U(niversal) N(aming)
C(onvention) path to identify the directory if the workgroup is to be accessed
from more than one client machine.
A UNC path describes the path to a directory that is the same for all clients on
the network. Its format is:
\\<machine>\<share name>\<directory path>
The elements of the syntax are:

<machine> This is the network name/address of the machine holding


the directory.

<share name> This is the name of the share on the machine.

<directory path> This identifies the directory.

Defining a Network Share


You define a network share from Windows Explorer, as follows:
1

Select the folder that you want to share. For the standard installation, this
is:
C:\AspenZyqadServer\Basic Engineering16.1\
WorkspaceLibraries

From the File menu, click Properties and go to the Sharing tab.
You can also do this from the right-click menu.

Enable the Shared As radio button.

Type in a share name and set the User Limit and Permissions.

Tip: All users of the client machines must have at least read access to the
share and to the symbol library. Aspen Basic Engineering PFD accesses the
share using the permissions of the users' current login account on the client
machine, not the login account on the Aspen Basic Engineering server, so you
must account for this when defining permissions for the share.

11 Explorer

211

Troubleshooting SymbolLibrary Path


These tips help you troubleshoot problems with the symbol library path:
Path name is incorrect in the Server configuration file:
Check that the symbol path name in the server configuration file matches the
machine name, share name and path on the server.
Name Translation Problems:
With an incorrectly configured WINS server, the client cannot translate 'short'
server machine names in the UNC path, to IP addresses. For example,
\\ServerMachine\Library would not work because there is no translation for
ServerMachine in the client domain.
The simplest way to test for this problem is through Windows Explorer. If the
problem is present, the Map Network Drive command responds with the
"Network Path Not Found" error. Alternatively, you can test name translation
using the ping command.
It is difficult to configure WINS, here are some recommendations:

Substitute the 'long' (fully qualified domain) name of the server machine
in the symbol library path. For example,
\\ServerMachine.subnet.domain.com\Library\Symbols
will use the DNS lookup.
Alternatively:

Substitute the IP address of the server machine in the symbol path (for
example, \\00.00.00.00\Library\Symbols. This may be necessary if the
DNS server has no translation for the long name.
-or-

Update the lmhost table on the client machine.

Domain Security:
There may be issues relating to security policy on the domains, the
permissions granted to the client login account, and the nature of the
permissions applied to the share.
The simplest way to investigate problems with security is to use Windows
Explorer from the client account that is experiencing the difficulty. When
investigating, you will also want to know what domain/account the client is
using (press CTRL-ALT-DEL to display the security dialog).
From Windows Explorer, use the Map Network Drive command to map to the
share name on the UNC path. This should give error dialogs that describe the
security issue. Note that, when using Map Network drive, do not specify an
account in the Connect As field; leave this blank in order to use the current
login account, as this is what our software will use.
A brief summary of the security requirements between the domains would be:

212

Server domain must 'trust' the client domain/username.

Server must allow network logins by the client domain/username.

Share must allow appropriate read/write access by everyone, or by the


client domain/username.

11 Explorer

Configuring Descriptive Text Options


Descriptive text is a facility that allows users to enter text into numeric fields.
Three categories of Descriptive text are supported Prefixes, Postfixes and
Substitutions. The valid values for each category are defined in a text file. The
default file is WorkspaceLibraries\ClassLibraries\DescriptiveText.txt.
An example of its format is:
[PrefixText]
At least
Greater than
No more than

The list of Prefix options start here

[PostfixText]
and higher
and lower

The list of Postfix options start here

[SubstitutionText] The list of Substitution options start here


Trace
Manufacture Recommendation

This file can be edited in a plain text editor. Note also that new entries or
flexibility are added to descriptive text during software updates. Check the
Administration Tool on-line help for more information and check the delivered
DescriptiveText.txt. A software update will not update this file if you have
modified it.

Configuring the Stockpile View Tabs of the


Drawing Editor
The stockpile view in the Drawing Editor provides a means for viewing
existing objects in the Workspace according to different organizations. The
Views available in the Stockpile are defined using an XML file that is specified
by the configuration parameter StockpileViewTabs. The default file is
WorkspaceLibraries\ClassLibraries\StockpileViewTabs.xml
The basic structure of the file is as follows:
<StockpileViewTabs> Start of the list of Views
<DrawingItemView Name="ByObject"> Start of a View called ByObject
<View Name="All Plant"> Start of a tab for this view
<FilterClass Name="SizeReductionEquipment"/>
Name of a class of object to include in the view
</View> End of the list of classes for the current tab
<View Name="...">
...
</View>

Start of the Views Second Tab

</DrawingItemView> End of the ByObject View Definition


</StockpileViewTabs> End of list of Views

11 Explorer

213

Broker Configuration
The configuration of the Broker and Broker Service Account are liable to
change subsequent to changes delivered by Microsoft Operating System
Service Packs. For example significant changes have been made to
accommodate XP Service Pack 2 and Windows Server 2003 Service Pack 1
due to shifts in DCOM security.
For this reason, up-to-date information is maintained in the Administration
Tool on-line help and is liable to change during software updates. Please
consult the detailed help available.

Configuring the Broker to Support


Automated Creation of Oracle RDBs
To allow the Create Default Oracle Workspace option in the Create
Workspace Wizard to work, the Broker.ini file must be manually edited to
include the following settings:

OracleServiceName: Set this to the name of the default Oracle instance to


use, as registered with the Oracle Listener service.

OracleUserName: This is the username that the Aspen Basic Engineering


Broker service will use to connect to oracle when creating a new
workspace.

OraclePassword: The password for the above account, unless native


windows authentication is being used.

OracleTablespaceSize: The default size of the Tablespace that will be


created in Oracle for the Workspace.

The Oracle User Name given must have sufficient privileges to be able to
create Tablespaces and Users in Oracle and to query for existing Tablespaces
and Users.
In addition the oracle parameter db_create_file_dest (based on Oracle 9i)
must have also been set. (We recommend this parameter is set to a nondefault value to prevent the setting being lost when Oracle is restarted.)

214

11 Explorer

Setting the oracle db_create_file_dest


parameter:
1

Launch the Oracle Enterprise Manager Console.

In the tree control on the left hand side navigate down to the chosen
Oracle instance.

Right-click on this node to get the context menu and select View | Edit
Details

On the General tab click the All initialization parameters button.

Scroll down the table to the db_create_file_dest row (this is in the File
Configuration category).

In the Value column enter the directory location where oracle data files
should be created by default.

If you are using an SPFile - make sure that you save the
"db_create_file_dest" value in both the Running and the SPFile.

The default actions taken for Oracle are:


1

A new Tablespace is created in Oracle based on the Workspace name plus


an integer postfix to resolve name collisions.

A new User is created in Oracle with the same name as the Tablespace,
the new users default Tablespace is the new Tablespace.

The new User is explicitly granted Connect and Resource privileges.

Note: If you get an error message that the db_create_file_dest is not set,
follow the procedure outlined below.
1

Log into OEM (Oracle Enterprise Manager) with sysdba rights.

Go into Storage/Tabelspaces and pick an Aspen Basic Engineering table.

Highlight the file directory and copy it.

Go into Instance | Configuration.

Click on the All Initialization Parameters... button.

While Running is selected, paste the file directory into the


db_create_file_dest value.

Click Apply (this changes the running instance).

Then change from Running to SPFile.

Scroll down to the db_create_file_dest value and paste in the value for the
file directory.

10 Click Apply (now it is saved for the next time you start up the Oracle
database).
You can also make this change in SQLPlus - you have to do "create pfile from
spfile". (This places the file into the default "dba" directory.)

11 Explorer

Edit the "init<sid>.ora" file that is generated, then select create spfile
from pfile.

Restart the database to complete the operation.

215

Setting up Aspen Basic Engineering to AutoCreate Oracle Workspaces in the Administration


Application
Create an Oracle User e.g. XYZ
1

Create a user in the Oracle enterprise Manager Console

Set the password e.g. XYZ

Grant the user the following roles (need ADMIN option):

Grant the user the following system Privileges:

Configure the Oracle database:


1

Launch the Oracle Enterprise Manager Console.

Select your database name under the Databases .node. Right click and
select View/Edit details.

On the General tab select the All Initialization Parameters button.

Set the property db_create_file_dest to the directory below which


Oracle stores the data files e.g. C:\oracle\oradata.

Configure the Aspen Basic Engineering Broker:


1

Open the Broker.ini file (C:\Program Files\AspenTech\Aspen Basic


Engineering\DataServices\bin).

Add/Edit the following section:


OracleServiceName= "felim"
OracleUserName= "XYZ"
OraclePassword= "XYZ "
OracleTablespaceSize= "20M"

where the OracleServiceName is the Oarcle service name for the database.
This can be viewed/set in the Oracle Net Manager application (under the
Service Naming node) on the Aspen Basic Engineering server machine.

Configuring the Broker to Support


Automated Creation of SQL Server RDBs
To allow the Create Default SQL Server Workspace option in the Create
Workspace Wizard to work, the Broker.ini file must be manually edited to
include the following settings:

216

11 Explorer

SQLServerName: Set this to the name of the default SQL Server to be


used.

SQLServerAdminUserName: Set this to the user name to use to connect


to the SQL Server instance.

SQLServerAdminPassword: The password for the Admin account above.

SQLServerDatabaseUserName: The default user name to be used by the


Workspace server when connecting to SQL Server.

SQLServerDatabasePassword: The password for the above user name.

If the SQL Server instance has native Windows authentication enabled then
the last four parameters can be omitted provided the user account of the
Broker service has been given access to the SQL Server instance.

Configuring an Oracle RDB Manually for an


Aspen Basic Engineering Workspace
The key requirement when configuring an Oracle RDB manually is that each
Workspace is mapped to a unique Oracle User. It is also recommended that
each Oracle User is assigned a separate permanent and temporary
Tablespace.

Creating an Oracle based Workspace called Test


1

Launch the Oracle 9i Enterprise Manager and log on the Oracle Database
to be used.

Create a Permanent Tablespace ZTest:

11 Explorer

Navigate to Storage | Tablespaces on the tree view.

Right mouse click on the Tablespaces node and select Create.

In the Create Tablespace dialog enter ZTest for the name and make
sure that in the Type section that the Permanent option is checked.

Click Create.

Create a Temporary Tablespace ZTestTemp:


o

Navigate to Storage | Tablespaces on the tree view.

Right mouse click on the Tablespaces node and select Create in the
Create Tablespace dialog. Enter ZTest for the name and in the Type
section ensure the Temporary option is checked (do not check Set
as Default Temporary Tablespace).

Click Create.

Create an Oracle User ZTest:


o

Navigate to Security | Users on the tree view.

Right mouse click on the Users node and select Create.

In the Create User dialog enter ZTest for the name.

Enter and keep a record of the password.

In the Tables spaces section for Default select the permanent


Tablespace created in step 2 (i.e., ZTest) and for Temporary select the
temporary Tablespace created in step 3 (i.e., ZTestTemp).

217

On the Roles tab, ensure both the Connect and Resource options are
added to the granted roles, and (recommended) on the System
Privileges tab specify the Unlimited Tablespace option is added to
the granted roles.

Click Create.

Create the Workspace using the Aspen Basic Engineering Administration


Tool:
o

Launch the Aspen Basic Engineering Administration Tool.

Start the Create Workspace command.

Click Next.

Fill in the general information and select Oracle as the database type.

Click Next.

Check the Create Manual Workspace option.

Enter the name of the Oracle database to be used for the Oracle
Server. Enter the name of the Oracle User created at step 4 (i.e.,
ZTest) for the Oracle Username and enter the password for the Oracle
User in the Password field.

Click Next.

Click Finish.

Configuring a SQL Server RDB Manually for


an Aspen Basic Engineering Workspace
With SQL Server it is a requirement that each Workspace is assigned a
separate database and that the Aspen Basic Engineering server is provided
with an account that has the following roles granted in the database:

218

db_ddladmin

db_datareader

db_datawriter

11 Explorer

Creating a SQL Server based Workspace called


Test
1

11 Explorer

Set up the ZyqadAdministrators group as a recognized login in SQLServer


(this step need only be done once for each SQL Server Instance):
o

Start the SQL Server Enterprise Manager.

In the tree view open the SQL Server instance to be used and go to
the Security | Logins node.

Right mouse click and select New Login.

Enter the Name ZyqadAdministrators.

Check the Window Authentication option and under domain select


the local machine name.

Click OK.

Create the SQL Server Database:


o

Start the SQL Server Enterprise Manager.

In the tree view open the SQL Server instance to be used and go to
the Databases node.

Right mouse click and select New Database.

Enter the name, e.g., ZTest" and click OK.

Under the new database select the Users Node the


ZyqadAdministrators user should be listed under. Right mouse click
and select Properties for ZyqadAdministrators.

Make sure the roles db_ddladmin, db_datareader, and db_datawriter


are checked.

Click OK.

Create the Workspace:


o

Launch the Aspen Basic Engineering Administration Tool.

Start the Create Workspace wizard.

Click Next.

Fill in the general information and select SQL Server as the database
type.

Click Next.

Check the Create Manual Workspace option.

Enter the name of the SQL Server instance for SQL Server hostname,
and the name of the Database created (e.g., ZTest) for Database
Name. The Username and Password fields may be left blank as
Window authentication is being used.

Click Next.

Click Finish.

219

Creating a Peer-to-Peer Network of Brokers


You can use the Administration tool to create a peer-to-peer network of Data
Servers allowing all Workspaces of all Data Servers in the network to be
accessed independently of the Data Server the user is connecting to.
To set up a peer-to-peer network:
1

Ensure you are logged on as a user with Aspen Basic Engineering


Administer privilege.

Ensure the Broker Service Account is a domain account. A local account is


not sufficient to operate peer-to-peer brokers.

Start the Administration tool.

Right click the Aspen Basic Engineering Workspaces node to display the
context menu.

Select Edit | Data Servers from the main menu.

A list of the current peer servers is displayed, allowing you to add and
remove computers.

The list of peer servers for a computer is recorded in the file


"PeerBrokers.lst", located in the same directory as the Workspaces list file
(Workspaces.lst).

Projects within Aspen Basic


Engineering
A project within Aspen Basic Engineering is an isolated piece of work whose
changes are only visible to users logged on to that Project. Projects typically
are used for numerous purposes including:

Modifying an existing as-built plant: Modifications can be made in a


project so the main design is unaffected. Once the modifications have
been carried out to the physical plant then the project can then be
committed, at which point the changes will be applied to the main
design.

Design alternatives: During a design, different topology options can be


created and analyzed, each in its own project. Once the preferred design
alternative is identified then the corresponding project can be committed
to the main design and the projects for the other alternatives discarded.

Segregating a design: A design can be broken up into a number of


sections, each section being a project, so that users would work on the
section(s) that they have been given access to. On completion of sections
the corresponding projects would be committed to create a single
contiguous design.

A project can be further broken-down into sub-projects, and those subprojects can also be broken-down into sub-projects. Projects can be
considered to exist within a workspace in a Project Tree and there is no limit
to the number of levels for the tree. Within a workspace there is 1 Root
project at the top of the tree, typically the main design, and this exists by

220

11 Explorer

default. Every project, except the Root project, will have a project above it in
the tree i.e. its Master project.
For workspaces to register to a Smartplant plant only one level of projects
below the root project is allowed.
Note: There may be multiple projects executing at the same time and each is
independent of the other. All projects share the same configuration settings,
but may have different users, roles and privilege settings.

Managing Projects
Projects within Aspen Basic Engineering are managed from the AZ Explorer
application.
Before you can work on a Project, you must log on to it. You can log on to
different Projects in different applications but an application can only be
logged on to one project at one time. The project you are logged on to is
defined as the Active Project for that session.

Privilege Settings for Projects


Each project can have independent privilege settings (its own lists of Users
and Roles). These lists can optionally be initialized from the list of its Master
Project when the Project is created.
Privileges Settings for Management of Projects comprise:

11 Explorer

Create Project: A user must have this privilege in the Active Project to
create a new sub-Project.

Update Project: A user must have this privilege in the Active Project to be
able to update the Project from its Master.

Commit Project: A user must have this privilege in the Active Project and
in the Master to be able to Commit the Active Project changes to the
Master. Having Commit Project privilege implicitly includes the Update
Project privilege.

Delete Project: A user must have this privilege for a Project to delete the
project from its master.

Claim: A user can claim objects in a project.

Unclaim: A user can unclaim objects in a project.

221

Logging On To a Project
Logging On To a Project for the First Time

222

In any Aspen Basic Engineering end user application select File | Open
Workspace to open the Open Workspace dialog.

Click Browse to open the Select Workspace or Project dialog:

Navigate through the tree view of Workspaces/Projects and select


required Workspace/Project. Projects that the current user does not have
access to will be grayed out or hidden. A project will be grayed out if the
user doesnt have access to that project but it does have access to one of
its sub-projects.

Click OK to add the Workspace/Project to the list of preferred items in the


Open Workspace dialog.

Select the Workspace/Project from the list of preferred items in the Open
Workspace dialog and click Open to log on to the selected
Workspace/Project and close the Open Workspace dialog.

11 Explorer

Logging on to a Previously Accessed Project


This procedure allows you to log on to a previously accessed project.
1

Launch any of the Aspen Basic Engineering end user applications and
select File | Open Workspace to open the Open Workspace dialog.

In the Workspace/Project Name field, select the name of a preferred


Workspace/Project from the list displayed.

Click Open to log on to the selected Workspace/Project and close the


Open Workspace dialog.

Project Management Dialog


Projects are managed through the Project Management dialog in the AZ
Explorer application. This dialog allows management of activities such as:

Access to the current project.

Updating of the current project.

Creating, deleting, committing the current projects sub-projects.

Viewing properties of the current projects sub-projects.

To access the dialog, launch Basic Engineering Explorer and select Edit |
Project Management. The options on this dialog allow you to create,
update, commit, and delete sub-projects of the currently selected project.

11 Explorer

223

Creating a New Project


This procedure allows you to create a new project.

224

Select Edit | Project Management from the Explorer menu.

Click Create to open the New Project Details dialog:

Enter a sub-project name in the Name field and optionally, a description


of the sub-project in the Description field.

To copy Users (create a new project and copy all users from the parent
project as default users for the new project), check the Copy Users box.
To copy Roles (create a new project and copy all roles from the parent
project as default roles for the new project), check the Copy Roles box.
Alternatively, leave these boxes unchecked if you do not wish to copy
Users or Roles for the project, in which case the current user is added to
the project and to the role owner.

Click Create to create the new sub-project using the specifications set in
the New Project details dialog. A confirmation message is displayed if the
creation is successful:

Click OK to close the message.

11 Explorer

Creating a New Project


After logging onto a workspace in the Explorer, you can create a new project.
You will have the choice of copying roles and/or users from the parent project
to the new project.
Note: You must have the Create Project privilege in order to create a
project.
To create a project:
1

In Explorer select Edit Project Management. The Project


Management dialog appears showing the existing projects, if any.

Click Create.
The system determines from Smartplant which projects are available for
creation and presents a pull-down list of the projects.

11 Explorer

225

Select a project and click OK to confirm.


The system prompts you to specify whether roles and/or users should be
copied from the parent to the new project.

Select the Create button to complete the project creation.


The system displays a confirmation dialog.

226

The new project will be listed as an available sub-project in the project


management dialog:

11 Explorer

Updating a Project
In a Project, to be able to see changes that have occurred in its Master the
Project must be updated. A link on the Project Management dialog indicates
whether or not the projects master has changed and therefore an update is
possible.

To update a project:
1

In Explorer logon to the project that is to be updated and open the


Project Management dialog Edit | Project Management.

A link is displayed at in the Manage Projects dialog advising if the master


project has been changed.
If you select this link to initiate, an update report is produced which lists
all the updates to be carried out as well as the conflicts that the user must
resolve. Refer to Conflict Resolution for more detail.

11 Explorer

On examining the updates and resolving all the conflicts click OK to


update the project and return to the Manage Projects dialog.

227

Committing a Project
Before the changes in a Project can actually be committed to its Master any
conflicts must be resolved. This is done by performing an update, see above.
If the update has not been carried out the commit will be prevented.
This procedure allows you to commit a sub-project to the database. (A user
must have this privilege in the Active Project and in the Master to be able to
Commit the Active Project changes to the Master. Having Commit Project
privilege implicitly includes the Update Project privilege.
1

Select Edit | Project Management from the Explorer menu.

Select a sub-project from the list displayed in the Sub-Projects column.

Click Commit. The system compares the project to its parent to confirm
the project is up to date with respect to its parent. If so, a message is
displayed advising that the sub-project was committed successfully.
If the project is not up to date with respect to its parent, then the Commit
button will be disabled. If the committal is accepted, the project is
committed to its parent and the project is made read-only.

Click OK to close the message and return to the Manage Projects dialog.

Deleting a Project
When a project is finished or cancelled, you may want to delete it.
Note: To delete a Smartplant project, the Smartplant project status must be
either Finished or Cancelled, otherwise the Delete button will be disabled.
This procedure allows you to select an existing sub-project and delete it from
the database.

228

Select Edit | Project Management from the Explorer menu.

Select a sub-project from the list displayed in the Sub-Projects column.

Click Delete, the Delete Project Confirmation message is displayed


allowing you to continue with the deletion, or cancel and return to the
Manage Projects dialog:

If you want to delete the sub-project click OK.

11 Explorer

Conflict Resolution (Manage Conflict)


Before the changes made in a Project can be committed to its Master any
changes made in the master must be applied to the project i.e. the project
must be Updated. Conflicts between the project and the master will exist if
the same item has changed in both. As part of the project update process the
user is asked to resolve any conflicts that exist.

Cases
Case Deleted in the Master but still Exists in the
Project
A case existing in the project but not in the Master does not necessarily mean
that the case was created in the project. The original case may have been
deleted from the Master project.
If the Project has modified values in the now deleted case there are two
possible resolutions:

Re-instate the case (in which case conflict resolution occurs).

Delete the case and lose any changes made to attributes in that case.

If the project has no modified values in that case, the case should be deleted.

Case Created in the Project but Does Not Exist in


the Master
If a case with the same name already exists in the Master project (because
the Project and Master independently created the same named case) there
are two ways to resolve the conflict:

Rename the case in Project.

Decide both cases are the same. If either case is global the merged case
will also be global.

By choosing to unify the two cases, all attributes in the Project that exist in
the case will have to be re-assigned to the Masters case.
The case name in the master cannot be modified within the conflict resolution
procedure. The user could login to the Master and rename to remove the
conflict. In such a case the conflict would not appear on a subsequent project
update.

11 Explorer

229

Case Deleted in the Project but Still Exists in the


Master
When a case is deleted, all attributes in that case will have been deleted in
the project. If values have been modified for the deleted case in the Master,
the following conflict resolutions are possible:

Re-instate the case.

Delete the case and discard all attribute values in the Master for the
specified case.

Case Renamed in both the Project and the Master


When the same case exists in both the Project and Master, the scope of the
case (Global/Local) must be the same (the scope of an existing case cannot
be modified). The name of the case may have been changed in both the
Project and Master.
To resolve this conflict you can either:

Keep the new name in the Master.

Keep the new name in the Project (in which case proceed as below).

If the case has been renamed in the Project, and it now clashes with a
different case in the Master (new or renamed), the resulting options are the
same as those in the previous section Case Created in the Project but Does
Not Exist in the Master.
Allowing merging of cases (deciding the Project and Master case are the
same) in this situation would mean checking the entire database for attributes
defined in the project case (as this case was not newly created in the Project
it may have much wider scope than the current Project).

Primary Objects
An object in the project is the same object as that in the Master if they both
have the same ObjectID. The object may also be the same if it has the same
name as an existing object.

230

11 Explorer

Object Deleted in the Master but Still Exists in the


Project
An object existing in the project but not in the Master does not necessarily
mean that the object was created in the project. The original object may have
been deleted from the Master project. If the project has modified values on
the now deleted object there are two possible resolutions.

Re-instate the object (in which case conflict resolution occurs as detailed
below).

Delete the object and lose any changes made to its attributes.

Even if the project does not have any modified values on that object, you
should still decide whether to re-instate or delete the object as other changes
made to the project may have been predicated on the object existing.

Object Created in the Project but Does not Exist


in the Master
For certain classes of object the name of the object is important. For example
major equipment items. For other types of object the name is not important
(i.e. Folders, Documents). For those object types with important names, if an
object with the same name already exists in the Master project (because the
Project and Master independently created the same named object) there are a
number of ways to resolve the conflict:

Rename the object in Project.

Decide that having two identically named items is acceptable.

Object Deleted in the Project and Still Exists in


the Master
Values on the deleted object (or one of it's contained sub-objects) may have
been modified in the Master.
The following conflict resolutions are possible:

11 Explorer

Decide to keep the object from the Master.

Delete the object and discard all attribute values in the Master for the
specified object.

231

Object Exists in both the Project and the Master


If the class of the object has been changed in both the project and the Master
the following conflict resolutions are possible:

Keep the new class from the project.

Keep the new class from the Master.

For those object types with important names. If the object has been renamed
in both the Project and in the Master the user can choose to either:

Keep the new name from the Master.

Keep the new name from the Project (in which case proceed as below).

If the object has been renamed in the Project, and it now clashes with a
different object in the Master (either new or renamed), the user can choose
from the same options presented in the previous section Object Created in
the Project but Does not Exist in the Master.

Attribute Items
Either the value, or the status of the value (Lock/Hold/Secure) may have
been changed in either or both the Project or the Master.
Immediate Attributes - Immediate attributes are the simple types (i.e.
String/Real/Bool/Date/Enum). A conflict occurs when both the Project and
Master value (or status) have been changed since the last update.
Scalar/Vector - To resolve the conflict the user can instruct the system to
overwrite one of the values with the other, either:

Keep the value/status from the project.

Keep the value/status from the master.

Collections - A collection is a set of values which are added to/removed from


rather than simply overwritten (as in the case of a vector where the position
of the values is important). There is no conflict between the Project and the
Master attribute when merging the differences. Starting with the current
project collection, add what has been added in the Master and remove what
has been removed in the Master. Note that the order of values in the
collection may change.

232

11 Explorer

Object Attributes
An object attribute is an attribute that contains another object or objects. A
conflict occurs when both the Project and Master value (or status) have been
changed since the last update.
Scalar/Vector - A conflict occurs when there are more/less or different
object(s) in the attribute.
This can be resolved by:

Selecting which attribute routes are to be kept from the project and which
are to be kept from the master.

The selections could result in either objects in the project having some/all of
its data overwritten with data from the Master or new objects being created
for the attribute in the project.
Collections - A collection is a set of objects which are added to/removed from
rather than simply overwritten (as in the case of a vector where the position
of the objects is important). There is no conflict between the Project and the
Master attribute when merging the differences. There may, however, be
conflicts between the contained objects. Starting with the current project
collection, add the objects that have been added in the Master and remove
the objects that have been removed in the Master. Note that the order of the
objects in the collection may change. Each object in the project collection
should be compared with the same object (same OID) in the Master to
resolve any additional conflicts.

Object Associations
An object association is one that references another object or objects. A
conflict occurs when both the Project and Master value (or status) have been
changed since the last update. Resolution of a conflict between an association
in the Project and the Master does not require conflicts between the
referenced objects to be checked.
Scalar/Vector - A conflict occurs when there are more/less or different
object(s) referenced by the attribute.
This can be resolved by:

Keep the value from the Project (no comparison of sub-objects required).

Keep the value from the Master (no comparison of sub-objects required).

Collections - There is no conflict between the Project and the Master attribute
when merging the differences. Starting with the current project collection,
add the objects that have been added in the Master and remove the objects
that have been removed in the Master. Note that the order of the objects in
the collection may change.

11 Explorer

233

Conflict Interdependency
There are conflicts whose resolutions are inter-dependent. For example, if in
the Master a case is deleted that has changes in the Project you cannot
choose to both delete the case and keep the changes in the Project. Similarly
the resolution of one conflict may introduce additional conflicts that need to
be resolved. For example choosing to merge a case in the Project with a case
in the Master may introduce new attribute value conflicts.
Some possible inter-dependencies are described below:

Cannot accept deletion of a case and also preserve attribute changes in


that case.

Cannot accept deletion of an object and also preserve attribute changes


on the object.

Cannot accept only part of a graphical change i.e. move an object but not
move connected streams.

Cannot reject changes to a hold and keep attributes held.

Managing Users and Roles


Note: Management of Aspen Basic Engineering users and their roles is
identical whether or not you use Aspen Basic Engineering in conjunction with
Smartplant.

Adding a User to a Project


You must have Aspen Basic Engineering Administrator privilege before you
can add a new user to the project.

234

Launch the AZ Explorer application and log on to a project.

Select Edit | Project Management and the Edit Users button, the
Users dialog is displayed:

11 Explorer

Select Add, the New User dialog is displayed which allows selection of
users and groups:

Select a user name or Group name, the new user/group is added to the
projects member list.

Editing User Properties


You must have Administrator privilege before you can edit the properties of a
project user:

11 Explorer

Launch the AZ Explorer application and log on to a project.

Select Edit | Project Management and select the Edit Users button,
the Users dialog is displayed.

Select a user name from the list displayed and click Edit. The Properties
for User [name] dialog is displayed:

235

Select the Roles tab to edit the Role properties.

Click OK to accept the new properties and close the dialog.

Removing a User from a Project


You must have the Administrator privilege in the project before you can
remove a user from the project:
1

Launch the AZ Explorer application and log on to a project.

Select Edit | Project Management and select the Edit Users button,
the Users dialog is displayed.

Select the name of the user you want to remove from the list of users
displayed.

Click Remove. The user is removed from the projects member list.

Assigning Privileges to Roles


Roles and privileges operate in a very similar manner within a project as they
do within a workspace in Aspen Basic Engineering. However, roles and
privileges within a project are independent of those in its master project.
Roles and users can optionally be copied from the master at the time of
project creation but from that point on they are independent.
Privileges are assigned to selected roles via Edit | Project Management and
then the Edit Roles dialog.
To assign or change the privileges for a role:

236

Launch the AZ Explorer application and log on to a project.

Select Edit | Project Management and select the Edit Roles button, the
Roles dialog is displayed:

11 Explorer

Select the role name you want to modify privileges for and click Edit. The
Properties for Role [role name] dialog is displayed.

Select the Privileges tab to display a list of privileges and their


assignment status.

Select or deselect the options required in the Grant/Deny checkboxes.

Click OK when you have set the new privileges to return to the
Properties dialog.

To reset privileges for other roles, follow steps 3 to 6

Click Close when all role privileges have been set.

Managing the Scope of a Project


Note: These procedures are not applicable when project scope is in relation
to the Smartplant project.
The concept of primary items and parts is introduced in these procedures. A
primary item is a main equipment item e.g. a vessel, whereas a part might be
the vessels agitator or nozzle.
Claiming an item (whether primary or part) results in all its parts being
claimed in the same manner. Therefore if a vessel is claimed exclusively to a
project then all its nozzles are claimed exclusively to the project also.

Adding Objects to the Project Scope


Note: You must have launched an AZ client application and be logged on to a
project to perform these procedures.

Adding a Primary Item Exclusively to the Project


Scope
Select a primary item, or items (e.g. on a drawing or a field on a datasheet or
in a folder) and select the Claim Exclusive command. The item and all its
parts are claimed exclusively to the project scope.
If you open a peer project, and attempt to claim the same item to that
project (either shared or exclusively), the claim is prevented.

11 Explorer

237

Adding a Primary Item as Shared to the Project


Scope
Select a primary item, or items (e.g. on a drawing or a field on a datasheet or
in a folder) and select the Claim Shared command. The item and all its parts
are claimed as shared to the project scope.
If you open a peer project, and attempt to claim the same item to that
project (either shared or exclusively), the claim is prevented.

Adding an Item Part to the Project Scope


This procedure is used if you wish to claim a part of an equipment item as
opposed to the whole item, e.g. claim a nozzle of a vessel. The claim
procedure is the same for a part as for a primary item in the Drawing Editor
(the part must have a dedicated symbol to be claimed) and AZ Explorer.
1

Select a datasheet field that relates to a part and select a claim command
(either Exclusive or Shared), the system presents the primary item and
the part(s), if any, that could be claimed to edit the selected field.
The part(s) presented represent real-world entities and not the abstract
sub-object classes from the data model.

Select the part to be claimed, the system claims (either Exclusively or


Shared) the part and all its constituent parts. You may still edit any data
of the part but not data of the owning item.

Removing a Primary Item or Part from the Project


Scope

238

Select a claimed item, or items (e.g. on a drawing or a field on a


datasheet or in a folder) and select the Un-claim menu option. You are
prompted that removing an item (identified in the prompt) from the
project scope will result in the permanent loss of any data modified for
that item in the course of the project.
Note: If you select a part of a claimed primary item (e.g. agitator of a
claimed vessel), the primary item and all its constituent parts are
removed from the project scope.

Confirm the scope change, the selected item(s) and all constituent parts
are removed from the project scope and any project data for the item(s)
are deleted.

11 Explorer

Selecting a Part and Un-claiming (Primary Item is


Claimed)
This procedure is applicable if you wish to un-claim an item that has an
association to another claimed item where the association between the two
has been modified in the project. For example, if a stream connected to a
vessel is reconnected to a pump, then the vessel cannot be unclaimed without
un-claiming the stream.

Changing a Shared Claim to an Exclusive Claim

Select share claimed item(s) (e.g. on a drawing or a field on a datasheet


or in a folder) and select the Claim Exclusive menu option, the claim for
the item and all its parts is changed to an exclusive one.

Changing an Exclusive Claim to a Shared Claim

11 Explorer

Select exclusively claimed item(s) (e.g. on a drawing or a field on a


datasheet or in a folder) and select the Claim Shared menu option, the
claim for the item and all its parts is changed to a shared one.

239

240

11 Explorer

12 Smartplant

Smartplant is a central data and document repository, data transfer conduit


and a centralized project administration system.
Intergraphs SmartPlant Foundation (SPF) is at the core of Smartplant and is
required to allow Aspen Basic Engineering/Smartplant functionality.
Note: Before you can use Aspen Basic Engineering with Smartplant, a
workspace must be registered with a Smartplant plant database. Consult the
Administration Tool on-line help on how to do this.
The interaction with Smartplant is carried out by using the Smartplant menu
that appears on each of the main end-user application menu bars, namely the
Explorer, Drawing editor and Datasheet Editor. You will find that entries in
this menu are inactive if you are not connected to a workspace that is not
registered with a SmartPlant Database.
Each of the end-user client applications where this menu appears also contain
a specific on-line help book dedicated to the features of the Framework menu.
The menu entries and this help are identical across the applications. The online help covers features such as:

Publishing information to Smartplant

What is published

Retrieving information

Managing retrieved information using ToDo List tasks

Finding documents that need publishing

Browsing Smartplant

Some features interface directly to Intergraph Smartplant tools such as for


browsing. You should refer to the on-line help of the Intergraph tool in these
circumstances to get more information.
As significant new features are being delivered through downloadable updates
to 2006 you need to consult the on-line help provided for the most up-to-date
information on using Aspen Basic Engineering with Smartplant.

12 Smartplant

241

242

12 Smartplant

13 Administration

The Aspen Basic Engineering Administration application is used to administer


Workspaces and display Workspace information in a graphical format. The
Administration tool is a Microsoft Management Console (MMC) snap-in, and
can be combined with other Snap-in components such as the SQL Server
Enterprise Manager to single console for the common administration tasks.
Refer to the Microsoft help on MMC for more information.
The main window is divided into two resizable panes. The left pane displays
the Workspaces that the user has access to, through the currently select
business server, and under each workspace are nodes:

User Management.

Role Management.

Connection Monitoring.

Auditing.

The right-hand pane displays details for the node that is currently selected.
The Action menu lists the commands that can be applied for the node that is
currently selected.
The Adminstration tool has detailed help for the creation of workspaces,
manipulating user access and workspace configuration. In addition the on-line
help covers:

The overall architecture and role of the Aspen Basic Engineering Broker

Useful information about the Broker Services Account

How to use Oracle or SQL Server with Aspen Basic Engineering

Details on configuration parameters

Details on configuring descriptive text used in displaying attributes

How to set up symbol replication to help performance on slow networks

How to use the Aspen Basic Engineering Backup tool

The administration tool help is updated on a regular basis including software


updates. Please use this information as the most up-to-date guide for the use
of this tool.

13 Administration

243

244

13 Administration

14 Bridge

The Bridge application is used to create a bridge allowing two-way data


transfer between an Aspen Basic Engineering workspace and either Microsoft
Word or Microsoft Excel files.
An example of Bridge usage is:

An Excel spreadsheet created to perform a design calculation and loaded


with data from the Aspen Basic Engineering workspace by the Bridge. The
design calculations are performed in Excel through End-User interaction
with Excel.

The Bridge transfers the results of the calculation back to the Aspen Basic
Engineering workspace.

End-users can interact with the transfer process, data can be viewed as it
is transferred and bridge objects can be configured to link data objects in
applications.

New bridges can be defined in the design mode of the application. Using this
mode, you can define links between Aspen Basic Engineering Class views and
the desktop tool. Bridges can also be saved and reused.

Overview of the Interface


Most operations in the Bridge application are performed from the AZ Bridge
window.
To access the AZ Bridge window:

14 Bridge

Launch the Bridge application.

If you are not already connected to a workspace, select File | Open


Workspace to display the Open Workspace dialog and log onto a
workspace.

Click File | New Bridge (or click the New Bridge toolbar icon) to display
the AZ Bridge window.

245

When you first open a bridge, the AZ Bridge window appears in Bridge View.
From this view, you can add application files to the bridge. This is explained in
Creating a Bridge.

After adding an application file to a bridge, you can add a linkset by selecting
an application file and clicking Linkset | New. The AZ Bridge window then
appears in Link View, showing the links contained in a specific linkset.

The Link menu is only available in Link View.


From Link View, you can access the Link Properties dialog by clicking Link |
Properties.
You can add or edit a linkset from either the AZ Bridge windows Link View or
from the Link Properties dialog. Refer to Adding a Linkset for instructions.
Iterative Linksets (refer to Iterative Linksets) can only be added and edited
from the Link Properties dialog.

246

14 Bridge

Bridge View and Link View


Menus
The menus for the Bridge and Link Views are comprised of:

File.

Edit.

View.

Link (not available in Bridge View).

Linkset.

Application (not available in Link View).

Transfer.

Grid.

Help (opens Help associated with the Bridge application).

File Menu
The File menu contains the following commands:

14 Bridge

File Menu
Command

Action

New Bridge

Creates a new (untitled) bridge in the currently open workspace

Open Bridge

Displays the Open Bridge dialog that displays a list of available


bridges to open in the current workspace. Bridge details are
contained in six columns

Close Bridge

Closes the currently open bridge. A Save prompt is displayed if


the bridge has been modified

Refresh Bridge

Updates the data in the Bridge with the current workspace values

Save Bridge

Saves the open bridge in the current workspace

Save Bridge
As

Opens a Save As dialog allowing you to save the bridge with a


new or different name

Bridge
Properties

Opens the Bridge Properties dialog

Open
Workspace

Displays the Open Workspace dialog allowing you to select the


workspace you want to connect to

Close
Workspace

Displays the Bridge Close dialog allowing you to save the open
bridge before closing the current workspace

Synchronize
Names

Rename (or make new copies of) the location names in application
files to match the attribute names (Linkset Bridge View)

Copy Object/
Case Bindings

Copies bindings from an existing (open) bridge into a new bridge


(via the Paste Object/Case Bindings option)

Auto-create
Object
Bindings

Searches all objects in the workspace with an associated classview


and creates one linkset per object (if needed) and then bounds
the linkset (for each defined linkset in the Bridge) to the
respective object

247

File Menu
Command

Action

Export
Package

Writes a package file containing the data for the objects defined in
the current bridge

Recent File

Displays a list of recently opened files

Exit

Exits the Bridge application and closes any connection to the


workspace. A Save prompt is displayed if the bridge has been
modified

Edit Menu
The Edit menu contains the following commands (different options are
displayed according to the window currently open):
Edit Menu Command

Action

Cut

Cuts the selected item to the clipboard

Copy

Copies the selected item to the clipboard

Paste Text

Pastes the selected item from the clipboard

View Menu
The View menu contains the following commands used to show/hide the
associated item:

248

View Menu
Command

Action

Design Mode
Turn On/Off

Turns the Design mode On/Off (toggle). Design mode has to be


on for bridge definition, i.e., for adding and setting the properties
of application files, linksets, and links

Toolbar

Displays/hides the Bridge toolbar

Status Bar

Displays/hides the Status bar at the bottom of the window

Bridge

Opens the Linkset Bridge View window. This is only available in


the Link View

Status Report

Opens the Bridge transfer Report dialog

Error Report

Opens the transfer Error dialog

Change Report

Opens a Change Report dialog showing target, location and old


and new values

14 Bridge

Link Menu
The Link menu (displayed in Link View only) contains the following menu
options:
Link Menu
Command

Action

Properties

Displays link properties

New

Adds a new link to the link grid with default workspace


case and default workspace unit group

Enable

Enables selected link

Disable

Disables selected link

Cut

Cuts the selected link(s) from the link grid and copies it
onto the clipboard

Copy

Copies the selected link(s) onto the clipboard

Paste

Pastes copied link(s) from the clipboard to the linkset


grid

Delete

Deletes the selected link(s) from the link grid

Attribute

Opens the Attribute Selector Dialog. Allows you to select


an attribute for the Class View selected

Write To Location

Sets the Write To location

Read To Location

Sets the Read To location

Case

Sets the case for selected links

Units

Sets the units for selected links. All the selected links
must be in the same unit group.

Formats

Displays dialog for setting the write format for selected


links.

Linkset Menu
The Linkset menu contains the following commands:
Linkset Menu
Command

Action

In Bridge View mode:

14 Bridge

Properties

Opens the Link View and displays Linkset properties

Class view

Opens the Class View Selector dialog allowing you to browse


for a Class View

Object

Opens the Object Select dialog allowing you to select a single


object or multiple objects if the linkset is iterative

Create Object

Used to create an object of a class that implements the class


view set at the linkset

Multi-Create

Allows you to create one linkset for selected objects

Case

Opens the Select Case dialog. Select an unrestricted case for


the selected linksets. A drop-down list is also available in the

249

Linkset Menu
Command

Action

New

Adds a new linkset to the linkset grid with default bridge case
and default bridge unit group

Enable

Enables selected linksets. You can also use the checkboxes


available in the linkset grid

Disable

Disables selected linksets

Delete

Deletes the selected linksets from the linkset grid

linkset grid for setting cases

In Link View mode:


Next

Displays next linkset

Previous

Displays previous linkset

First

Displays first linkset

Last

Displays last linkset

Copy

Copies selected linksets to the clipboard

Synchronize Names

Rename (or make new copies of) the location names in


application files to match the attribute names

Application Menu
The Application menu (not displayed when the application is in Link View
mode) contains the following commands:

250

Application Menu
Command

Action

Launch

Launches the application associated with the selected file in


the bridge

Properties

Displays the Bridge Application File Properties dialog

Location List

Displays the Application Location List dialog and allows you


to display the selected location

Enable

Enables the selected file for data transfer during a bridge


run

Disable

Disables the selected file from being used for data transfer
during a bridge run

Working Directory

Specifies the working directory for checking out files

Add

Displays the Open dialog allowing you to add an application


file(s) to the bridge. A copy of the application file is made
and added to the bridge and saved in Aspen Basic
Engineering database

Add linked file

Adds a linked file (also called template file). The application


file is not copied and added to the bridge/Aspen Basic
Engineering database. The latest version of the file on the
users machine is used

Paste

Allows a copied file to be pasted into the bridge

Save

Saves the selected file back into the bridge

Save As

Displays the Save As dialog

Delete

Deletes the selected item(s)

14 Bridge

Transfer Menu
The Transfer menu contains the following commands:
Transfer Menu
Command

Action

Aspen Basic
Engineering to
Application

Transfers data from Aspen Basic Engineering to the application

Application to
Aspen Basic
Engineering

Transfers data from the application to Aspen Basic Engineering

Autorun

A single-step export of data from Aspen Basic Engineering to


the application file

Autorun with
Pause

Autorun with a pause when application files are instructed to


recalculate to allow end-user interaction at this step

Advanced
Transfers
(with sub-menus)

The advanced options comprise data transfer from:


Aspen Basic Engineering to Bridge
Bridge to Application
Application to Bridge
Bridge to Aspen Basic Engineering

Grid Menu
The Grid menu contains the following commands:

14 Bridge

Transfer Menu Command

Action

Find

Find a cell containing text

Sort Ascending

Sort items in ascending order

Sort Descending

Sort items in descending order

Row Selection Mode

Select grid mode

251

Bridge View Linkset Drop-Down Menus


Two drop-down menus are displayed in the lower pane of the AZ Bridge
window in Bridge View mode allowing Case and Unit Standard attributes to be
specified.
Drop-down Menu Title
Case

Action
Design Default
<Workspace Default>

Unit Standard

<Workspace Default>
Imperial
Metric
SI
US

Bridge View Linksets Grid


Eight columns are displayed in the lower pane of the AZ Bridge window in
Bridge View mode allowing linkset attributes to be specified:

252

Column Title

Action

Enabled

Enabled Yes/No checkbox toggle

Name

Name of the linkset (editable)

Class View

Class View identity (editable), double-click to display Class View


Selector dialog

Object

Object identity (editable), double-click to display Object Select


dialog

Case

Case identity can be selected, or a default is applied

Unit Standard

Details the current unit standard used, selectable from a dropdown list, or a default is applied

Description

Allows a description for the linkset to be entered (editable)

Errors

Notifies if errors are present

14 Bridge

Link View Drop-Down Menus and Fields


Two drop-down menus are displayed on the AZ Bridge window in Link View
mode allowing Case and Unit Standard attributes to be specified.
Drop-down
Menu/Field Title

Action

Name

Linkset identity (editable)

Case

Design Default
<Bridge Default>
<Workspace Default>

Unit Sets

<Bridge Default>
<Workspace Default>
Imperial; Metric; SI; US

Class View

Class view name. Click the icon to select a new Class

Object

Object name. Click the icon to select a new object. If the


iterative checkbox is selected, the Iterative Linkset holds a list
of all objects matching the Class specified
The purpose of the Iterative Linkset is to quickly apply a set
of calculations to a set of objects

Description

Linkset description

Links Grid in Bridge Link View Window


Nine columns are displayed in the lower pane of the AZ Bridge window in Link
View mode allowing linkset attributes to be specified:

14 Bridge

Column Title

Action

Enabled

Enabled Yes/No toggle

Write To

Name of the linkset (editable)

Read From

Read from a linkset

Attribute

Identifies the link attribute

Case

Case identity can be selected, or a default is applied

Aspen Basic
Engineering
Value

Displays the current value

App. Value

Displays the Application value

Units

Details the current unit standard used, selectable from a dropdown list, or a default is applied

Errors

Notifies if errors are present

253

AZ Bridge Window Toolbars


Bridge View Toolbar
When the AZ Bridge window is in Bridge View mode, this toolbar appears:

The Bridge View toolbar contains the following icons:

254

Toolbar
Button

Name

Description

New Bridge

Creates a new bridge file

Open Bridge

Opens an existing bridge file

Save Bridge

Saves the current bridge

Bridge Properties

Displays the Bridge Properties dialog

Design Mode

Turn Design Mode On/Off

Cut

Cuts the selection onto the clipboard

Copy

Copies the selection onto the clipboard

Paste

Inserts clipboard contents

New Linkset

Creates a new linkset

10

Delete Linksets

Deletes selected linksets

11

Properties

Displays Linkset Properties dialog for the selected row

12

Class View

Opens the Class View Selector dialog

13

Object View

Opens the Object View Selector dialog

14

Select Case

Opens the Select Case dialog

15

Enable Linksets

Enable selected linksets

16

Disable Linksets

Disable selected linksets

17

Launch Application

Launches an application file

18

Add Application File

Displays the Open dialog, allowing you to search for and


add an application file

19

Application Properties

Displays properties for the selected application file

20

Enable Selected
Applications

Enables the selected applications

21

Disable Selected
Applications

Disables the selected applications

22

Transfer Aspen Basic


Engineering to
Application

Transfers data from Aspen Basic Engineering to an


application

23

Transfer Application
to Aspen Basic
Engineering

Transfers data from an application to Aspen Basic


Engineering

24

Autorun

Start Autorun

25

Find

Find a cell containing text

26

View Order (A Z)

Sets view/sort order

27

View Order (Z A)

Sets view/sort order

28

Help

Displays Bridge help menu and About Bridge menu

14 Bridge

Link View Toolbar


When the AZ Bridge window is in Link View mode, the following default
toolbar appears below the menu:

The Link View toolbar contains the following icons (all have an equivalent
option within the menus):
Toolbar
Button

Name

Description

Save Bridge

Saves the current bridge

Bridge Properties

Displays the Bridge Properties dialog

Design Mode

Turn Design Mode On/Off

Cut

Cuts the selection onto the clipboard

Copies

Copies the selection onto the clipboard

Paste

Inserts clipboard contents

New Linkset

Creates a new linkset

Delete Linksets

Deletes selected linksets

Properties

Displays Linkset Properties dialog for the selected


row

10

Write To Location

Sets the write to file location

11

Read From Location

Sets the read from file location

12

Attribute

Select the Aspen Basic Engineering attribute

13

Set Case

Select the case for selected links

14 Bridge

14

Enable Linksets

Enable selected linksets

15

Disable Linksets

Disable selected linksets

16

Units

Sets units for selected links

17

Write format

Sets the write format for selected links

18

Bridge View

Toggles the window to Bridge View mode

19

Previous Linkset

Displays the previous linkset

20

Next Linkset

Displays the next linkset

21

Transfer Aspen
Basic Engineering
to Application

Transfers data from Aspen Basic Engineering to


an application

22

Transfer Application
to Aspen Basic
Engineering

Transfers data from an application to Aspen Basic


Engineering

23

Autorun

Start Autorun

24

Find

Find a cell containing text

25

View Order (A Z)

Sets view/sort order

26

View Order (Z A)

Sets view/sort order

27

About

Opens the Bridge on-line help

255

Creating a Bridge
This procedure creates a new bridge and adds an application file in the Bridge
application:
1

Launch the Bridge application.

If you are not already connected to a workspace, select File | Open


Workspace to display the Open Workspace dialog and log onto a
workspace.

Click File | New Bridge (or click the New Bridge toolbar icon) to display
the AZ Bridge window.

Click Application | Add (or click the Paperclip toolbar icon) to display the
Open dialog and select or navigate to an application file (MS Word .doc, or
MS Excel .xls format). Alternative: Drag and drop the application file in
from the File Manager/Windows Explorer.

Click the OK button on the Open dialog to create the new bridge file in the
Bridge application. (Alternatively, an application file can be dragged and
dropped onto the AZ Bridge window.)

The Bridge uses the default Case and Unit Standard settings from the
workspace. These can be overridden via drop-down fields displayed on the
AZ Bridge window.

Click File | Save Bridge to open the Bridge Save As dialog and enter a
name for the bridge. This creates the Bridge object in the workspace and
indicates that the Bridge has been saved. The system immediately
acquires a user lock on the Bridge so that no one else can use it until the
Bridge is closed.

Click File | Close Bridge to close the Bridge. The user lock is now
disabled.

Adding Multiple Files In One Bridge


If a set of files have common mapping and are typically activated
simultaneously, multiple application files can be added and deleted.
Note: The bridge can also exist and be saved with no application files. An
application file needs to be added before doing application data transfer
operation.

256

Launch the Bridge application.

If you are not already connected to a workspace, select File | Open


Workspace to display the Open Workspace dialog and log onto a
workspace.

Click File | New Bridge (or click the New Bridge toolbar icon) to display
the AZ Bridge window.

Click Application | Add (or click the Paperclip toolbar icon) to display the
Open dialog and select or navigate to an application file (MS Word .doc, or
MS Excel .xls format). Alternative: Drag and drop the application files in
from the File Manager/Windows Explorer The files can even be a mixture
of Excel and Word.

14 Bridge

Click the OK button on the Open dialog to create the new bridge file in the
Bridge application. (Alternatively, an application file can be dragged and
dropped onto the AZ Bridge window.)

Repeat steps 4 and 5 for each additional application file (MS Word .doc, or
MS Excel .xls format) you wish to add. You must select the file format
(.xls or .doc) in the Open dialogs Files of Type field if you wish to add
both formats.

Click File | Save Bridge to open the Bridge Save As dialog and enter a
name for the bridge. This creates the Bridge object in the workspace and
indicates that the bridge has been saved. The system immediately
acquires a user lock on the bridge so that no one else can use it until the
bridge is closed.

Click File | Close Bridge to close the bridge. The user lock is now
disabled.

Creating Multiple Links for the Same


Attribute
After you change the units at the individual link level, the bridge performs a
number of checks throughout the opened bridge.
It checks if there is another link which uses that attribute with the same class
view. If a match is found, and the individual link units are different, a system
prompt asks if you wish to make the units the same, see below:

This prompt implies that objects in the respective links need not be the same.
Also the links need not be in the same linkset.
From this prompt, clicking Yes or No either updates or discards the related
link's units. The system then continues to look for other links with the same
attribute and class view.
If you select Cancel or close the dialog, the related link's units are not
changed, and further searching is abandoned.
Selecting Yes to all updates the units on this link and any other related links
in the bridge without prompting.

14 Bridge

257

Checking Only change links in linkset.. causes only links in the same
linkset to have their units updated. So if the currently displayed related link is
not in the same linkset as the original change, no change is made to its units,
even if you click Yes or Yes to all.
For example in the above dialog, if you check Only change links in linkset
Linkset: 1-LS1 and click Yes or Yes to all, no change is made to the units
of Linkset: 2 - LS2 Link: 1.

Conversion between Template Files (Linked


Files) and Bridge Files (Application Files
Added to Bridge)
Template files are used when the requirement is to always use the latest
version of an application file. Bridge files are used when the requirement is to
persist any manual entries and bridge transfers.
To change a template file to a bridge file:

Select the application icon representing the Template File and, from the
Application menu or Context menu, select the Convert to Linked File
command.

To change a bridge file to a template file:

Delete the bridge file and copy in the template file.

Object/Case Bindings
Copying and Pasting Object/Case Bindings
When working on a bridge in the workspace, it is possible to copy and paste
existing Object/Case Bindings (to prevent having to recreate them
individually).
This is achieved by importing the package containing the newly defined bridge
into your workspace (the new bridge does not have any object bindings/case
bindings), then copying object and case bindings from the source (existing)
bridge to the target (newly imported) bridge.

To Copy/Paste Bindings

258

Open a target bridge in the AZ Bridge application.

Right-click and select Copy Object/Case Bindings, or select the File |


Copy Object/Case Bindings menu option. A dialog is displayed with a
list of available bridges in the current workspace.

From the list, select the bridge you want to copy object bindings from.

Select the target bridge to copy the bindings into.

Check the newly created bindings and then either Save or Discard the
changes.

14 Bridge

System Conditions:

The system only attempts to copy bindingsfrom named linksets in the


source bridge to the target bridge (unnamed linkset are ignored).

Bindings are copied by matching names and classviews of the linksets in


the source and the target bridgeif the target bridge does not have at
least one linkset with the same name and classview as the linkset from
the source bridge the system is attempting to copy bindings from, that
linkset and others in the source bridge with the same name are skipped.

If there are multiple linksets in the source bridge with the same name and
at least one linkset in the target bridge with a matching name and
classviewthe copy operation ensures it creates additional linksets in the
target bridge, so that the number of identically named linksets in the two
bridges match and the bindings are copied.

If there are multiple linksets in the source bridge with the same name but
with differing class view settingsthe system attempts to copy the first
one it finds while scanning the source bridge and the ones compatible to it
(those with same name and class view), and ignores the others (those
with a different classview from the first one found with the same name).
(A message concerning any linkset in the source bridge that is missed
from the copying process is added to the error report.)

If while attempting to copy object bindings the system finds the target
linkset already has the object binding setan overwrite/do not
overwrite binding prompt is displayed.

The system will not copy links contained in the linkset in the source
bridge. If new linksets are created in the target bridge, links in the newly
created linkset are copied from the one matching linkset found in the
target bridge.

Auto-Creation of Object Bindings


It is possible to auto-create object bindings if:

A new bridge is imported into a workspace with some linksets with


classviews set but no object bindings (and the workspace contains several
objects).

All objects in the workspace implementing the associated classview are found
for each defined linkset in the bridge, and one linkset per object is created (if
needed) and bound to the respective object.

14 Bridge

259

To Auto-create Object Bindings


1

Using the AZ Explorer, import a new bridge into the workspace.

Open the bridge in the AZ Bridge application, then right-click and select
Auto-Create object bindings from the menu option. The workspace is
scanned to find objects that implement the class view set at the linkset for
each linkset in the bridge. One linkset per object found is created and
bound to the object, copying the links existing in the linkset into each
newly created linkset patterned after the functionality that currently exists
in the Bridge application for the Multi-Create Linkset menu option.

Check the newly created bindings and then either Save or Discard the
changes.

System Conditions:

If for a particular linkset no objects are found that implement the class
viewthat linkset is skipped.

If class view is not set at a linkset the linkset is skipped. A message


about this is added to the error report.

If more than one linkset with the same class view is found in the
bridgethe first one is used in the Multi-Create process and the
subsequent ones are skipped. A message for each skipped linkset is added
to the error report.

If a linkset is found that already has an object setit is skipped. A


message is added to the error report.

Linksets are created for all objects that implement the classview - you are
not prompted to specify the objects.

You are prompted once to specify format information for the generation of
location names. The same choices are applied to all linksets.

Multi-Creation of Linksets without Object


Bindings
The dialog displayed from the Multi-create linkset menu item includes an
option (checkbox) allowing you to multi-create linksets without creating
object bindings.
To specify this option, uncheck Create object bindings (checked by
default). You can then specify the number of linksets to create without object
bindings.
You also need to specify the location name generator for this case (in the
usual way).

260

14 Bridge

Editing an Existing Bridge


1

Launch the Bridge application.

If you are not already connected to a workspace, select File | Open


Workspace to display the Open Workspace dialog and log onto a
workspace.

Click File | Open Bridge (or click the Open Bridge toolbar icon) to display
the Open Bridge dialog.

Select the bridge to open from the list displayed and click OK to open the
AZ Bridge window.

Edit the bridge as required and when completed, click File | Save Bridge
to save the changes and update the workspace.

Click File | Close Bridge to close the bridge. (The user lock is now
disabled.)

Closing the Bridge Without Saving


If you attempt to close the bridge without saving, a prompt is displayed
asking you to confirm whether changes are to be saved or not. Unsaved
changes are lost if No is selected.

14 Bridge

261

Adding a New Linkset


The actions described in the following steps can be made in the AZ Bridge
windows Link View or in the Linkset Properties mode. Both views allow data
to be entered via menu options, editable columns/rows, or dialogs, check
boxes and drop-down menus.
1

Launch the Bridge application.

If you are not already connected to a workspace, select File | Open


Workspace to display the Open Workspace dialog and log onto a
workspace.

Click File | Open Bridge (or click the Open Bridge toolbar icon) to display
the Open Bridge dialog.

Select an application file in the bridge and click Linkset | New. A new
blank row is displayed for the new Linkset.

Select Linkset | Class View to display the Class View Selector dialog and
navigate the class hierarchy and select the class.

Select the Case Name. A list of the Cases in the workspace is available for
selection via a drop-down list. If a Case is not specified, the linkset uses
the bridge or workspace default (represented as <default>). The Case
Name for the default is also displayed.

Enter the Unit Standard name. A list of the current Unit Standards
specified in the workspace is available for selection via a drop-down list. If
the Unit Standard is not specified, the linkset uses the bridge or
workspace default Case (represented as <default>). The actual Unit
Standard name for the default is also displayed.

Enter the object instance name to use with the linkset. An Object Select
Dialog displays all the objects in the workspace of the Class specified. If
the Class has not yet been specified, the browser displays all objects.
When an object is selected, if the Class has not yet been set, it is set to
the selected objects Class.

Enter a name for the linkset. The default will be the objects name.

10 Text containing information or instructions can be entered in the


Description field.
11 Using the information from the links contained in the linkset, the system
displays the derived export and import status.
12 Enable/disable the linkset by checking/unchecking the Enabled box in the
Linkset Editor, or selecting Enable or Disable from the Linkset menu
option.
13 When completed, click File | Save Bridge to save the changes and
update the workspace.
14 Click File | Close Bridge to close the bridge.
Note:

262

Linksets can also be edited using standard cut/copy/paste operations to


duplicate existing linksets from this bridge and from other bridges.
Linksets can also be created for multiple objects.

14 Bridge

Editing Linksets
The actions described in these steps can be made in the AZ Bridge windows
Link View or in the Linkset Properties mode. Both views allow data to be
entered via menu options, editable columns/rows, or dialogs, check boxes
and drop-down menus.
1

Launch the Bridge application.

If you are not already connected to a workspace, select File | Open


Workspace to display the Open Workspace dialog and log onto a
workspace.

Click File | Open Bridge (or click the Open Bridge toolbar icon) to display
the Open Bridge dialog, select a bridge and click the OK button.

In the AZ Bridge window, select the linkset row to be edited.

Highlight the field to be edited and modify the data as required.


Note: Cut/Copy/Paste Operation.
Linksets can also be edited using standard cut/copy/paste operations to
duplicate existing Linksets from this bridge and from other bridges.

Enable/disable the linkset by checking/unchecking the Enabled box in the


Linkset Editor, or selecting Enable or Disable from the Linkset menu
option.

When completed, click File | Save Bridge to save the changes and
update the workspace.

Click File | Close Bridge to close the bridge.

Iterative Linksets
An Iterative Linkset is a variation of the standard linkset. The Iterative Linkset
holds a list of all objects matching the Class specified. List items can be
selectively enabled or disabled.
The purpose of the Iterative Linkset is to quickly apply a set of calculations to
a set of objects. An example would be to do a pump-head calculation for all
centrifugal pumps in an Excel worksheet. There would be a single set of
locations which correspond to the pump variables.
There are three alternatives to creating an Iterative Linkset:

Make a copy of the bridge for each centrifugal pump.

Create a bridge with linksets for all of the pumps. Disable all pump
linksets except for the first. Execute the bridge. Repeat this procedure for
each pump.

Create a separate sheet for the maximum number of pumps in the single
spreadsheet, and use an indexed numbering system for the locations.
(This alternative causes the spreadsheet to be very big, performance to be
poor, and consistent modifications will be difficult to manage across all of
the sheets.)

Note: Only one Iterative Linkset per Excel and Word Bridge can be enabled.

14 Bridge

263

Creating and Editing an Iterative Linkset


1

Launch the Bridge application and connect to a workspace.

Click File | Open Bridge (or click the Open Bridge toolbar icon) to display
the Open Bridge dialog, select a Bridge and click the OK button.

Click Linkset | Properties (or click the Linkset Properties toolbar icon) to
display the Linkset Properties dialog.

Check the Iterative box and select Link | New to display a blank row for
the new Iterative Linkset.

Enter a route for the Class. If necessary, use the Class View Selector
dialog to navigate the class hierarchy and select the class.

Enter the Case Name from the drop-down list of the Cases in the
workspace. If the Case is not specified, the Iterative Linkset uses the
bridge or workspace default (represented as <default> in the Case field).

Enter the Unit Standard name from the drop-down list of current Unit
Standards specified in the workspace and available for selection. If the
Unit Standard is not specified, the Iterative Linkset uses the bridge or
workspace default Case (represented as <default>).

Enter a name for the Iterative Linkset. The default is the objects name.

Enter text into the Description field for documentation or instructions on


how to use.

10 Using the information from the Links contained in the Iterative Linkset,
the system displays the derived export and import status. Iterative
Linksets can be persistently enabled or disabled.
Note:
Cut/Copy/Paste Operation.
Iterative Linksets can be edited using standard cut/copy/paste operations to
duplicate existing Iterative Linksets from this bridge and from other bridges.

Conversions between Iterative Linksets


and Linksets
Iterative Linkset to Linkset:

Select an Iterative Linkset row and uncheck the Iterative box to convert
it to a linkset. The title in the Object field **Iterative** is removed. If
there is a list of objects in the Iterative Linkset, the first object is used in
the linkset.

Linkset to Iterative Linkset:

264

Select a linkset and check the Iterative box to convert it to an Iterative


Linkset. The title in the Object field changes to **Iterative**. The system
uses the class information to create the list of objects.

14 Bridge

Export Package
Packages exported from the Bridge contain the data of the linked objects
saved externally in an XML format. They can then be used to transfer data
between workspaces. They are imported into other workspaces by using the
Import Package option from the Workspace Explorer. This provides a
mechanism for organizations, sites or projects to collaborate with each other.
To create a package:

Select the Export Package menu option when you are in the Bridge View.
This displays the Export Package dialog from where you can specify the
name of the file to be exported.
The following is exported:
o

Data for those objects that are referenced by an enabled linkset. Only
data for those attributes that appear in links are exported. This is
different to exporting a package from the explorer where all the data
for an object is exported.

All enabled application files. These are exported to the same location
as that specified for the package file.This option can be switched off by
clearing the Include Application File check box.

Exporting a Package

Select the Folder | Export Package menu option to display the Export
Package dialog.
This allows you to specify the package file name and to enter descriptive
data about the contents of the package file. The selected object can then
be exported as a Package. The Include Application File check box should
be checked if you wish to also export the enabled application files with
your package. This option is selected by default.

Packages Folder
Package files may be placed in the folder defined by the PACKAGES
parameter in the workspaces config. file. To use this file click the Library
button. Alternatively you can specify the folder for your packages by pressing
the Browse button. You can see which folder is being used for the export or
import of the package files in the Current Folder box. Application files are
not exported if you have selected to export the package to the PACKAGES
folder.

14 Bridge

265

266

14 Bridge

15 Drawing Application
Automation Objects

This chapter contains information on using the Intergraph RAD development


platform to extend the functionality of the Aspen Basic Engineering drawing
application.
Note: Any modifications to the Aspen Basic Engineering application detailed
in this chapter should only be carried out by suitably qualified developers or
programmers. This information is not intended for end-users.
To develop AddIns for the Aspen Basic Engineering Drawing Editor, your PC
must have the following:

Microsoft Windows 2000 or XP.

Internet Explorer 3.02 (or higher).

Visual Basic 6.0.

Visual C++ 6.0 (optional).

Visual Studio 6.0, SP3.

15 Drawing Application Automation Objects

267

Object Hierarchy
Application

Documents
Document
Menus
Menu
Toolbars
Toolbar
Toolbar Controls
Selectset
Toolbar Control
DynamicDisplay2D

HighlightList

Addins
Addins

268

15 Drawing Application Automation Objects

Object Type Descriptions


Object Type

Object Description

Application

Application object

AddIns

A collection of AddIn objects

AddIn

An object representing an AddIn that has been inserted into the


AddIns Collection object

Documents

A collection of document objects

Document

Defines document specific parameters and gives access to


document related objects

DynamicsDisplay2
d

The DynamicsDisplay2d object provides a service for displaying


temporary objects

HighlightList

A collection of objects to be display in an indicated color

Menus

A collection of menu objects

Menu

Menu object

SelectSet

A SelectSet object is a temporary grouping of one or more


selected objects

ToolBars

A ToolBars object is a collection of ToolBar objects

ToolBar

A ToolBar object is a control bar window that contains bitmap


command buttons

ToolbarControls

ToolbarControls object

ToolbarControl

ToolbarControl object

Application Object
The instance of the (Drawing Editor) drawing application.

AddIns and AddIn Objects


An AddIn is an OLE server that exposes several standard methods or
properties that allow developers to insert their workflow solution into a
running instance of a RAD2D-based application. You, as a developer, or your
end-users might want to customize an application by installing a set of tools
to enhance a specific workflow. For you, this set of tools might be a few
commands or event handlers. For the end-user, the tools might include
adding or changing the application user interface. Both types of customization
are accomplished easily with add-ins.
AddIns can extend an application without providing an entirely new
application. AddIns can also simplify an applications user interface. For
example, not all commands for the entire application are available when you
install the product; some are available through the applications add-ins.

15 Drawing Application Automation Objects

269

DynamicsDisplay2d
The platform provides non-persistent or transient objects that can be used
when implementing dynamics in commands. The three types of transient
objects are:

Geometry (GeometryServices objects such as lines and arcs).

Text.

Bitmaps.

For example, you can display the current length of a line, dynamically, as text
on the cursor as you are placing the line. You can also display a bitmap on the
cursor.
The DynamicsDisplay2d object is in the Object Library. You can use it to
display objects in dynamics. Use the following table to determine the correct
method to use for each object.
To display this object

Use this method

Geometry

DynamicsDisplay2d.AddGeometry

Text

DynamicsDisplay2d.AddText

Bitmaps

DynamicsDisplay2d.AddImage

Call one method for each object you want to display.


For example:

To display three bitmaps, call the DynamicsDisplay2d.AddImage method


for each bitmap a total of three calls to the AddImage method.

To display two GeometryServices objects, call the


DynamicsDisplay2d.AddGeometry method for each GeometryServices
object a total of two calls to the AddGeometry method.

HighlightList
A collection of references to objects to be displayed in the highlight color.

Menus and Menu Objects


The Menus and Menu objects option allows you to customize the Aspen Basic
Engineering application menus as required.
In addition to toolbars, menus are one of the main ways of organizing and
making commands available to the end-user. The main advantage menus
have over toolbars is that menus can be hierarchical (sub-menus within
menus). Generally however, this hierarchy doesn't extend beyond 3 or 4
menus deep.
Adding, Removing and Modifying Menus
To add, remove, or modify menus in the application, you must access the
Menus collection on the Application object. From there, the Menus collection
and any Submenus collections can be traversed when you use the methods
and properties for the Menus and Menu objects.

270

15 Drawing Application Automation Objects

Note: To create sub-menus you need to make sure that you add a menu item
of the type igcmdPopup. For example:
Set objMenu = objMenus.Append("MyMenu", igcmdPopup.

SelectSet
A collection of references to objects considered as selected by.

ToolBars and Toolbar Objects


ToolBars are dockable control bars added to the main application window.
ToolBars can be used to customize the look and feel of your application. You
can use them to give easy access to commands. Each toolbar contains one or
more buttons. Each button represents a command that can be started by
pressing the button. The drawing application sets up a default set of toolbars
that can be customized.
To add toolbars to your application, access the ToolBars collection object on
the Application object and add a ToolBar object. Next, add one or more
controls to the ToolBar object.

15 Drawing Application Automation Objects

271

Index

A
Adding a Query 194
Administration 249
Aspen Zyqad
opening a workspace 275
overview 274
Aspen Zyqad Bridge 251
Aspen Zyqad Query Language 195
Assigning objects 75
Attributes 102, 105
AutoCAD symbols 102, 105
Autolinking 70, 71
available 3
B
Bitmap fields
about 71
inserting 71, 72, 73
Broker Configuration 220
Browser 63, 74
C
Cases
multiple 68
CLASS layer 103, 106
Commands
dimlink 70, 71
overspill 68
setobject 75
Components of workspaces 215
Configuration Management 216
Conflict Resolution 235
Controls
verifying 74
Converting AutoCAD symbols
algorithm 104, 106
exclusions 102, 105

preparations 102, 105


Creating a New Smartplant Project 231
Creating Multiple Links 263
D
Data transfer
piping systems 55
Datum attribute 102, 105
Defining datasheets with Excel 57
Defining summary sheets with Excel 57
Development Application
launching 82
Dimension fields
about 69
inserting 69
linking 70
unlinking 70
Dimlink command 70, 71
documentation 2
E
Extent attribute 102, 105
F
Field cases 68
Fields
list 66
L
lass Library Editor 133
Layers 103
Linking
dimension fields 70
multi-line fields 68
revision fields 70
Log in to Aspen Zyqad 275
Logging on to Workspaces and Projects 206
M
Managing Projects 227
Managing the Scope of a Project 243
Managing Users 240
Managing Workspaces 213
Manulinking 70, 71
Multiline fields
about 68

ii

Index

N
Named Parts attribute 103
Network shares 217
O
Object/Case Bindings 264
Objects
assigning 75
setting starting 75
Objects, assigning 75
OLE fields
about 71
Opening
workspaces 275
Overspill command 68
Overspill fields
about 68
P
Packages 191
PART NAMES layer 103
Parts 103
Piping systems
data transfer 55
Piping Systems
about 49
automated version 50
POINTS layer 102, 105
Project Management Dialog 229
Project Management within Aspen Zyqad 226
Q
Query Editor 192
R
Revision fields
about 70
inserting 70
linking 70
unlinking 71
Routes
wildcards 74
S
Schema browser 74
Setobject command 75
Sketch fields
about 71
inserting 71

Index

iii

Symbol Definer in AutoCAD 102, 105


T
Toolbar buttons 113, 137, 260, 261
U
UNC paths 217
Unlinking
dimension fields 70
revision fields 71
V
Validate Controls option 74
Value fields
about 66
dimensions 69
grouping 68
inserting 66
linking to dimension fields 70
routing from Browser 74
W
Wildcards
assigning 74
Working with Files 179
Working with Folders 174
Working with Objects 183
Workspaces
components 215

iv

Index

S-ar putea să vă placă și