Professional Documents
Culture Documents
Administrator
Third Edition
Bentley Institute Course Guide
g
l tin
su
INSTRUCTORS
on
GUIDE
C
.I.
B
TRN003750-1/0003
Trademarks
AccuDraw, Bentley, the B Bentley logo, MDL, MicroStation, Micro Station/J, MicroStation
MasterPiece, MicroStation Modeler, MicroStation PowerDraft, PowerScope, QuickVision,
SmartLine and TeamMate are registered trademarks; Bentley SELECT and SELECT Stream
are registered service marks, and Image Manager is a trademark of Bentley Systems,
Incorporated or Bentley Software, Inc.
Adobe, the Adobe logo, Acrobat, the Acrobat logo, Distiller, Exchange, and PostScript are
trademarks of Adobe Systems Incorporated.
ng
Java and all Java-based trademarks and logos are trademarks or registered trademarks of Sun
Microsystems, Inc. in the U.S. and other countries.
lti
Other brands and product names are the trademarks of their respective owners.
su
United States Patent Nos. 5,815,415; 5,784,068 and 6,199,125.
Copyrights
on
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 ii
Welcome!
g
provides for the demonstration of customization tasks that are better understood
through instructor-led training.
annotations
.I.
Prerequisites
B
Knowledge of databases and Structured Query Language is helpful, but not required.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 iii
This is an intensive course. Entering this course without these prerequisites may make it
difficult for you to successfully complete the course. The instructor will not be able to
provide remedial instruction.
Daily Schedule
Day 1
Chapter 1, Introduction
g
Chapter 2, Setting Up Your Project
tin
Chapter 3, Structured Query Language Basics
l
Day 2
su
Chapter 4, Updating Database Tables (second half)
on
Day 3
C
Day 4
Day 5
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 iv
About This Course Guide
Chapter Contents
g
Chapter objectives
tin
The objectives indicate the skills taught in the chapter.
Introduction
The introduction explains the concepts covered in the chapter.
Exercises
l
su
The exercises walk you through a complex set of operations using specific
sample data with instructor demonstration.
Key points in this section or chapter
on
The lab at the end of an exercise enables you to check the skills on your
own that were taught. The lab contains a set of objectives, a job-related
.I.
The detailed steps used to successfully perform the lab are provided in case
you need help. They also help refresh your memory when you return to
your work site to use your newly acquired skills.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 v
g
l tin
su
on
C
.I.
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 vi
Table of Contents
Welcome! __________________________________________iii
About This Course ____________________________________ iii
Prerequisites ______________________________________ iii
Daily Schedule ____________________________________ iv
About This Course Guide _______________________________ v
Chapter Contents __________________________________ v
g
Introduction _______________________________________1-1
tin
Guidelines to the Instructor on Using the Courseware _________
Chapter Objectives ____________________________________
Introduction _________________________________________
What This Course Offers Over the Administrator Guide ____
l 1-1
1-2
1-3
1-3
Overview of Design Series Software____________________ 1-3
su
Key Points in This Chapter ______________________________ 1-11
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
vii
Table of Contents
g
Ordering the Output _______________________________ 3-50
Conditional Selection _______________________________ 3-51
tin
Relational Operators________________________________ 3-52
Key Points in This Chapter ______________________________ 3-54
Lab: Using SQL to Select Data ___________________________ 3-55
Directions________________________________________ 3-56
l
Lab Solution _________________________________________ 3-59
su
Challenge Lab: Combining Statements into One Query ________ 3-61
Stages in Updating the Project Units and Seed File _________ 4-70
Updating the Projdefe.rul File_________________________ 4-70
Updating the PROJECT_CONFIG Table _______________ 4-71
Working Units Setting in the Modeling Environment _______ 4-73
Key Points in This Section ______________________________ 4-74
Adding New Catalog Data Based on an Existing Standard ______ 4-74
Generic Stages in Adding Catalog Data _________________ 4-75
Copying and Renaming the DAT File___________________ 4-75
Editing the Text File________________________________ 4-75
Loading the Catalog Tables___________________________ 4-76
Placing Components to Confirm the Dimensions__________ 4-77
Adding a New Standard with Catalog Data __________________ 4-77
Stages in Adding Catalog Data ________________________ 4-78
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
viii
Table of Contents
g
Layers of the Attribute Definition Tables ________________ 5-93
Using the ATTRCDEF Table with the ATTRDEFN Table __ 5-94
tin
Stages in Editing the ATTRDEFN Table ________________ 5-97
Working with Component Labels _________________________ 5-102
Re-Creating a Label Position (rimref.dat) File _____________ 5-102
Displaying Component Labels ________________________ 5-103
l
su
Mapping Component Attributes to Label Positions ________ 5-106
Creating a Summary of Label Utilization ________________ 5-107
Key Points in This Section ______________________________ 5-109
Adding an Attribute for Schedule Simulations________________ 5-109
on
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
ix
Table of Contents
g
Challenge Lab Solution _________________________________ 6-166
Design Series Class Libraries, Ams.lib and Ams_user.lib ________ 6-167
tin
Creating a JSM File from a DGN _________________________ 6-169
Key Points in This Section ______________________________ 6-173
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
x
Table of Contents
g
Introduction _________________________________________ 9-228
tin
PlantSpace AutoISOGEN Project Installation ____________ 9-229
PlantSpace AutoISOGEN Project Structure______________ 9-229
Isometric Drawing Creation in PlantSpace AutoISOGEN ___ 9-229
Mapping Design Series Data__________________________ 9-230
l
Selecting Output Settings _______________________________ 9-231
su
Creating a Sample Isometric Drawing ______________________ 9-234
Description of the Piping Component File _______________ 9-234
Analyzing the Isometric Drawing Creation Process____________ 9-235
Customizing the ISOGEN Materials List ___________________ 9-238
on
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
xi
Table of Contents
g
Defining Volumes _____________________________________ 12-277
Using the Database Setup Tool to Build MCS Storage Tables_ 12-280
tin
Key Points in This Section ______________________________ 12-281
Appending Design Files to Move from File-Based Storage
to Component-Based Storage ____________________________ 12-281
Key Points in This Section ______________________________ 12-284
l
su
Using the MCS Administrator Database Tool ________________ 12-284
Viewing Components Checked Out by Users _____________ 12-285
Unlocking Components _____________________________ 12-286
Key Points in This Section ______________________________ 12-287
on
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
xii
Table of Contents
g
SSCAN _____________________________________________ B-315
TO_FIF ____________________________________________ B-317
tin
TO_FRAC __________________________________________ B-317
TOUPPER __________________________________________ B-318
l
Appendix C: Tips ___________________________________C-319
su
General Help_________________________________________ C-319
Testing New Rule Files or Changes to Existing Ones _______ C-319
Checking the Desired Weight of Connect Points __________ C-319
Keeping an Attribute Unique to Every Component ________ C-319
on
Index _____________________________________________IN-343
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
xiii
ng
lti
su
on
C
.I.
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 xiv
1 Introduction
g
Student guide
tin
Instructor guide, which contains instructor notes
The instructor notes are displayed in Italics at the margin throughout a chapter, as
shown on the next page. They serve as cues to remind you when to do or say
particular things, or provide background knowledge to support you as you perform
l
the instructor-led exercises. The first instructor note at the beginning of each chapter
su
estimates the time required to cover the chapter to help you gauge when to take
breaks.
You should rehearse the course beforehand using the instructor guide to familiarize yourself
on
with the flow of training and to make sure no problems occur in using the software and
dataset.
C
Note: These notes at the margin are instructor notes. So that you can tell what the student
page number is, intermittent headings in your book indicate the page number of the same
headings in the student book, for example [student page 1-3].
.I.
B
While students are loading the software and datasets on their laptops, tell them to read the
Preface so that they understand the flow of the chapters.
Point out the daily schedule in the Preface that they should use for each day of the course.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 1-1
Chapter Objectives
If students are not from the same company, ask them to introduce themselves and state
where they are from, what their business setup is, and what topics they especially want to
focus on.
ng
Note: Student laptops should already have MicroStation v08.01.01.09, and TriForma
v08.01.01.24 using the Model Control System Administrator setup type.
lti
--MicroStation v08.01.01.09, and TriForma v08.01.01.24 using the Model Control System
Administrator setup type
--PlantSpace Design Series v08.01.01.09.
----Licenses: pspiping.lic, pisogen.lic, tfeqmod.lic, tfrace.lic, hvac.lic, msv8.lic
su
IMPORTANT: You must get a temporary license for Personal ISOGEN from Bentley Institute.
--01_DS_overview.ppt (for slide presentation-copies are in students chapter)
on
Important: Break for 5 to 10 minutes in the morning and afternoon after each hour or hour
and 15 minutes of training. One break midmorning and midafternoon is not enough to keep
learners alert and focused. They may also need to check for email and cell phone messages
C
from the home office. For your convenience, cues for break points are inserted.
.I.
Begin Chapter 1.
Time Needed to Cover Chapter: 20 minutes
B
Chapter Objectives
[student page 1-1]
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 1-2
Introduction
Describe the two modes of storage in Design Series: file storage and database storage
(also called component based storage)
Explain the overall tasks involved in setting up and configuring Design Series
Introduction
This Administrator Course focuses on the project-driven approach to using PlantSpace
Design Series. You will therefore learn how to set up and configure the system in this
g
environment for your users.
tin
To make this training job related and therefore more meaningful, you will work with an
imaginary project called the East_River Project. The piping component standards used in this
project are listed in Appendix A for quick reference. You will refer to these standards
throughout the course.
l
su
What This Course Offers Over the Administrator Guide
The PlantSpace Design Series Administrator Guide covers all the tasks that you will need to
on
accomplish if you are an administrator, and are in charge of a project using Design Series.
However, reading the Administrator Guide book would take you weeks. This course provides
the following advantages:
C
The opportunity to learn the most common administrator tasks in one week.
Expertise and wisdom of the instructor.
Instruction in advanced, complex functionality that is best learned in formal classroom
.I.
training.
Attention to individual customization issues.
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 1-3
Introduction
The following diagrams present an overview of the Design Series software from your
perspective as an administrator. Your instructor will explain each slide.
Slide 1
ng
lti
su
on
Slide 2
C
.I.
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 1-4
Introduction
Slide 3
g
l tin
su
Slide 4
on
C
.I.
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 1-5
Introduction
Slide 5
ng
lti
su
Slide 6
on
C
.I.
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 1-6
Introduction
Slide 7
g
l tin
su
Slide 8
on
C
.I.
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 1-7
Introduction
Slide 9
ng
lti
su
Slide 10
on
C
.I.
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 1-8
Introduction
Slide 11
g
l tin
su
Slide 12
on
C
.I.
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 1-9
Introduction
Slide 13
ng
lti
su
on
Slide 14
C
.I.
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 1-10
Key Points in This Chapter
g
called component-based storage).
File storage enables you to store the data directly in a MicroStation design file that you
tin
can access in the same way that you access any 2D or 3D Microstation design file.
Database storage enables you to store your design data modeled from the Design Series
3D applications in Microsoft SQL Server or Oracle.
l
su
This chapter contains no lab.
on
C
.I.
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 1-11
g
l tin
su
on
C
.I.
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 1-12
2 Setting Up Your Project
g
Chapter Objectives
[student page 2-13]
--East_River_seed3d.dgn
--East_River_seed3d.dgn
--projvars_user.cfg
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 2-13
Introduction
Introduction
For users to work in a project-driven environment, you must do the following:
Install the Project setup type
Define the ODBC data source
Connect to your project database
Populate the empty database
ng
Project Setup Types
[student page 2-13]
lti
Explain that the software requires the selection of a project as the first step for all the applica-
tions included in Design Series.
su
When you install Design Series, you can choose from four setup types: Files without
Configuration, Local User/Network Server, Network Client, and Project. Because this course
on
focuses on a project-based organization of work, you will use the Project setup type.
The Project setup type creates a project directory structure that an administrator can use to
configure the Design Series for a given project. The project directory should be created on
C
Inform the students that their machines have already been installed with the TriForma Admin-
istrator setup type for the Model Control System (MCS), and the Local User/Network Server
setup type for Design Series.
B
Before setting up a project, you must decide whether you want to run a local configuration of
Design Series on each user machine or a network configuration of Design Series on the
network.
This course is going to use a local configuration, as illustrated in the following slides.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 2-14
Introduction
Slide 1
g
l tin
su
on
Slide 2
C
.I.
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 2-15
Introduction
Slide 3
ng
lti
su
on
Slide 4
C
.I.
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 2-16
Introduction
Slide 5
g
l tin
su
on
This is the most commonly used configuration. You will be following this configuration for
training, so you should spend more time explaining this configuration.
B
The process of setting up a local project configuration includes the following stages:
1 Installing the Model Control System (MCS) Administrator files on the computers of
the users who need Design Series administrative privileges.
2 Installing the Model Control System (MCS) User files on the computers of all other
users including engineers, designers, and drafters.
3 Installing the Local User/Network Server setup type for Design Series on the
computers of the users who need Design Series administrative privileges and on the
computers of all other users including engineers, designers, and drafters.
For more information about the Local User/Network Server setup type, see the
chapter on installation in the PlantSpace Design Series Setup Guide.
4 Installing the Project setup type for Design Series on the project network server to
create your Design Series project directory structure.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 2-17
Introduction
You would choose the network configuration if you have installed MicroStation and TriForma
ng
on your network server.
The following diagram presents a sample network project configuration using the Local
User/Network Server, Network Client, and Project setup types.
lti
su
on
C
.I.
B
This information is included for reference purposes. You should not dedicate much time to
explaining this configuration. If students want more information, they can read the Design
Series Administrator Guide.
For more information about laying out a Design Series project, see the chapter Installing Your
Plantspace Design Series Software in the PlantSpace Design Series Setup Guide.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 2-18
Installing the East_River Project
To make this lesson more meaningful, your instructor will lead you through an exercise as you
follow along on your computer. It is important to keep up as each step is a building block for
the next lessons.
State this and emphasize that for these exercises, they need to follow along on the keyboard
because this part of the lesson builds on a later lesson.
g
tin
We are going to use the product CD to install our East_River Project files. We will install to
our C: drive for training, but you would typically select a network drive for an actual project
installation.
l
To install the Project setup type
su
1 To install the Project setup type, begin with the first three dialog boxes of the
PlantSpace Design Series setup program:
Welcome
on
Information
Software License Agreement
C
2 In the Select Setup Type dialog box, select Project and then click Next.
The Enter Project Name dialog box is displayed.
.I.
B
3 Type East_River for the name of the project, and then click Next.
A project name can have spaces. We are using the underscore in East_River
because that is the format typically used.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 2-19
Installing the East_River Project
4 In the Select Modeling Units dialog box, select Imperial to specify a default system of
modeling units and then click Next.
The Enter Database Information dialog box is displayed.
5 Change the DSN field to East_River, as shown, and accept the default User and
Password entries.
ng
lti
su
on
Tell students: You can include the words Project or database (or both) in the DSN field. We
are just choosing a shorter name. Your DSN can have spaces but we are using an underbar
in the name for consistency.
C
6 Click Next.
The Select Database Type dialog box is displayed.
.I.
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 2-20
Installing the East_River Project
g
tin
8 Accept the default location for the installation of the project software, and click Next.
9
l
Continue through the remaining dialog boxes:
su
Choose Project Configuration File Location (where you are to accept the default
location, C:\projpcfs)
on
To enable the use of the project, you must create the ODBC data source on each user
workstation.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 2-21
Installing the East_River Project
Point out that the Complete Setup dialog box reminds you that you need to create an ODBC
data source named East_River, which you will do later.
We have now installed the East_River Project. To gain a better understanding of project
ng
configuration, let us take a look at the files that were updated and added.
lti
The mslocal.cfg file defines the location of the project configuration (PCF) files by defining
_USTN_PROJECT (as pointed out). This file is located in C:\Program Files\Bentley
su
\Program\TriForma\DesignSeries\mdlapps\config.
on
C
.I.
B
Remind the students that you would typically have _USTN_PROJECT set to a network drive
for a real project.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 2-22
Installing the East_River Project
You can optionally have the students start Design Series and select the drop-down list box at
the Project field (in the MicroStation Manager dialog box) to confirm that the East_River
Project is now an option. Note, however, that this selection will not work yet because we have
not completed project setup.
Refer to the chapter Managing a Project in the PlantSpace Design Series Administrator
Guide for a complete description of the contents of the mslocal.cfg file.
g
[student page 2-23]
tin
A project configuration file (*.pcf) is created during each project installation. These files are
placed in the location defined during the installation process. Lets take a look at our project
configuration file, C:\ProjPcfs\East_River.pcf.
l
su
on
C
.I.
B
Point out the following: 1) The PS_PROJ variable points to our project directory, which was
created during the installation. Specifically, our project directory is C:\Projects\East_River. 2)
The value for PS_UNIT is e, which agrees with our selection of imperial units during the
installation. 3) The file projvars.cfg is loaded from the PS_PROJ directory.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 2-23
Defining Your ODBC Data Source
The projvars.cfg file in the C:\Projects\East_River directory sets values for many project-
specific configuration variables. The PlantSpace Design Series Administrator Guide contains a
complete description of all the variables. We are going to look at a few examples:
PS_CODES_DB defines the project data source along with the default user name and
password.
MS_DESIGNSEED defines the name and location of the project seed file.
ng
You can explain that the setting for our project is currently ds_seede.dgn by recalling that the
value for PS_UNIT was set to e in the PCF file.
You can browse through the project directory structure as an overview, but make it brief
lti
because we will be accessing files within the structure throughout the course. You will get into
details about files in later chapters.
su
Break Time: 5-10 minutes
on
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 2-24
Defining Your ODBC Data Source
(The following dialog box is an example. The entries in the System Data Sources list
box will vary depending on your laptop setup.)
g
l tin
su
5 Click the Add button.
The Create New Data Source dialog box is displayed, listing the installed ODBC drivers.
on
This dialog box is an example. The drivers in the list box will vary depending on
your laptop setup.
C
.I.
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 2-25
Defining Your ODBC Data Source
ng
lti
ODBC setup for other databases (Oracle and SQL Server) will be slightly different.
su
7 In the Data Source Name field, type East_River.
Optionally, in the Description field, type a description for the data source.
on
8
9 To create a new database file, click the Create button and type East_River.mdb for the
name of the new database file.
10 Specify the directory, C:\Projects\East_River, for the new database file, and click OK.
C
When you click OK in the message that East_River.mdb was successfully created, the
setup dialog box is redisplayed showing the database name that you just created.
.I.
B
Location
of
Database
on a
Network
Drive
11 Click OK.
The ODBC Data Source Administrator dialog box is redisplayed.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 2-26
Populating the Project Database
To model 3D components for our project, we must connect to the database and populate the
g
empty database.
tin
Connecting to the empty database and populating the database involves the same process
no matter which database system (Access, Oracle, or SQL Server) that your project is using.
The primary difference is the steps required to create the empty database.
l
su
To connect to the East_River database and populate the database
1 From the Start > Programs menu, locate the PlantSpace Design Series V8 program
on
group.
2 Click the Database Setup icon.
If we have two or more PCF files in the location pointed to by the MicroStation
C
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 2-27
Populating the Project Database
ng
lti
su
on
C
5 Click OK.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 2-28
Populating the Project Database
If you see the following message, ignore it (as the statement pointed to indicates)
because you are performing a new installation.
g
l tin
su
6 Click OK to continue the installation process.
on
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 2-29
Populating the Project Database
ng
Warning: Cancelling the operation may leave the data source in an inconsistent or
lti
unusable state. su
This installation takes from 5 to 20 minutes depending on the database. For example, Access
is faster than Oracle or SQL Server. Because it is probably too early for the morning break,
discuss advantages and efficient ways of using the configuration variables: PS_OUT,
PS_ARCHIVE, and PS_NOT_CHECKED_IN.
on
When the installation is complete, the Messages dialog box is displayed for you to
review. If the database was populated successfully, you should see the following
messages.
C
.I.
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 2-30
Creating a User Project Directory
If any students are unable to complete the exercise for populating their databases, you can
copy the Pltspace.mdb file from the tutorial project directory (C:\Program Files\Bent-
ley\Home\psdstut\project) into their East_River directory, and name it East_River.mdb.
g
Again, follow along on your computer.
tin
In this exercise, we will create a user project directory to store all new and modified files. Your
instructor will go through the following steps, explaining each one.
l
To set up a user project directory
su
When you edit text files in Design Series, use a text editor, not MS Word.
on
1 In the ProjPcfs directory, modify the east_river.pcf file by editing the following
C
variable.
This variable defines the location of the user-configured project variable file.
.I.
DS_USER_CFG_DIR = $(PS_PROJ)custom/
B
This variable is used to define the location of user-configured files such as projvars_user.cfg,
projdef_x.rul, and seed files.
3 Under the \project directory that you just created, create the following three
directories:
C:\Projects\East_River\dbload\data\project\{product}
where {product} = pipe
{product} = core
{product} = equip
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 2-31
Creating a User Project Directory
These directories will store any modified or new files for that particular product.
ng
# --------- ------- ---------------------------------------------
# 01/30/03 DMF Define custom project variables
#
lti
# Project seed file
%undef MS_DESIGNSEED
su
MS_DESIGNSEED = $(DS_USER_CFG_DIR)East_River_seed3d.dgn
# Project definition file
PS_PROJDEF = $(DS_USER_CFG_DIR)\projdefe.rul
on
Important: Whenever you have students copy files from a CD, the files are pasted as read-
only files. Have students change the file attribute to archive in Windows Explorer.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 2-32
Customizing the Display of Menus and Tool Boxes
project, then select file New and look at the path for the seed file. It should be
C:\Projects\East_River\custom\East_River_seed3d.dgn.
g
project needs. The ps_user.rul file is used to customize the interface.
tin
The following example shows how you would load the Pipe main tool box and the Modify
Components tool box.
l
su
1 Close MicroStation.
2 Using a text editor such as Notepad, open ps_user.rul in the
C:\Projects\East_River\userfile directory.
on
3 Edit the file to load the Pipe main tool box and the Modify Components tool box.
4 Save and close the file, and start Design Series.
The Pipe main tool box and Modify Components tool box were not loaded.
C
When the program does not find this file, the file with the same name in your
\Projects\{ProjectName}\userfile directory is copied to your C:\Program
Files\Bentley\Home\{ProjectName} directory.
8 Start Design Series again and notice that the Pipe main tool box and Modify
Components tool box have been loaded.
Using Windows Explorer, browse to the C:\Program
Files\Bentley\Home\East_River directory and show that the edited ps_user.rul
file has been copied from the C:\Projects\East_River\userfile directory.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 2-33
Key Points in This Chapter
ng
An ODBC source that points to the project database must be defined no matter what
database system (Access, Oracle, or SQL Server) that you are using.
The empty database must be populated by the Database Setup tool.
lti
Create a user project directory to store all new and modified files.
MicroStation configuration variables are used to define the project configuration and
su
directory structure.
You can customize the display of menus and tool boxes by editing the ps_user.rul file.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 2-34
3 Structured Query Language
Basics
g
Chapter Objectives
[student page 3-33]
Emphasize that it is beyond the scope of this course to teach the full use of SQL because it
can be highly technical and complex. This is a simplified study of basic query statements so
that students can work with the database in Design Series. Many books and Internet sites
B
For this chapter, you will be using the Line Service Codes included in the East_River Project
Standards in Appendix A.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 3-35
Introduction
Introduction
Structured Query Language (SQL) is an English-like standard language in ASCII text
used to manage, search, and select data from relational databases. It is generic and
non-proprietary.
While the focus of the standards is on language structure, syntax, functionality, etc., the SQL
specifications inherently describe the functionality and logical structure of any database man-
agement system (DBMS) that supports and understands SQL. Thus databases created in
SQL-compliant DBMS's are invariably relational.
ng
In a relational database, information about an item is broken up into multiple, related records
lti
which in turn are distributed into multiple tables. For example:
su
In a relational database, author records are maintained separately and related to the record
containing the rest of the information about a book (e.g. title) by common link or key ele-
on
ments. Such title records are maintained in a separate table. All author field data can be
searched or indexed simultaneously, and no blank author fields need exist.
and columns). Each row is a database record and each column is a field. Data types
are defined for each field at table creation. Typical data types are string, integer,
and date/time.
.I.
B
SQL is used to define and manipulate data in a database. Queries are used to
perform actions, most typically creating tables, inserting records into a table,
deleting records from a table, and finding and selecting records. The SQL keywords
used to perform these actions are:
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 3-36
Introduction
Keywords have a special meaning to the database system and, therefore, can be used only
for a pre-defined purpose.
Create
Insert
Delete
Select
g
Explain that you will concentrate on the Select statement because it is used extensively in
tin
Design Series. You will briefly describe the Create, Insert, and Delete statements.
The Create statement creates a new table. The Insert statement adds one or more
l
new rows to a specified table. The Delete statement removes rows from a table.
su
Creating New Tables
on
All tables within a database must be created at some point in time. Lets see how
we would use SQL to create the BR_TYPE_DESC table that stores piping branch
C
Open BR_TYPE_DESC in the East_River project database to show what the table looks like.
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 3-37
Introduction
Explain the code as you write it on the white board. Explain that the semicolon ends the state-
ment, and that statements can also be written on one line instead of three.
To help visualize this example, you can draw a skeleton table on the white board similar to
the following BR_TYPE_DESC table:
Code Description
ng
lti
This statement gives the table name and tells the database about each column in
su
the table. Please note that this statement uses generic data types, and that the data
types might be different, depending on what database you are using. Some
common generic data types are:
on
of digits allowed after the decimal point. The maximum (4,2) number would be
99.99.
Date, a date column in a database-specific format.
B
The NOT NULL constraint means that the column must have a value in each row. If
NULL was used, that column can be left empty in a given row.
Inserting Rows
[student page 3-34]
To insert rows into a table, you would write the following statement:
INSERT INTO BR_TYPE_DESC VALUES ('WLT','WELDOLET');
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 3-38
Introduction
Add these values into the table that you drew on the board. Be careful in writing your state-
ments because everything within quoted strings is case sensitive.
This inserts the data into the table, as a new row, column-by-column, in the pre-
defined order. Instead, let's change the order:
INSERT INTO BR_TYPE_DESC (DESCRIPTION,CODE)
VALUES ('SOCKOLET','SOL');
g
Add these values as another row of data in the table that you drew.
tin
Point out that the single quotation marks are required around character or string values. Also,
l
quoted strings are case sensitive. For example, 'SOCKOLET' is different from 'sockolet'.
su
Deleting Rows
on
WHERE DESCRIPTION='SOCKOLET';
This statement will work fine for our current example. However, if another row
specifies 'SOCKOLET' for its description, that row would also be deleted. To avoid
the potential problem of deleting more data than we intended, we can make our
statement more specific:
DELETE FROM BR_TYPE_DESC
WHERE CODE='SOL' AND DESCRIPTION='SOCKOLET';
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 3-39
Introduction
Update your drawing so that it is similar to the following BR_TYPE_DESC table and demon-
strate how two rows would be deleted by the original DELETE statement.
Code Description
WLT WELDOLET
SOL SOCKOLET
SKL SOCKOLET
ng
Deleting a Table
lti
[student page 3-35] su
Write the basic statement on the white board as you explain.
Occasionally you may need to delete a table especially if the data contained
on
The DROP command deletes the entire table, not just the data.
C
You also use SQL to select data from tables in a database. The words select and
from in this sentence form the most basic SQL structure. The SELECT keyword tells
the database which column (columns) that you want. The FROM keyword tells the
database the name of the table that the columns are in. The basic statement is:
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 3-40
Creating a Table, Inserting Data, and Deleting a Table
For example, to select all branch descriptions, the statement would be:
SELECT DESCRIPTON FROM BR_TYPE_DESC
g
For this exercise, watch the instructor to get the big picture. You will have a chance to
practice afterwards.
tin
Emphasize that for this exercise, they need to watch you to see the scope of the exercise.
l
su
The instructor notes for the exercise in this section assume that you will be using Microsoft
Access. Many other programs give you the capability to run SQL statements. You can there-
on
We will be using query objects within Access to enter various SQL statements. The process
of creating a query in Access is as follows. You should explain and demonstrate this process
to your students so that they will be able to follow along with the exercises.
.I.
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 3-41
Creating a Table, Inserting Data, and Deleting a Table
2. Select the Queries tab and click the New button to display the New Query dialog box.
ng
lti
3. Select Design View and click OK.
su
4. In the Show Table dialog box, click Close.
on
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 3-42
Creating a Table, Inserting Data, and Deleting a Table
Note: In the Save As dialog box, you should assign a meaningful name to the query.
Running a Query
You can run an existing query by either double-clicking the query, or selecting the query,
right-clicking, and selecting Open. If the following message is displayed, you would click Yes.
g
l tin
Creating a New Query from an Existing Query
su
You can copy and paste queries the same way that you copy and paste files within Windows
Explorer. MS Access will force you to give a new name to the query when you perform the
paste operation.
on
You can edit a query by selecting the query and then clicking the Design button, or right-click-
.I.
In this exercise, we will use SQL statements to create a table to store information
about the piping services used on our project. The table will be set up to hold the
service names and descriptions, along with the MicroStation level and color
assignments. (Refer to Appendix A.)
The first thing that we need to do is decide on names for the table and columns,
and then determine the appropriate data type for each column. Lets fill in the
following worksheet to record our decisions.
The worksheet is filled in below to agree with the rest of the exercise. You should lead the
students through completing their worksheets to agree with this one. You can start by draw-
ing the table on the white board just like the students version, which is shown in the next sec-
tion.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 3-43
Creating a Table, Inserting Data, and Deleting a Table
ng
Then discuss and fill in each row.
lti
Worksheet
su
[student page 3-36]
MicroStation Level
MicroStation Color
B
MS Access does not support the SQL keyword level so that you can actually use the word
level as a column name as long as you are in Access. However, other databases such as
Oracle will give you an error if you try to name a column level.
Creating a Table
Now that we have designed our table, lets go ahead and write the SQL statement to
issue to the database system.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 3-44
Creating a Table, Inserting Data, and Deleting a Table
Draw the skeleton table on the white board for the PIPING_SERVICES table.
To create a table
1 Write the SQL statement:
CREATE TABLE piping_services (service_name char(4) not null,
description char(30),
ustn_level integer not null,
ustn_color integer not null);
g
tin
Point out that the not null constraint is applied to all columns that we identified as required.
2 Create a new query in your database and type the SQL statement.
Save the statement as CreateTable and then run the statement.
l
3
su
4 Look at the list of tables in your database and confirm that the
PIPING_SERVICES table now exists.
on
Inserting Data
[student page 3-37]
C
Next, we need to write a SQL statement that will place data into our new table. For
example, lets add data for the Instrument Air service.
.I.
To insert data
1 Save the following query as InsertData1.
B
5 Run this statement and look at the data in the table to confirm that we now
have two rows of values.
6 Save the following as InsertData3:
INSERT INTO piping_services VALUES('CLP','High Pressure
Condensate',20,3);
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 3-45
Creating a Table, Inserting Data, and Deleting a Table
7 Run the InsertData3 statement and then examine the values in our table.
We now have inconsistent data in the table (specifically, CLP has two different
descriptions). This inconsistency will lead to problems when we extract data from
the table. We need to prevent this problem before it happens. We can use the
power of SQL and the database to avoid this problem by defining a primary key for
the table.
ng
Add the three rows of data to your table and circle the inconsistent data, CLP in the
service_name column twice.
Keys
lti
su
First, let's discuss the concept of keys. A primary key is a column or set of columns
that uniquely identifies the rest of the data in any given row. For example, in the
PIPING_SERVICES table, the service_name column should uniquely identify each
on
row.
This means that no two rows can have the same service_name.
C
If we define the service_name column as a primary key when we create the table,
then the database system will not allow two rows of data to have the same
service_name.
.I.
Warning: A primary key column cannot contain NULL (or empty) values.
B
To see which column is your primary key, you would close the table and re-open it
in design view. A small icon of a door key is displayed next to the column that is
the primary key.
Deleting a Table
[student page 3-35]
Now that we know about keys, lets delete our table and start again.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 3-46
Creating a Table, Inserting Data, and Deleting a Table
Warning: MS Access 97 does not support the keywords primary key so you will
g
receive a syntax error when you try to save the statement. Go ahead and save the
query without the changes and your instructor will show you a workaround that can
tin
be done after creating the table.
2 Run this statement to re-create the PIPING_SERVICES table.
l
su
To overcome the primary key problem in Access 97, open the PIPING_SERVICES table in
Design View, right-click the service_name row, and select Primary Key. A small key will be
displayed to the left of service_name.
on
We can quickly test whether the primary key constraint is working by attempting to
add duplicate data to our table.
.I.
Tell students to delete the table that they created to leave their project databases as they
were originally.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 3-47
Finding and Selecting Records
Continue to follow along on your computer. It is important to keep up, as each step
is a building block for the next lessons.
State this and emphasize that for this exercise, they need to follow along on the keyboard
because this part of the lesson builds on a later lesson.
ng
We have learned how to create tables and insert values into those tables. Lets see
how to select data from existing tables. We will be finding and selecting data from
the PIPE_PGKT table, which stores catalog information about gaskets. The
lti
PIPE_PGKT table contains the following columns:
SELECT Statement
B
The SELECT statement is used to select data from a table. The basic statement is:
SELECT column_name FROM table_name
Lets write a SELECT statement to find out which piping standards are included in
the PIPE_PGKT table.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 3-48
Finding and Selecting Records
DISTINCT Keyword
g
[student page 3-40]
tin
To remove redundancies such as multiple displays of ANSI in the results of our
previous query, you add the keyword DISTINCT. DISTINCT applies to all columns,
not just the first column. The basic statement is:
l
SELECT DISTINCT column_name FROM table_name
su
For example, lets update our query to display only the distinct standards. The
statement would be:
on
MS Access may add additional formatting to queries that have been saved. For example, you
C
may see square brackets around column names. This formatting is not standard SQL, so it
should be ignored for our purposes.
.I.
Now run the query and see that the returned data displays only one entry for each
standard:
B
ANSI
EDS
If you want to select multiple columns for each row in a table, just add the
additional column names separated by commas (,). As an example, lets try the
following.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 3-49
Finding and Selecting Records
Standards Codes
ANSI B16.21
ng
ANSI B16.5
EDS 2690
lti
EDS 16966-6
EDS 2691
su
EDS 1514-1
We will now add another column to our SELECT statement to see how we can
C
1 Continuing from the previous exercise, add another column called size_1 to
our query statement.
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 3-50
Finding and Selecting Records
The default order is ascending (keyword ASC). This order can be reversed by adding the
keyword DESC for descending as in:
SELECT DISTINCT stndrd, code, size_1 FROM pipe_pgkt ORDER BY size_1 DESC;
ORDER BY can also be used for columns that have a string or character data type.
g
tin
A variation on the ORDER BY clause is to use a numeric to indicate the position of
an item in a series that you are selecting. For example:
SELECT DISTINCT stndrd, code, size_1
l
FROM pipe_pgkt
su
ORDER BY 3;
The ORDER BY 3 clause instructs the system to order the results by size_1 because
it is in the third position.
on
This SELECT statement is equivalent to the last SELECT statement that we executed. If we
C
had used ORDER BY 2, the results would have been ordered by the code values.
.I.
The column specified in the ORDER BY clause must be one of the columns being selected.
B
Conditional Selection
[student page 3-41]
The WHERE clause is used to conditionally select data from a table. WHERE tells
the database the qualifications that you want on the data. The basic statement is:
SELECT column_name
FROM table_name
WHERE condition
For example, to select the standard, specification number, and rating for gaskets
that are available for 3 inch pipelines, the statement would be:
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 3-51
Finding and Selecting Records
ng
FROM pipe_pgkt
WHERE size_1 = 3 and stndrd = 'ANSI';
lti
Relational Operators su
[student page 3-42]
= Equal
<> or != Not Equal
< Less Than
C
The relational operators can be used with either numeric or string values.
B
For example, let us find out what piping sizes are available for the ANSI standard in
our pipe_pgkt table:
SELECT DISTINCT size_1 FROM pipe_pgkt WHERE stndrd='ANSI';
Now let us see what gasket ratings are available for 3 inch ANSI pipe:
SELECT rating FROM pipe_pgkt WHERE size_1=3 AND stndrd='ANSI';
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 3-52
Finding and Selecting Records
1.Why can I not just ask for the first three rows in a table?
Because in relational databases, rows are inserted in no particular order, that is, the system
inserts them in an arbitrary order; so, you can only request rows using valid SQL features,
g
like ORDER BY.
tin
2. Database tables are just files, correct?
l
su
Database management systems (DBMSs) store data in files declared by system managers
before new tables are created (on large systems), but the system stores the data in a special
on
format, and can spread data from one table over several files. In the database world, a set of
files created for a database is called a tablespace. In general, on small systems, everything
about a database (definitions and all table data) is kept in one file.
C
No, for two reasons. First, spreadsheets can have data in a cell, but a cell is more than just a
row-column-intersection. Depending on your spreadsheet software, a cell might also contain
formulas and formatting, which database tables cannot have (currently). Second, spread-
sheet cells are often dependent on the data in other cells. In databases, cells are indepen-
dent, except that columns are logically related (hopefully, together a row of columns describe
an entity), and, other than primary key and foreign key constraints, each row in a table is
independent from one another.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 3-53
Key Points in This Chapter
Wildcards can be used in the WHERE clause. As an example, the following statements select
all end preparations from the PIPE_PRED table that start with the letter B.
ng
Key Points in This Chapter
lti
[student page 3-42] su
Paraphrase the key points.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 3-54
Lab: Using SQL to Select Data
g
Point out that if they need help, they can refer to the Lab Solution that follows.
tin
Objectives
l
This lab enables you to check your ability to perform the following skills:
su
Find and select data from tables
Use various forms of conditional selection
on
Scenario
When you select a tool to place a component in Design Series, the attributes dialog
box is displayed to show you the attributes and values available for placing the
C
selected component. For example, if you select the Place Concentric Reducer tool,
the attributes dialog box displays attributes such as piping standard, inlet size,
outlet size, and end preparations.
.I.
Open Design Series. Make sure that the Placement Mode field is set to Catalogs, and then
B
select the Place Concentric Reducer tool. Show the attributes dialog box containing the list of
attributes, and point out the values in drop-down list boxes in the Value column.
In this scenario, you will use SQL to see how the attribute values are selected and
displayed in the drop-down list boxes in the Value column. You will use two tables:
the PIPE_PRED table containing the catalog information for reducers, and the
STANDARD_DESC table containing codes and descriptions for piping standards.
The schema of these tables is:
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 3-55
Lab: Using SQL to Select Data
PIPE_PRED Table
ng
size_2 decimal(7,3) Outlet pipe size
stndrd char(4) Piping standard abbreviation
code char(12) Specification number
lti
reihe char(2) Wall thickness
face char(2) Flange facing
su
p1_par decimal(10,4) Reducer length
par_units char(2) Units for length parameter
on
Students are probably not familiar with the naming conventions used within Design Series, so
point out that size_1 is inlet size and size_2 is outlet size. Explain that all the catalog tables
within Design Series use size_1, size_2, and size_3 for column names.
C
STANDARD_DESC Table
.I.
Directions
Use SQL statements to answer the four questions that follow the Example. Enough
room is provided to write the SQL statement with the answer for each question.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 3-56
Lab: Using SQL to Select Data
Example: What piping standard abbreviations are included in the catalog table for
reducers?
SQL statement:
SELECT DISTINCT stndrd FROM pipe_pred;
Answer:
ANSI
BIO
CMPR
g
EDS
tin
VICT
WTRF
WTRH
l
su
WTRI
WTRP
on
1 What is the long description for three of the piping standard abbreviations
C
SQL statements:
_____________________________________________________________
_____________________________________________________________
_____________________________________________________________
Answer: Use the following chart to record your answers for the three that
you selected.
Code Description
ANSI
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 3-57
Lab: Using SQL to Select Data
BIO
CMPR
EDS
VICT
ng
WTRF
lti
WTRH
su
WTRI
on
WTRP
C
_____________________________________________________________
Answer: (smallest size) ________ through (largest size) ________
B
3 What outlet sizes are available for the following standard and inlet size
combinations? Record your answers in the chart.
Hint: The 4-character abbreviation for Victaulic is VICT.
ANSI 2
Victaulic 4
SQL Statements:
_____________________________________________________________
_____________________________________________________________
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 3-58
Lab Solution
4 What inlet end preparations are available for the following reducers?
Inlet End
Standard Inlet Size Outlet Size
Preparations
Victaulic 4 1
Compression 1 0.75
SQL Statements:
_____________________________________________________________
g
_____________________________________________________________
tin
When students are finished, ask if they have questions or comments.
l
su
This lab returned abbreviations for end preparations. The descriptions associated with all end
preparation abbreviations can be found in the table CONN_DESC. Below you will find the
descriptions for the abbreviations included in this lab.
BL - BELL END
on
BW - BUTT WELD
FL - FLANGED
GR - GROOVED/VICTAULIC
C
Lab Solution
.I.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 3-59
Lab Solution
Code Description
ANSI ANSI
ng
BIO Sanitary (including ASME BPE97)
CMPR Compression
lti
EDS European Data Set
VICT Victaulic
su
WTRF Fiberglass Reinforced Plastic
WTRH HDPE
WTRI Iron mechanical joint
on
size_1;
3 What outlet sizes are available for the following standard and inlet size
combinations? Record your answers in the chart.
SQL Statements:
SELECT DISTINCT size_2 FROM pipe_pred WHERE stndrd='ANSI' and
size_1=2 ORDER BY size_2;
SELECT DISTINCT size_2 FROM pipe_pred WHERE stndrd='VICT' and
size_1=4 ORDER BY size_2;
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 3-60
Challenge Lab: Combining Statements into One Query
4 What inlet end preparations are available for the following reducers?
Victaulic 4 1 GR
Compression 1 0.75 GR
SQL Statements:
SELECT DISTINCT eprep1 FROM pipe_pred WHERE stndrd='VICT' and
size_1=4 and size_2=1;
g
SELECT DISTINCT eprep1 FROM pipe_pred WHERE stndrd='CMPR' and
size_1=1 and size_2=0.75;
tin
Challenge Lab: Combining Statements into One Query
l
su
[student page 3-48]
This is an optional lab if you finish early and want a challenge. It is not required.
on
Direction
Show how the example and first question in the previous Lab could be answered
with one query. The goal of the first two questions was to get a list of the standards
C
available for reducers along with the description for each standard abbreviation.
.I.
They may need a SQL reference book and a hint if necessary to do this. The advanced fea-
tures used in this statement are the IN predicate and a subquery statement, or querying from
multiple tables in one statement.
B
SQL Query:
---------------------------------------------------------------------------------------------------------------
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 3-61
Challenge Lab: Combining Statements into One Query
Show how the first two questions could be answered with one query. The goal of
the first two questions was to get a list of the standards available for reducers along
with the description for each standard abbreviation. The advanced features used in
this statement are the IN predicate and a subquery statement.
Answer: Option 1
ng
SELECT DISTINCT code, description
FROM standard_desc
WHERE code in (select distinct stndrd from pipe_pred)
lti
ORDER BY description;
Answer: Option 2
su
This lab can also be answered by using the advanced features of SQL that enable
you to query from multiple tables in one statement, as follows:
SELECT DISTINCT stndrd, description
on
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 3-62
4 Updating Database Tables
Time Needed to Cover Chapter: 4 hours (2 hours ending day 1, 2 hours beginning day 2)
g
Chapter Objectives
[student page 4-51]
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 4-63
Introduction
Introduction
When a user is placing components in Design Series, the software reads information from
various database tables. Some examples of items that are controlled by data queried from your
project database tables include the setting of piping component symbology based on system
or service, the values available in the list boxes presented in the attributes dialog box, and the
dimensions of modeled components. Because the behavior of the software is controlled by
data contained in tables in your project database, it is possible for us to customize our project
setup by adding or updating tables to include project-specific information. Updating tables in
your database involves two tasks:
ng
Editing text files
Using the Database Setup Tool
lti
Show slide ams_mcs.ppt and explain it as you talk.
su
on
C
.I.
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 4-64
Introduction
Design Series uses ASCII text files to load your project database. The text files are in product
subdirectories in the {network drive}\Projects\{project name}\Dbload\data directory. Each
product directory contains all the data and parametric rule files needed for that product.
To configure your project database, you can edit one or more of these text files and then load
the edited text files into the database with the Database Setup tool.
g
By editing the text files, you can configure:
tin
Attribute data in the Attribute Definition (ATTRDEFN) table
Configuration of attribute definitions should be done early in the project life cycle.
Changes to component attribute definitions should be completed before implementing
the Model Control System (MCS) because the CATALOG_BUD tables that MCS uses
l
for storage contain columns that correspond to the attributes of every component.
su
Dimensional or catalog data
External data from third-party applications
on
Description tables
The component type name displayed in the attributes dialog box and defined in the
CLASSES table
C
Tell students the following tip on locating a table to edit in a DAT file. In Windows Explorer, do
an advanced search on the table name contained in any files. Windows Explorer will then
.I.
Maintaining data in text files that can be loaded into the database (instead of editing the
database tables directly) has the following advantages:
You can use the text files to load either an Access database or an enterprise-size database
such as Oracle or SQL Server. If a project increases in size, a project can easily be
transferred from Access to an enterprise-size database.
You can maintain a modification history in each text file.
The text files can provide a level of redundancy for the data that has been customized.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 4-65
Introduction
The data in some tables, such as the EXPERT_RULES table, is easier to modify in the
text files than in the database.
You should not maintain data in text files to define piping specifications. Piping specifications
should be defined and loaded into the database through the Specification Maker program. For
more information about creating piping specifications, see the chapter Creating and Checking
Piping Specifications in the PlantSpace Design Series Administrator Guide.
ng
[student page 4-52]
Tables within your project database should be created and updated using data files and the
Database Setup utility. The commands that can be used within the data files are described in
lti
this section. su
Tell students the following: These commands are specific to Design Series. Look in
...\Projects\East_River\dbload to see all the files that are used to populate your database.
These are DAT (data) files in ASCII format and were used in Chapter 2. Again, use only a text
editor (not MS Word) to edit these files.
on
Point out that /* indicates the start of a comment and */ indicates the end of a comment on
C
the same line or on another line. Therefore, be careful not to delete these markers. Also point
out that an exclamation point ! can be used at the beginning of a single line to tell the sys-
tem to ignore that line of text.
.I.
B
Defining a Table
The columns to be included in the table are defined by using the following command
sequence:
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 4-66
Introduction
TABLE_BEGIN
Column_Description_1
Column_Description_2
Column_Description_n
TABLE_END
g
The order of the columns in the Column_Description statements determines the order of the
columns in the table.
tin
The required TABLE_BEGIN and TABLE_END keywords delineate the start and end of
the column definitions.
l
Warning: If the table already exists in the database, it will be dropped first, which loses any
su
data it already contained.
If a table will be loaded from multiple data files, you must ensure that the table is created in
only one data file. The remaining files will load additional data using an insertion command.
on
Where Means
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 4-67
Introduction
The SET_UNIQ_INDEX keyword enables you to define the primary key for the table. Recall
that we defined a primary key for the PIPING_SERVICES table in the SQL chapter so that
each service name could be added to the table only one time.
ng
The data to be loaded into a table must be in the following format:
DATA_BLOCK_BEGIN
Data_Row_1
lti
Data_Row_2
Data_Row_n
su
DATA_BLOCK_END
fields, which match the order and type of columns specified in the table definition. A row of
data can be split into one or more lines by using a back slash (\) at the end of the line(s) to
be continued.
C
If the table was defined in a separate file, the data loading section must be preceded with the
INSERT_INTO command. The syntax for this command is:
INSERT_INTO TableName
.I.
These commands accomplish the same task as the SQL standard command INSERT INTO
B
Rows of data can be deleted from a table by using the following command:
DELETE_FROM TableName [qualifier statement]
Prior to reloading a table, the DELETE_FROM command reads the table specified by
TableName and clears it of specific data to avoid duplication. This command is not used
when the table is created and loaded within the same data file because table creation always
starts with an empty table.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 4-68
Updating the Working Units
The optional qualifier statement is used to ensure that only the desired data is deleted from
the table. This operation is generally done in the form of a WHERE clause. As an example,
consider the data files used to load the ATTRDEFN table. Each commodity (such as pipe)
deletes and loads into the ATTRDEFN table, all data specific to that commodity. The
following command deletes the piping data from the ATTRDEFN table while preserving all
other data in the table.
DELETE_FROM attrdefn WHERE LEVEL_1=PIPE
The SQL equivalent for the DELETE_FROM statement is the command DELETE FROM
TableName WHERE condition.
g
tin
Adding Comments to Data Files
Blank rows and comments are allowed between the records. A single-line comment is marked
l
by using an exclamation point (!) anywhere on a line. All information following the
su
exclamation point is ignored. Multiple-line comments are marked by using the C language
style where /* designates the start of a comment and */ designates the end of the
comment. This type of commenting can be very useful.
on
Warn students to be very careful when using multiple line comments because it is very easy
to inadvertently comment-out large sections of data when you forget to add the end of com-
C
ment characters.
You should always confirm that you have added both the start and end designations or you
.I.
The PROJECT_CONFIG table identifies the properties for the working units and site ID of
your project. This table is set from prjcfg_e.dat in ...\Projects\East_River
\dbload\data\core\english.
The system units and working units defined in the PROJECT_CONFIG table must match
the system units and working units defined in projdefe.rul and East_River_seed3d.dgn.
If we refer to the East_River Project Standards (Appendix A), we see that the working units
for our project should be 8000 (imperial) or 315 (SI or metric) positional units for each inch.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 4-69
Updating the Working Units
The default imperial working units for Design Series are 25400 (imperial) or 1000 (SI or
metric) positional units for each inch.
The Design Series database must be in synchronization with the Resolution setting in the
project seed file. The text file, projdefe.rul (or projdefm.rul), must also be updated to the
ng
desired project units.
lti
Stages in Updating the Project Units and Seed File
The process of updating the project units and seed file consists of the following stages:
su
1 Updating the projdefe.rul file
2 Updating the PROJECT_CONFIG table
on
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 4-70
Updating the Working Units
g
l tin
su
on
C
.I.
B
To update the PROJECT_CONFIG table, we need to edit the file prjcfg_e.dat and then load
this file into the database by using the Database Setup tool.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 4-71
Updating the Working Units
Explain that this file will create a table named PROJECT_CONFIG with three columns:
PROPERTY, PROP_VAL, and APPLIC. Then three rows of data will be loaded into the table.
ng
lti
su
on
C
.I.
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 4-72
Updating the Working Units
8 When the Database Setup message "Loaded data files successfully" is displayed, click
OK on the message and exit the Database Setup tool.
Even though the system successfully updated your edited file, you should confirm your
settings to find any problems beforehand that users might encounter.
g
To confirm the working units
1 From the Windows Start > Programs menu choose PlantSpace Design Series V8 >
tin
Design Series Modeling to start Design Series.
2 In the MicroStation Manager dialog box, select East_River from the Project drop-
down list box.
3
l
Create a new file by choosing File > New and confirm that the New dialog box
su
defaults to ...\Bentley\Home\East_River\dgn for the location of the file.
4 Use your name as the file name and click OK.
on
The location for new files is defined by the configuration variable PS_OUT in the projvars.cfg
file.
C
If you receive an error message during the File > Open operation, the problem is
the working units.
.I.
5 If no error message is displayed, confirm that the working units are set properly by
choosing Settings > Design File from the menu bar, clicking Working Units in the
Design File Settings dialog box, and then clicking the Advanced button.
B
An Alert message is displayed. If the values are correct, the setup of the project
working units is correct.
6 Click Cancel to close the dialog box and click Cancel in the Design File Settings dialog
box to return to modeling environment.
7 Place a 24-inch pipe in Catalog mode and make sure that the OD (outside diameter)
is 24.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 4-73
Key Points in This Section
ng
product subdirectories in the {network drive}\Projects\{project name}
\Dbload\data directory.
To configure your project database, you can edit one or more of these text files and then
load the edited text files into the database with the Database Setup tool.
lti
Tables within your project database should be created and updated using data files and
the Database Setup utility.
su
The PROJECT_CONFIG table identifies the properties for the system units.
The system units and working units defined in the PROJECT_CONFIG table must
match the system units and working units defined in the project seed file.
on
Beginning of Day 2, review by question and answer what students learned in Ch 1, 2, 3 and
.I.
Adding catalog data makes the data accessible to users when they select the Catalogs option
from the Placement Mode field. A component must exist in the catalog before it can be added to
a piping specification.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 4-74
Adding New Catalog Data Based on an Existing Standard
The process of adding data to component catalogs consists of the following generic stages:
1 Copying and renaming the DAT file to a subdirectory in your project directory
2 Editing the text file by adding the rows of data needed to define the additional
components
3 Loading the catalog tables by using the Database Setup tool
4 Placing the components and confirming their dimensions within the modeling
environment
g
tin
Copying and Renaming the DAT File
For this exercise, we will assume that all the catalog data is in one DAT file. However, catalog
data can be in multiple DAT files in Design Series.
l
su
1 To determine which catalog table we will need to append our data to, refer to
Chapter 4 of the Design Series Reference Guide for Administrators.
2 Do an advanced search on Windows Explorer to determine which DAT file uses the
table name and component type.
on
3 Copy this DAT file to the subdirectory of the existing standard in your project
directory.
4 Rename the DAT file.
C
We rename the copied file to indicate that this is not a system file.
.I.
Design Series uses ASCII text files to load the project database. The text files are in product
subdirectories in the {network drive}\Projects\{ProjectName}\dbload\data directory. Each
product directory contains all the data and parametric rule files needed for that product.
For piping components, the data required for each type of component is documented in each
of the text files and in the chapter Configuring Data for Your Project Database Tables in the
PlantSpace Design Series Reference Guide for Administrators. To add a line of data in the proper
format, you can copy an existing line and change the values as needed. The order of the lines
of data in the text file is arbitrary.
To configure the project database, you can edit one or more of these text files and then load
the edited text files into the database with the Database Setup tool.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 4-75
Adding New Catalog Data Based on an Existing Standard
If your project requires piping specifications, add the new component sizes to a guideline by
using the Specification Maker. To include the new component in the piping specifications,
you must synchronize the database within the Specification Maker. For information about
adding a new guideline, modifying an existing guideline, and synchronizing the database for
piping components, see the chapter Creating and Checking Piping Specifications in the PlantSpace
Design Series Administrator Guide.
ng
2 Edit the text file by adding the rows of data to define the new components.
3 Save and close the file.
lti
Loading the Catalog Tables
su
After you add project-specific catalog information or define new components, you must load
the edited data file into the project database to update the catalog tables so that the changes
occur in the modeling environment.
on
Where Means
<product> The specific product name such as pipe
.I.
To determine the name of the appropriate data file, see the chapter Configuration Data for Your
Project Database Tables in the PlantSpace Design Series Reference Guide for Administrators.
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 4-76
Adding a New Standard with Catalog Data
Once the database is successfully updated, you should try to place a component in the
modeling environment to verify that the dimensions are correct.
g
2 Place a component in Catalog mode and check the dimensions that you added.
3 Close the application.
tin
Break Time: 5-10 minutes
l
su
Adding a New Standard with Catalog Data
on
you may be required to add catalog data for project needs. For example, you may have
requirements for tracking a specific vendor's type of valve. For our project, we will be using
ball valves that do not conform to the ANSI B16.10 dimensional standard. We will therefore
have to create a new valve standard and populate the valve catalogs in our project database.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 4-77
Adding a New Standard with Catalog Data
We will be adding data for ball valves, which have screwed ends and are rated at 800 pounds.
These valves are manufactured by Freds Piping Supply.
ng
lti
su
on
C
.I.
B
The following stages for adding data to component catalogs are similar to the stages for
editing text files covered in the previous section:
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 4-78
Adding a New Standard with Catalog Data
1 Copying and renaming the DAT files to a subdirectory of the East_River project
required to add valve catalog data.
2 Editing the text files by adding the rows of data needed to define the additional
components.
3 Loading the modified data files by using the Database Setup tool.
4 Placing the components and confirming their dimensions within the modeling
environment.
g
[student page 4-63]
tin
To copy the DAT files and rename them
1 Create a \Fred directory in the Projects\East_River\dbload\data
l
\project\pipe directory.
su
This directory will contain all files required for our new valve standard.
on
Tell students that it is a good idea to keep all information on a new standard in a directory by
its own name.
2 To determine which catalog tables we will need to append our valve data to, refer to
C
In addition to the valve body information, you will also need to input information
about the valve operator, end conditions, and descriptions. If we continue looking at
B
the Reference Guide, we can determine that valve operator information is stored in
different tables from the valve body information. This table organization reduces
redundancy in the valve catalog table.
3 Do an advanced search in Windows Explorer to find any other DAT files that use the
table name PIPE_PVLV.
4 Perform the following operations:
a. From the ...\dbload\data\pipe directory, select pvlv.dat and pvop.dat.
b. Copy them to the ...\Fred directory.
c. Rename them pvlv_fred.dat and pvop_fred.dat.
These files will be the templates for our new valve catalog DAT files.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 4-79
Adding a New Standard with Catalog Data
From our search, we should find reference to the vballb1610.dat file in the
...\dbload\data\pipe\ANSI\B16_10 directory.
5 Copy this ball valve catalog file, vballb1610.dat, to our ...\Fred directory to use as a
guide.
DAT files located in the ...\dbload\data\pipe are used by the Database Setup tool to
define and create the piping catalog tables. DAT files located in the
...\dbload\data\pipe subdirectories are used to populate the catalog tables with data.
From the Design Series Reference Guide for Administrators, we can see that we also need to
account for the outside diameter of connecting pipe by referring to our new standard
in the DIAMETER_TABLES table.
ng
6 Copy the ...\dbload\data\pipe\ diatable.dat file to our ...\Fred directory and rename
it diatable_fred.dat.
lti
We will need to add a record to the MANUFACTURERS table to indicate which
end-prep data that Design Series will use during component creation and placement.
7 Copy and rename the ...\dbload\data\core\manufac.dat file to our ...\Fred directory
su
as manufac_fred.dat.
8 Copy ...\dbload\data\core\glossary.dat to the ...\Fred directory to add a description
for our new valve to the STANDARD_DESC table.
on
This file will be used as a reference only, so we are not renaming it. We renamed the
copied files for two purposes: 1) to indicate that they are not delivered system files, 2)
to indicate the standard or manufacturer that the data represents. Suggested names
could be pvlv_fred.dat, pvop_fred.dat, and so on.
C
For piping components, the data required for each type of component is documented in each
of the text files and in the chapter Configuration Data for Your Project Database Tables in the
PlantSpace Design Series Reference Guide for Administrators. To add a line of data in the proper
format, you can copy an existing line and change the values as needed. The order of the lines
of data in the text file is arbitrary.
If your project requires piping specifications, add the new components sizes to a guideline by
using the Specification Maker. To include the new component in the piping specifications,
you must synchronize the database within the Specification Maker. For information about
adding a new guideline, modifying an existing guideline, and synchronizing the database for
piping components, see the chapter Creating and Checking Piping Specifications in the PlantSpace
Design Series Administrator Guide.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 4-80
Adding a New Standard with Catalog Data
Tell students the following tip: To add large sets of catalog data, open Excel, enter the data as
text, export it to MS Access as a DBF file, then open it and copy and paste it into the DAT file.
Another tip: How do you know what table to populate for what use? See the Design Series
Reference Guide for Administrators.
g
1 Using a text editor such as Notepad, open the glossary.dat file and find the section
that refers to the STANDARD_DESC table.
tin
2 Cut and paste this section into a new file called standard_desc_fred.dat.
3 Add a file header similar to the one shown.
l
This file will be used to define the standard code value 'FRD' and description 'Fred's
su
Piping Supply' for our new standard.
/*
//================================================================
on
// standard_desc_fred.dat
//
// 02-Oct-2002 MJS Created file to add Fred's Piping Supply to
C
/* Table: STANDARD_DESC
set_uniq_index CODE char 8 "check (code = upper(code))"
B
Description char 50
OVERLAY_SUFFIX char 9
*/
DATA_BLOCK_BEGIN
"FRD", "Fred's Piping Supply", ""
DATA_BLOCK_END
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 4-81
Adding a New Standard with Catalog Data
ng
the CREATE_TABLE pipe_pvlv SQL command.
4 Remove the TABLE_BEGIN and TABLE_END commands.
5 We will leave the table schema information in the DAT file for reference, but
lti
comment it out by moving the */ after the revision data to the end of the table
schema definition.
6 Cut and paste the DELETE_FROM and INSERT_INTO statements from the
su
vballb1610.dat file into our file.
7 Modify the where clause of the delete statement to check for STNDRD = 'FRD'
which will remove the records that we are adding each time that the file is loaded into
on
8 Copy a line of data from the vball1610.dat file and update the values to agree with the
cut sheet for Freds ball valves.
B
Hint: In the data line, each column of data is separated with a comma (,). Each
column represents a row from the table schema definition. Each row is read from left
to right from the data line, which matches from top to bottom in the schema
definition.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 4-82
Adding a New Standard with Catalog Data
To find the proper values, such as eprep1, refer to the glossary.dat file.
9 Save and exit.
After all data defining the new components has been added to the text file, you must load the
files into your project database for the changes to occur in the modeling environment.
g
To load the modified text file
tin
1 From the Start > Programs menu, locate the PlantSpace Design Series V8 program
group.
2 Click the Database Setup icon.
l
3 If the Select Project dialog box is displayed because you have two or more projects set
su
up, select East_River and click OK.
4 In the Database Setup window, locate the Load group and click the Data File button.
5 Select the standard_desc_fred.dat and pvlv_fred.dat files that you modified and click
on
Open.
If you made any syntax errors in the file, an error message is displayed.
6 Click OK in the message dialog box.
C
Once the database is successfully updated, you should try to place a component in the
modeling environment to verify that the dimensions are correct.
B
If you click OK, an error message will indicate that data is missing. This is because we have
not finished updating all the necessary data.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 4-83
Key Points in This Section
ng
Your project database should never be modified directly through the database
management system.
After all data defining the new components has been added to the text file, you must load
lti
the file into your project database using the Database Setup tool for the changes to occur
in the modeling environment.
If your project requires piping specifications, add the new components sizes to a
su
guideline by using the Specification Maker. This must be done after adding the catalog
data.
on
State that in this lab, they will finish adding data for Freds Ball Valves, and point out that if
they need help, they can refer to the Lab Solution that follows.
Objectives
This lab enables you to check your ability to perform the following skills:
Create and edit text files defining catalog information
Load catalog information into the project database
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 4-84
Lab Solution
Scenario
In the preceding exercises, we created text files to store the catalog information for Freds Ball
Valves, and we updated two of the database tables. Now we need to complete the process of
adding the Freds Piping Supply standard along with the valve operator dimensional data.
Directions
1 Update the pvop_fred.dat file to define operator dimensions for Freds Ball Valves.
2 Update the manufac_fred.dat file to indicate that the dimensional data for end
preparations of Freds Ball Valves conforms to ANSI standards.
g
3 Update the diatable_fred.dat file to identify the table name and column name to be
tin
used to obtain outside diameter values.
4 Load all updated data files.
5 Place Freds Ball Valves and confirm that the dimensions match the dimensions listed
l
in the catalog.
su
Lab Solution
on
1 In this lab, repeat steps 1 to 7 on page 4-82 using the pvop_fred.dat file, instead of
the pvlv_fred.dat file.
.I.
These steps will load the dimensional data for the ball valves lever operators.
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 4-85
Lab Solution
ng
lti
su
2 Using an ASCII text editor, open the renamed manufac_fred.dat.
We will need to add a record to the MANUFACTURERS table for our new standard
on
INSERT_INTO manufacturers
.I.
DATA_BLOCK_BEGIN
"FRD", "ANSI", "#"
B
DATA_BLOCK_END
DATA_BLOCK_BEGIN
"FRD","#", "PIPE_DIAMETER","PIPEDIA_IN"
DATA_BLOCK_END
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 4-86
Lab Solution
4 Using the Database Setup tool, load the DAT files that you just updated
(pvop_fred.dat, oper_fred.dat, manufac_fred.dat, and diatable_fred.dat).
5 Place Freds Piping Supply ball valves in Catalog mode and confirm that the
dimensions match the dimensions listed on the cut sheet.
The operator types listed in the Place - Valve dialog box are queried from the
VLV_VALID_OPER table. If you choose a type other than Lever, you will be asked to enter
the dimensional data. We will limit the operator type to Levers only when we define our
project piping specs.
g
l tin
su
on
C
.I.
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 4-87
Lab Solution
ng
lti
su
on
C
.I.
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 4-88
5 Customizing Attributes and
Component Labels
g
Chapter Objectives
[student page 5-71]
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 5-89
Introduction
--pip_atre_user_insul2.dat
--pip_atre_user_insul3.dat
--pip_atre_user_spool_no.dat
--sch_cond.dat
Introduction
Attributes in Design Series refer to intelligence associated with graphics, not MicroStation
ng
attributes like color or weight.
lti
The attribute definition tables define the attributes associated with each component.
su
on
C
.I.
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 5-90
Introduction
g
l tin
su
on
Configuration of attribute definitions should be done early in the project life cycle.
.I.
Within Microstation, the attributes for every Design Series component are stored in a text
string (or text element) that is commonly referred to as the component label. The component
label consists of the attributes displayed in the attributes dialog box. The contents of every
component label and the position of each attribute within the label are defined in the
ATTRDEFN table of your project database. The ATTRDEFN table is specification driven
and is used as the default means of accessing data for component placement. The
ATTRDEFN table makes the data accessible to users when they select the Specifications
option in the Placement Mode field in the Place Component dialog box.
Open ps_pipe.dgn in the Tutorial project and execute the MicroStation Element Information
command on any piping component. Explain that the first component is always a cell header
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 5-91
Introduction
and the second component is a text string. The text string contains the label. The first 80
characters are visible and the rest are contained in user linkage data.
If you are in Design Series, the MicroStation Element Information tool has a PlantSpace Data
tab that displays data in the same way that it is displayed in the Label Read tool.
These tables are referenced to create, edit, read, and parse the component attributes. When
ng
placing the first component, the user sees the default values in the attributes dialog box, as
shown in this generic example of an attributes dialog box.
lti
su
on
C
.I.
When the user places subsequent components, the values used in the last operation are
displayed in the attributes dialog box. Although these values are not updated in the database,
they are updated in the prompting software.
B
Different engineering standards (such as catalogs and specifications) may require different
sets of attributes for the same component. The standards may also require different sources
of values and different attribute hierarchies.
Design Series provides the following three attribute definition tables to address this issue:
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 5-92
Introduction
The attribute definition tables can be broken down into three layers where the ATTRDEFN
table is the main layer or Layer 0, and the ATTRCDEF table is Layer 1. Layer 2 of attribute
definition tables can also be used to define an attribute for an industry standard.
g
Layering of Specification and Catalog Attributes
tin
The following diagram shows the differences between specification and catalog attributes, as
follows:
l
For specification-driven attributes, the only table used is ATTRDEFN.
su
For catalog-driven attributes, the ATTRCDEF table is layered over the ATTRDEFN
table.
on
C
.I.
B
The following sections describe each attribute definition table in more detail.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 5-93
Introduction
ATTRDEFN Table
[student page 5-75]
The ATTRDEFN table (Layer 0 attribute definition table) defines attributes associated with
each component and forces Design Series to be specification driven. The ATTRDEFN table
is the only table that defines the label position, width, precision, and type of attributes.
ATTRCDEF Table
The ATTRCDEF table (Layer 1 attribute definition table) is used only when the user selects
ng
the catalog-driven option from within Design Series. Because the ATTRCDEF table is a
Layer 1 attribute definition table, it overlays the ATTRDEFN table so that only certain
columns and rows of the ATTRDEFN table are used.
lti
Using the ATTRCDEF Table with the ATTRDEFN Table
su
[student page 5-76]
As you recall, if a user selects the specification-driven option from within Design Series, the
ATTRDEFN table is used. However, if the user selects the catalog-driven option, the
on
The following example explains how both options can be used. You are placing two elbows,
one placed according to a specification and the other placed from a catalog table. The elbow
B
placed by the specification needs a SPEC attribute. The valid values for the elbow attribute
SIZE_1 are taken from the specifications table PIPE_PELB_SPEC based on SPEC. The
elbow placed by catalog does not have a SPEC attribute. The valid values for the elbow
attribute SIZE_1 are taken from the catalog table PIPE_PELB.
Both elbows must have the same set of attributes, so the attribute definition table
ATTRCDEF hides the SPEC attribute by using the value BEMR for the APP_FLAGS, and
assigns the value NOSPEC to the SPEC attribute by setting NOSPEC as the default value for
SPEC. The ATTRCDEF elbow attribute SIZE_1 has a different value for the
INPUT_METHOD causing it to query the PIPE_PELB table, instead of the
PIPE_PELB_SPEC table.
When the user places a pipe component and selects the Placement Mode option,
Specifications, the user must select a specification before placing the elbow. If the user selects
the Placement Mode option, Catalogs, a specification is not required before placing the elbow.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 5-94
Introduction
The ATTR_XXn tables (Layer 2 attribute definition tables) enable Design Series to use
multiple standards. When a user selects certain standards (such as EDS) in the attributes
dialog box, the ATTR_XXn tables are selected based on the value of the attribute STNDRD.
g
l tin
su
on
C
.I.
The value of STNDRD equals XXn of each ATTR_XXn table. Actually, _XXn is the value of
B
The ATTR_XXn tables are used together with the ATTRDEFN table. Because each
ATTR_XXn table is a Layer 2 attribute definition table, it overlays the ATTRDEFN table so that
only certain columns of the ATTRDEFN table are used.
The ATTRC_XXn tables (Layer 2 attribute definition tables) enable Design Series to use mul-
tiple standards. When a user selects certain standards (such as EDS) in the attributes dialog
box, the ATTRC_XXn tables are selected based on the value of the attribute STNDRD. The
value of STNDRD equals XXn of each ATTRC_XXn table.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 5-95
Introduction
The ATTRC_XXn tables are used together with the ATTRCDEF table. The values from
ATTRCDEF are used first and then the values of ATTRC_XXn are used.
The following table shows the columns of the attribute definition tables. The following codes
indicate which column data is used and not used in controlling the attributes:
ng
NO = Used, but not modifiable X = Not Used
(catalog driven)
ATTRC_XXn
ATTRDEFN
(catalog driven
ATTRCDEF
ATTR_XXn
(spec driven)
standards)
Attribute Definition Table su
Column Name
LEVEL_1 U NO NO NO
LEVEL_2 U NO NO NO
on
LEVEL_3 U NO NO NO
LEVEL_4 U NO NO NO
LEVEL_5 U NO NO NO
ATTR_NAME U NO NO NO
C
UNITS U X X X
CASE U X X X
ATTR_TYPE U X X X
.I.
LBL_POS U X X X
COL_WIDTH U X X X
LBL_WIDTH I X X X
B
DEC_PLACES U X X X
DESCRIPTION U U U U
BOX_ORDER U U U U
DEFAULT_VALUE U U U U
INPUT_METHOD U U U U
OVERRIDE_ALLOWED U U U U
VALID_MASK I X X X
GRAPHIC_PAR U X X X
WRITE_PRIVILEGE I X X X
READ_PRIVILEGE I X X X
APP_FLAGS U U U U
USER_FLAGS U U U U
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 5-96
Introduction
Warning: The ATTRDEFN table must contain all attributes. The Layer 1 and Layer 2
attribute definition tables cannot define new attributes. They can only redefine user input
data.
You can control whether to make specifications or catalogs available to users in the Placement
Mode options in the Place Component dialog box. For example:
If your company uses specifications and does not want users to accidentally select the
Catalogs option, you can delete the ATTRCDEF table from your project database by
g
using the SQL script file, Delete_attrcdef.sql. This file is in {network
drive}\Projects\{ProjectName}\Dbload\data. This action causes the Catalogs option to be
tin
grayed out.
If your company does not define any specs in the Specification Maker program, the
Specifications option will not be grayed out but users will not be able to select anything.
l
su
Stages in Editing the ATTRDEFN Table
[student page 5-79]
on
To meet project requirements, you can edit the attribute definition of any Design Series
component and then load the text file.
The process of editing the ATTRDEFN table consists of the following stages:
.I.
1 Editing the appropriate text file in your project directory and adding, changing, or
deleting attributes as required.
2 Updating the edited data file by using the Database Setup tool.
B
The ATTRDEFN table must contain all attributes. The Layer 1 and Layer 2 attribute
definition tables (explained earlier in the section Using Different Sets of Attributes for the Same
Component on page 5-92) cannot define new attributes. They can only redefine user input
data.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 5-97
Introduction
Design Series components are hierarchically classified. Each component belongs to a specific
class and subclasses (levels), and each class has some common attributes. The LEVEL_1
through LEVEL_5 columns are used to define hierarchical relationships.
When collecting the label fields for a particular component, the system performs a sequence
of queries of the ATTRDEFN table starting with the upper level and going to lower levels.
For example, if the component PIPE_PVLG belongs sequentially to the PIPE class, PVLG
ng
subclass, and REDUCING sub-subclass, the system first collects attributes that are:
Common for all components
WHERE LEVEL_1 IS NULL
lti
Then for class PIPE
WHERE LEVEL_1 = PIPE AND LEVEL_2 IS NULL
su
Then for subclass PIPE.PVLG
WHERE LEVEL_1 = PIPE AND LEVEL_2 = PVLG AND LEVEL_3 IS NULL
WHERE LEVEL_1 = PIPE AND LEVEL_2 = PVLG AND LEVEL_3 = REDUCING AND
LEVEL_4 IS NULL
C
Open East_River.mdb in Access and look at the values in the ATTRDEFN table where
LEVEL_1 is NULL (or empty).
.I.
This flexible method of classification helps organize the attributes and decreases redundancy.
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 5-98
Introduction
To create a component, the expert system requires most of the default attributes that are
displayed in the dialog box when you place the component. Therefore, deleting or renaming
default attributes can compromise the integrity of your system.
For example, if you delete or rename SIZE_1, the nominal diameter in imperial units of
piping components, the Design Series will not be able to perform certain functions.
g
Each required field is listed as follows with an explanation of the field. These fields
correspond to the schema of the Attrdefn table in your project database.
tin
For more information about the Attrdefn table, see the section Modeling Tables in Chapter 4
of the PlantSpace Design Series Administrator Guide. For more information about the schema of
the attribute definition tables, see the chapter Database Schema in the Design Series Reference Guide
for Administrators.
l
su
Select a row in the ATTRDEFN table and describe each column as you see the data in the
table.
on
C
LEVEL_1 The product name by convention and for compatibility with other
.I.
software
LEVEL_2 through Form a hierarchy within the product
LEVEL_5
B
ATTR_NAME and Identify the attribute name and its user prompt
DESCRIPTION Note: ATTR_NAME has a 9-character maximum length.
UNITS and CASE Identify the measurement units (and case for the field where
applicable) and are used to format the values
LBL_POS and Define the position and length of the text representation of the
COL_WIDTH attribute value in the label
DEC_PLACES Defines the number of digits to the right of the decimal point for real
numbers
DEFAULT_VALUE The initial value for the attribute
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 5-99
Introduction
INPUT_METHOD The source for the attribute values. Allowable sources are:
ENVVAR
Uses the value of a Windows environment variable (in Control
Panel>System) or a MicroStation configuration variable to set the
attribute value. For example, to set your Windows login name, the
value is ENVVAR(USERNAME).
KEYIN
Indicates that the user enters the value when the component is
placed
VALUES
ng
Provides a list of choices, such as VALUES V1,V2, V3...,
QUERY
Provides a list of choices retrieved from a table
Note: See the next section Using the INPUT_METHOD Query on
page 5-101.
lti
OVERRIDE_ALLOWED Indicates if the user is allowed to override the INPUT_METHOD
restrictions
su
BOX_ORDER Orders the display of fields in the attributes dialog box
GRAPHICS_PAR Indicates if an attribute is related to the graphic representation of the
component
on
A = automatically update the value if only one value exists for the
attribute during a label edit operation
B
The presence of a flag prevents the attribute from being used during
the named operation. More than one flag can be listed. For example, if
the APPS_FLAG for a label field is BEM, the field would not be
displayed in the attributes dialog box during build (B) or edit (E and
M) label operations, but would be displayed during the read (R) label
operation and would be copied (C) during a label matching operation.
USER_FLAGS Identifies user-modified and added attributes. The allowable flag is:
USER = user-modified attribute or added attribute
Explain for the OVERRIDE_ALLOWED field that using the Override value of "Y" in a spec-
driven query will allow the use of the default value that might possibly not be in the table being
queried.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 5-100
Introduction
This section details the use of the INPUT_METHOD column and the Query source
described in the previous table. Lookup tables define values for certain attributes of a
component based on the values assigned to the other attributes. These tables typically reflect
g
established project specifications for various components, and provide you with flexible,
tailored selection lists.
tin
The INPUT_METHOD query defines the LOOKUP tables to use and the attributes
involved in using the QUERY keyword.
l
The INPUT_METHOD query uses a modified form of Structured Query Language (SQL).
su
For complete details on using SQL statements, refer to third-party documentation on this
topic.
on
Design Series uses an abbreviated form of SQL syntax as synonyms in parts of the query
statement to simplify the statement and to remain within the 511 character limit of the
B
INPUT_METHOD query.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 5-101
Working with Component Labels
ng
statements and embedded SELECT statements.
Note: The $attribute construction is automatically replaced by the
current value of the named attribute in single quotation marks if
required for SQL syntax. (Text values are quoted, but numbers are not.)
ORDER BY Clause The optional ORDER BY clause is standard SQL. It alphabetically
lti
sorts the selected values to ensure a meaningful presentation to the
user. Without this clause, the selected values can be in any order.
Note: When both the DISTINCT keyword and the ORDER BY
su
clause are used, the ORDER BY clause cannot refer to columns that
were not mentioned in the QUERY.
on
The Database Setup tool not only creates a label position file but also updates it. Because
label attributes are accessed based on the rimref.dat file, design files must access the same
version of the rimref.dat file that you used when you created the design file. We will re-create
the rimref.dat file because you previously created this file in Chapter 2.
The label position file is an ASCII text file that identifies the label position, data type, and
length of every attribute. This file is used by Design Series and other applications that need to
access the intelligence of the Design Series components.
You should also save a copy of the rimref.dat file in case label changes are made in future
releases or a new attribute needs to be added to the project.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 5-102
Working with Component Labels
g
l tin
2 In the C:\Projects\East_River directory, select the rimref.dat file.
su
3 Click Save.
A message is displayed that a previous rimref.dat file exists. This is the file that you
created in the chapter Setting Up Your Project on page 2-13.
on
C
.I.
created.
The Design Series Label Display utility enables you to display the entire label (all the
attributes) for a selected component. You can then select a specific attribute to be displayed,
along with its position in the label.
This utility differs from the Label > Read option on the Design Series menu in that the Label
> Read option does not display all the attributes.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 5-103
Working with Component Labels
The Label Display utility is especially useful when you are trying to run the Label Convert
utility and something is not working. You can look at the label based on the values and format
in your rimref.dat file.
ng
lti
su
In the Component group, click the Select button.
on
3
4 In the drawing, select a component (as shown in the example indicated by the arrow),
and accept it with a data point.
C
.I.
B
5 To display the label from a position other than the default start position 1, type a new
number in the edit box and press <Enter>.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 5-104
Working with Component Labels
The label information for that position is displayed. The Position field at the bottom
of the dialog box displays the position number.
6 To display a different rimref.dat file (for example, one from an earlier version of
Design Series), click the Open Rimref Data File button.
The Data File Open dialog box is displayed.
g
l tin
su
7 Select a data file, and click OK.
You must select a data file containing the mapping information, such as the
on
rimref.dat file.
8 Select an attribute from the drop-down list box.
C
The value of this attribute is read from the label and displayed along with its position.
In the following example, the value for the BUD_TYPE attribute is PIPE_PIPE at
position 81.
.I.
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 5-105
Working with Component Labels
The Label Tool utility can also be used to create a mapping of the label attributes for all
components in a selected data file. This feature helps you determine where you have space in
a label, for example, to add new attributes.
Label positions 600 through 1196 in the default database are empty for every component type
to enable you to add new attributes to this section of the label. The ATTRDEFN table is the
only table that uses the label positions.
ng
A mapping is provided for each individual component, followed by a summary for each
commodity, and a total summary. A summary of common attributes only is also provided.
This mapping can be written to a selected output file in two different formats:
lti
As a mapping of component attribute names compared to label positions
As a summary of used and unused label positions
su
To create a mapping of component attributes compared to label positions
1 Follow the steps in the previous exercise on displaying a component label.
on
2 Click the Open Rimref Data File button if the rimref.dat file is not already displayed.
3 In the Data File Open dialog box, select a data file such as the rimref.dat file, and click
OK.
C
.I.
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 5-106
Working with Component Labels
g
tin
5 Accept the default name lblmap.txt or type a new file name, and click OK.
When the mapping is complete, the program writes the output to the selected output
l
directory. You can open the mapping output in a text editor, as shown in the
su
example.
on
C
.I.
B
The summary lists all the used and unused label positions in the rimref.dat file. The summary
is rather long.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 5-107
Working with Component Labels
ng
lti
su
on
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 5-108
Key Points in This Section
g
ASCII file called by convention the rimref.dat file.
The Label Tool utility differs from the Label > Read option on the Design Series menu in
tin
that the Label > Read option does not display all the attributes
The Label Display utility enables you to display the entire label (all the attributes) for a
selected component.
l
The Label Tool utility can also be used to create a mapping of the label attributes for all
su
components in a selected data file.
The summary lists all the used and unused label positions in the rimref.dat file.
on
This exercise shows you how to add a new attribute to the attribute definition table. We will
.I.
add an attribute called SCH_COND, which will assign a value of 0-4 to represent schedule
activity types described as follows:
B
0 New Construction
1 Demolition
2 Existing
3 Temporary
4 Future Construction
These values can be used by the Bentley Navigator product during schedule simulations.
For more information about schedule activity types, refer to the section Understanding Activity
Types in the chapter Creating Schedule Simulations in the Bentley Navigator User Guide.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 5-109
Adding an Attribute for Schedule Simulations
The process of adding this new attribute, involves the following stages:
1 Creating a new table in the project database that stores the schedule condition values
and descriptions
2 Creating a user-modified attribute definition (DAT) file
3 Running the attribute maintenance requirements
The following steps serve as an overall checklist necessary to add an attribute. Use this as a
ng
quick reference.
1 Look up LEVEL_1, LEVEL_2, LEVEL_3, LEVEL_4, LEVEL_5 for component
type(s) in the CLASSES table. Decide what sub-set of these defines the attribute to
lti
the group that you want.
2 For a new (or re-sized) value, find a location within the label for the attribute. The
Utilities > Label Tool can build a map or summary of the current label.
su
3 In a file that is not delivered, add the attribute definition, as follows:
Set the input method to validate the value entered by the user. This can be a
on
Set the app_flags to control which operations the attribute is hidden for. B=build
(place), E=edit, M=multiple edit, R=read. C=copy clears the old value and
displays the attributes dialog box when the Design Series Copy command is used.
.I.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 5-110
Adding an Attribute for Schedule Simulations
Warning: If step 8 is required, you must have a copy of the rimref.dat file used to
model the components that require the Label Convert operation.
g
The instructors file, sch_cond.dat, contains the finished file.
tin
! sch_cond.dat
! 25-Jun-2003 A.Leonard Initial creation of the SCH_COND table
which is used to define schedule condition values and descriptions.
l
su
CREATE_TABLE SCH_COND
on
TABLE_BEGIN
status CHAR 1/* Status value to match Schedule Simulator */
description CHAR 20
C
TABLE_END
DATA_BLOCK_BEGIN
.I.
"2", "Existing"
"3", "Temporary"
"4", "Future Construction"
DATA_BLOCK_END
3 Save the file and load it into the database by using the Load|Data File option in the
Database Setup tool.
4 Create a user attribute definition file called core_atre_user.dat in your
...\East_River\dbload\data\project\core directory and add the following lines to
the file:
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 5-111
Adding an Attribute for Schedule Simulations
! core_atre_user.dat
! 25-Jun-2003 A. Leonard Defines new attribute SCH_COND used to
identify schedule conditions for schedule simulations.
INSERT_INTO attrdefn
/*
ng
level_1, level_2, level_3, level_4, level_5
attr_name, units, case, attr_type, lbl_pos, col_width, lbl_width,
dec_places, description, box_order, default_value, input_method,
override_allowed, valid_mask, graphics_par,write_privilege,
lti
read_privilege, app_flags, user_flags
*/
su
State: Set user_flags to USER so that you can easily identify and modify the attributes that
we are customizing for our project.
on
DATA_BLOCK_BEGIN
,,,,,\
C
SCH_COND,,U,CHAR,500,1,,,\
"Schedule Condition",1,"0",\
"QUERY SCH_COND:STATUS ",\
.I.
N,,N,,,,USER
DATA_BLOCK_END
B
Explain the general format for an Input Method that queries a database table.
The label positions 500 though 1196 in the default database are empty for every component
type to enable you to add new attributes to this section of the label. The ATTRDEFN table is
the only table that uses the label positions.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 5-112
Displaying Descriptions for the Schedule Condition Attribute
6 After you finish modifying your attributes, check for errors by running the Attribute
Maintenance|Check Definitions option in the Database Setup tool.
7 Build storage tables.
8 Create the label position file.
9 Synchronize ams.lib.
10 In the 3D modeling environment, place a pipe component and confirm that the
default value for the Schedule Condition is displayed as 0 (zero).
g
Design Series only reads the label position file when MicroStation is first started. Therefore, it
is necessary to restart the 3D modeling environment.
tin
You should be able to select Schedule Condition values from a drop-down list box in
the attributes dialog box. Note that the values displayed are the numbers 0 (zero)
through 4.
l
su
Displaying Descriptions for the Schedule Condition Attribute
on
We will update the ATTR_DESC table in our project database to display meaningful values
instead of the numbers 0 (zero) through 4 in the attributes dialog box.
1 Copy the file \dbload\data\core\attr_desc.dat to the \dbload\data\project\core
C
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 5-113
Modifying an Existing Attribute, SPOOL_NO
ng
In this exercise, we will modify the existing attribute SPOOL_NO. The East_River project
requires that the spool number be 8 characters long and be displayed to the user. Currently,
the spool number is 3 digits long and not displayed to the user during placement.
lti
The process of modifying this attribute, involves the following stages:
1 Creating a new file named pip_atr_user.dat to store user-defined piping attribute
su
definitions.
2 Adding the SPOOL_NO attribute to our user-defined attribute definition file,
pip_atre_user.dat.
on
3 Modifying the app_flags, label position, and width for SPOOL_NO in the
pip_atre_user.dat.
2 Add the following line to the top of your pip_atre_user.dat file above the
INSERT_INTO statement:
B
3 Copy the attribute definition information for SPOOL_NO from the original file
(pip_atre.dat) and paste it into our user-defined attribute definition file,
pip_atre_user.dat.
4 Delete the B from the app_flags value.
5 Revise the attribute SPOOL_NO as shown below:
PIPE,,,,,\
SPOOL_NO,,U,CHAR,850,8,,,\
"Spool No.",20,"0000000",\
KEYIN,\
Y,99999999,N,,,,USER
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 5-114
Key Points in This Section
g
Key Points in This Section
tin
[student page 5-96]
l
su
The key points to remember in this section are:
Configuration of attribute definitions should be done early in the project life cycle.
on
string that is commonly referred to as the component label. The component label
consists of the attributes displayed in the attributes dialog box.
The contents of every component label and the position of each attribute within the label
.I.
are defined in the ATTRDEFN table of your project database. The ATTRDEFN table is
specification driven and is used as the default means of accessing data for component
B
placement.
All commodities have attribute definitions.
The ATTRDEFN table must contain all attributes and should not be edited directly.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 5-115
Lab: Updating Insulation Attributes
ng
State that students have 90 minutes to complete the Lab. Point out that if they need help, they
can refer to the Lab Solution that follows.
lti
Objectives su
This lab enables you to check your ability to perform the following skills:
Add a new attribute
Create a lookup table in the database
on
Scenario
Your project uses insulation type codes to specify insulation types and thicknesses. The
.I.
designers are familiar with using the codes, so they have requested that the codes be available
in a list box whenever they place piping components. To support the request, you must
customize your projects implementation of the Design Series to include a 4-character
B
insulation type code in the label for every piping component. You must also modify the
insulation thickness attribute to be automatically set based on the insulation type code. The
insulation type code and thicknesses to be used are displayed in the following chart.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 5-116
Lab: Updating Insulation Attributes
Directions:
1 Create a new table called INSULATION_CODE in your project database, which
contains the insulation type codes and associated thicknesses.
2 Add an attribute to all piping components that will hold the insulation type code.
g
Setup the new attribute, INS_CODE, to query the table you created in direction 1
for the list of insulation codes to be displayed. Set the default value to NA and do not
tin
allow values to be keyed-in.
3 Modify the insulation thickness attribute (INSULAT) so it is automatically set by
querying the table created in direction 1. Do not allow any values to be keyed-in. Try
modeling some piping components and see that a list box of the insulation type
l
codes is displayed. Select values from the list and make sure that the associated
su
thickness is set.
4 Update the database so that the insulation thickness will not be displayed when a
piping component is placed. (The user is not allowed to change the value, so the
on
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 5-117
Lab Solution
Lab Solution
[student page 5-99]
ng
/*
==================================================================
// insul.dat
lti
//
// 07-Oct-02 MJS Initial creation of the insulation_code
su
table which is used to define insulation type codes and
thicknesses.
//
==================================================================
on
*/
CREATE_TABLE insulation_code
C
TABLE_BEGIN
set_uniq_index insulation_code CHAR 4 /* insulation code*/
.I.
DATA_BLOCK_BEGIN
"CP34", 0.75
"CP10", 1.0
"CP15", 1.5
"ET10", 1.0
"ET20", 2.0
"ST10", 1.0
"ST20", 2.0
"HC10", 1.0
"HC20", 2.0
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 5-118
Lab Solution
"HC30", 3.0
"PP20", 2.0
"NA", 0.0
DATA_BLOCK_END
2 After you save the file, load it into the database with the Load|Data File option in the
Database Setup tool.
We can verify that the data was added properly by opening the INSULATION_CODE table in
our project database.
g
tin
To create a user attribute definition file
1 Edit the file called pip_atre_user.dat in your ...\project\pipe\english directory and add
the following lines to the file:
l
DELETE_FROM attrdefn where level_1 = PIPE and user_flags =
su
USER
PIPE,,,,,\
INS_CODE,,U,CHAR,600,4,,,\
on
"Insulation Code",15,"NA",\
"QUERY DISTINCT INSULATION_CODE:insulation_code order by
insulation_code",\
C
N,,N,,,,USER
2 Load the file into the database by using the Database Setup tool.
3 Create the label position file.
.I.
B
4 In the 3D modeling environment, place a pipe component and confirm that the
default value for the insulation code is displayed as NA and that all other values are
displayed in the drop-down list.
You should be able to select an insulation code from a drop-down list box in the
attributes dialog box.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 5-119
Lab Solution
ng
INSULAT,INCH,,REAL,142,4,,2,\
"Insulation Thickness",16,"0.00",\
"QUERY DISTINCT INSULATION_CODE where
lti
insulation_code=$ins_code order by insulat",\
N,,Y,,,,USER
su
4 Save the file, load it into the database, and re-create the label position file.
Because this lab only deals with pipe attributes that are not related to piping specifications,
no modifications are required to the pipcatre.dat.
.I.
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 5-120
Lab Solution
3 After you modify your attributes, check for errors by running the Attribute
Maintenance|Check Definitions option in the Database Setup tool.
4 Create the label position file.
5 Synchronize ams.lib.
g
Break Time: End of Day 2 (Fast learners can also complete the Challenge Lab.)
tin
Challenge Lab: Displaying Insulation Code Descriptions
l
su
[student page 5-101]
If you finish the previous lab early, you might want to try this more difficult lab. It is not
required.
on
Objectives
This lab enables you to check your ability to perform the following skills:
C
Scenario
.I.
To make the insulation codes readily understandable for users on your project, the
B
descriptions for these codes should be displayed in the attributes dialog box.
Directions
Update your project database so that descriptions are displayed in the attribute dialog for the
INS_CODE attribute. The descriptions associated with each insulation code are:
Code Description
CP34 3/4 inch Condensation Prevention
CP10 1 inch Condensation Prevention
CP15 1.5 inch Condensation Prevention
ET10 1 inch Electrical Trace
ET20 2 inch Electrical Trace
ST10 1 inch Steam Trace
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 5-121
Lab Solution
Code Description
ST20 2 inch Steam Trace
HC10 1 inch Heat Conservation
HC20 2 inch Heat Conservation
HC30 3 inch Heat Conservation
PP20 2 inch Personnel Protection
NA None
ng
Challenge Lab Solution
[student page 5-102]
lti
To include a description to be displayed in the attributes dialog box
1 Update the \dbload\data\project\pipe\insul.dat file to include an additional
su
column in the INSULATION_CODE table by adding the following line to the table
definition section of the file.
description CHAR 40
on
2 Update the data block in the insul.dat file to include a description value on every line.
Example line:
"CP34", 0.75, "3/4 inch Condensation Prevention"
C
quotation marks () could be used to simulate the double quotation marks or inch
symbol (), as the data in the description field is not critical to the operation of the
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 5-122
Lab Solution
6 In the 3D modeling environment, place pipe components and verify that the
insulation code descriptions are displayed in the drop-down list.
g
l tin
su
on
C
.I.
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 5-123
Lab Solution
ng
lti
su
on
C
.I.
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 5-124
6 Object Concepts and JSpace
Expressions
Beginning of Day 3: Review with question and answer what students learned in the last half of
Ch 4 and all of Ch 5.
g
Time Needed to Cover Chapter: 4-5 hours
Chapter Objectives
l tin
su
[student page 6-105]
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 6-125
Introduction
--06my_library Lab.lib
--06pipe.dgn
--ObjectOrientedTechnology.ppt
Introduction
JSpace is an object-oriented technology that enables users to configure their
applications in a manner that best suits their work environment. Design Series uses
ng
JSpace technology in various applications including Spec Maker, Object Reporter,
and PlantSpace AutoISOGEN. Having an understanding of the concepts of object-
oriented technology provides a foundation for understanding how these
applications use JSpace and how they can be customized.
lti
Explain that JSpace is Bentleys implementation of object-oriented technology and point out
su
that Design Series uses JSpace. JSpace is a very robust and extensive technology. We will
be learning only a small portion as it applies to Design Series.
on
State that the following is a brief list of some terms that you will commonly hear when talking
about object-oriented technology and that will be used in this Course Guide.
.I.
B
The file, ObjectOrientedTechnology.ppt can be used for this section instead of using a white
board.
Object
Class
A class provides a template for an object. The template is called the class definition.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 6-126
Introduction
Instance
g
Explain that instancing means creating. Applied to the example, you instance the class to
create a cookie by adding ingredients such as flour and sugar. By varying the ingredients,
tin
you instance different types of cookies such as chocolate chip or peanut butter.
l
Object-Oriented Technology and Relational Databases
su
[student page 6-106]
on
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 6-127
Introduction
Each table stores data relevant to a particular type of information or item. The rows
in a table represent a record, and the columns in a table represent the attributes of
each record.
TABLE NAME
Records
Columns
ng
Draw this table on the white board.
lti
When comparing a database to an object-oriented environment, we can make the
su
following analogies:
Table Class
Column Property
Record Instance of an object
C
(row)
.I.
B
In a relational database, a table defines the data to be stored for each type of
record. Different tables are usually created to store different types of information.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 6-128
Introduction
For example, a user may create one table for storing customer information:
TABLE: Customers
Customer ID Company Street Address City State ZIP
g
In an object-oriented environment, a similar template, or class, would be created
for storing customer information:
tin
CLASS: Customers
PROPERTIES: Customer ID
Company
l
su
Street Address
City
State
on
ZIP
Similarly, when an object is instanced, a class defined for that classification of object
is used.
.I.
Customer
Customer ID
Company
Street Address
City
State
ZIP
If you wanted to track purchase orders in a relational database, you would define
another table that could be linked to the customer table by using the customer ID.
In an object-oriented environment, you would create purchase order objects and
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 6-129
Introduction
establish a relationship between the customer objects and the purchase order
objects.
ng
Draw an example on the white board showing the customer object having a relationship to
several purchase order objects.
lti
Inheriting from Parents
su
[student page 6-108]
One of the most significant features of object-oriented technology is its support for
the concept of inheritance. Inheritance enables us to define a parent-child hierarchy
on
so that the features of a parent class are passed to a child of that class.
Parent
C
.I.
Child
B
Thus, the properties and relationships defined for a parent class are inherited by the
child class. Inheritance is the process whereby the features of a parent class are
passed to the child class.
A child class can inherit both properties and relationships from its parent class.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 6-130
Introduction
Class A
Property A
Relationship A
Class A is a parent of Class B
Class B is a child of Class A
Class B
Property A
Relationship A
g
Child
tin
Mention that not all of the properties of the parent have to be inherited by the child. You can
choose which properties are to be inherited.
l
su
In this case, class B (the child) inherits the properties and relationships that are
defined in class A (the parent). Class B can be further refined to include new
properties and relationships that are specific to it:
on
Class A
Property A
Relationship A
C
Class B
.I.
Property A
Property B
Relationship A
Relationship B
B
The concept of inheritance can be used to simplify the process of defining complex
data models. For example, consider the case of various piping components:
Highlight that the properties, Spec and Diameter, are common to all three classes.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 6-131
Introduction
In this example, the properties Spec and Diameter are common to all three classes.
To simplify the process of defining these classes, a parent class can be defined that
contains the common properties Spec and Diameter. This class would then become
the parent of all three classes:
ng
lti
su
In this example, the class Piping has been defined as a parent of Pipe, Elbow and
Valve. All three child classes inherit the properties from the parent class Piping.
on
By adding the new property to the parent class, all child classes automatically
inherit the new property.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 6-132
Introduction
Point out that inheritance can be used to simplify the process of defining a data model.
A class can have multiple parents. In this case, the child class inherits the features
from all of its parents:
g
l tin
su
on
C
A class with multiple parents can inherit from any of its parents.
.I.
In the example above, the class Nuclear Gate Valve inherits properties from both its
B
When defining a parent-child hierarchy, you should ensure that there is a logical
connection between the classes. A handy tip for doing so is to insert the term is a
between the child class name and the parent class names. For example, Nuclear
Valve is a Valve.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 6-133
Key Points in This Section
A unique feature of JSpace is that the object class definitions are maintained in class
libraries that are external to the application software. By embedding your
ng
knowledge base in JSpace, you can control the creation and behavior of complex
objects and collections of related objects without writing new software.
lti
Emphasize that JSpace offers the unique feature of storing class definitions external to the
application.
su
A class library is a collection of class definitions. By default, a JSpace class library is
identified by the LIB file extension.
on
JSpace objects are stored and maintained in JSpace object model files. By default, a
JSpace object model is identified by the JSM file extension.
C
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 6-134
Creating a JSpace Class, Properties, and Relationships
g
tin
Creating a JSpace Class, Properties, and Relationships
[student page 6-112]
l
Continue to follow along on your computer.
su
State this and emphasize that for this exercise, they need to follow along on the keyboard
on
You will set up a new class library and add a new class to it through the JSpace
Class Editor application. You can leave your Design Series application closed.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 6-135
Creating a JSpace Class, Properties, and Relationships
ng
lti
su
on
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 6-136
Creating a JSpace Class, Properties, and Relationships
g
A class name has the following characteristics:
Can be any length
tin
Must begin with a letter
Cannot contain blank spaces
l
su
You can replace blank spaces with an underscore (_).
Must be in uppercase
on
2
The new class is displayed in your class browser.
.I.
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 6-137
Creating a JSpace Class, Properties, and Relationships
ng
[student page 6-115]
lti
The property name, such as PIPE_DIAMETER or INSTALLATION_DATE
The property type, such as Long, Float, or String
su
The source of value that defines the way that a value is assigned, such as by
evaluating an expression or by inferring from a set of rules
The constraints on the value assigned to a property
on
Mention: In the following exercise, you will add a property to the class PIPING.
.I.
To add a property
1 From the Class Browser dialog box, select the class PIPING and click Edit.
B
Mention: You can also edit a class by double-clicking on the name of the Class in the Class
Browser dialog box.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 6-138
Creating a JSpace Class, Properties, and Relationships
g
tin
The Property Editor dialog box is displayed.
l
su
on
C
.I.
B
Mention: In the Property Editor dialog box, you can define the characteristics of the new prop-
erty, including the property name.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 6-139
Creating a JSpace Class, Properties, and Relationships
Must be in uppercase
Can contain any character except the following:
~`!&*()-+=[]|\;"',.<>?/
3 In the Property Editor dialog box, type or select the following:
ng
Explain the following to refresh the students memory:
For data type descriptions, see the chapter Data Types on page 3-1 in the JSpace Concepts
and Technical Reference document.
lti
An array is an ordered group of storage locations associated with the array name. The indi-
vidual storage locations, known as array elements, are referred to by a zero-based index
su
enclosed in square brackets ( [ ] ) appended to the property name. For example,
ATTRIBUTES[5].
If you want to show an example of an array, create an object model from the tutorial piping file
on
(ps_pipe.dgn) and open it in the JSpace Class Editor. The SNAP_POINTS property of any of
the piping objects (PIPE_PIPE, PIPE_PELB, and so on) will contain the coordinates of the
snap points of the component, such as [0], [1], [2]. The number of values in the array will vary
depending on the type of object.
C
An Array Length field specifies the length of the array. A variable length array is indicated by
the value "V".
.I.
Name: SPEC
Data Type: String
B
Array Length: 1
Value Constraint Expression: <none>
--If the expression evaluates to TRUE, the value is valid and is assigned to the property.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 6-140
Creating a JSpace Class, Properties, and Relationships
--If the expression evaluates to FALSE, the value is not valid and is not assigned to the prop-
erty.
--If the expression evaluates to FALSE and the Constraint Override setting is selected, you
are prompted to accept the value.
g
Explain each of the settings:
tin
If selected, the property and its value are stored with an object when it is created. If not
selected, the property exists in the class and a value is determined, but the property and its
value are not stored with an object when it is created.
l
su
Property Inheritance
If selected, the child class inherits the property. If not selected, the child class does not inherit
the property.
on
C
Value Inheritance
If selected, the child class inherits the value of the property from the parent class.
.I.
Value Override
If selected, the system prompts the user to override the computed value for the property if the
JSpace-based application (that is instancing the object) provides a way to prompt the user.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 6-141
Creating a JSpace Class, Properties, and Relationships
priority is inherited. The value for the Property Inheritance Priority must be an integer
between 0 and 99 with 0 indicating the lowest priority and 99 indicating the highest priority. By
default, the value of the Property Inheritance Priority is set to 0.
ng
inherited. The value for the Value Inheritance Priority must be an integer between 0 and 99
with 0 indicating the lowest priority and 99 indicating the highest priority. By default, the value
of the Value Inheritance Priority is set to 0.
lti
Source Radio Button
su
When you select the Source radio button, the JSpace expressions used to calculate the
source of value for the property are displayed in the list box. The source of value specifies
how the value for a specific property is determined when an object of that class is created or
instanced. Each JSpace property can have multiple sources of value assigned to it. When a
class is instanced and the first source cannot determine a value, the second source is evalu-
on
ated. If a second source cannot determine a value, the third source is evaluated, and so on.
C
properties or relationships are created, changed, or destroyed. For example, a daemon can
be assigned to change the diameter of a connecting pipe when the diameter of an equipment
nozzle is changed.
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 6-142
Creating a JSpace Class, Properties, and Relationships
4 Click Apply.
g
l tin
su
Mention: You have now added a property to the PIPING class.
on
evaluated. If none of the sources evaluate to a valid value, a value is not assigned
to the property.
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 6-143
Creating a JSpace Class, Properties, and Relationships
In the following exercise, we will add a fixed source to the property SPEC.
ng
To add a fixed source property
1 In the Class Editor dialog box, select the property SPEC and click Edit.
lti
su
on
C
.I.
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 6-144
Creating a JSpace Class, Properties, and Relationships
3 In the Fixed Source Expression Editor dialog box, click Input Property List
and click OK.
g
l tin
su
The fixed source property is displayed in the bottom list box of the Property
Editor dialog box.
an application is running. Before an object is updated, the current values for the properties of
that object are placed on the Input Property List.
.I.
In the example, we will add more properties to the class PIPING. We will add a
prompt source to the property SPEC.
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 6-145
Creating a JSpace Class, Properties, and Relationships
ng
The same fixed source (Input Property List)
A prompt source with no value expressions
lti
The Class Editor dialog box should now display three properties in the
PIPING class, as shown.
su
on
C
.I.
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 6-146
Key Points in this Section
3 Click the Add a Prompt Source button (the red question mark).
4 In the Prompt Source Editor dialog box, add the following value
expressions with quotation marks (''):
DB_QUERY ("East_River","Select Distinct SIZE_1 from PIPE_DIAMETER")
Make sure that the name East_River exactly matches the name that you
gave for your ODBC data source.
We will be discussing the use of built-in functions such as DB_QUERY later in the chapter so
do not spend much time now trying to explain the function.
g
tin
5 Click OK in the Prompt Source Editor dialog box.
6 Click Apply in the Property Editor dialog box and Close in the Class Editor-
PIPING dialog box.
l
7 From the JSpace Class Editor menu bar, choose File > Save to save your
su
changes.
on
A unique feature of JSpace is that the object class definitions are maintained in
class libraries that are external to the application software.
A JSpace class library is a collection of class definitions, identified by default by
the LIB file extension.
A JSpace object model file is a collection of objects (instances), identified by
default by the JSM file extension.
A property is a characteristic of an object. Each class can have one or more
properties.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 6-147
Working with JSM Files and Objects
The process of working with JSM files involves the following stages:
1 Creating and activating a new JSM file
2 Instancing an object
ng
3 Defining a parent-child hierarchy
lti
su
JSpace Object Model Files
A JSpace object model file, or simply JSM file, is a container for storing JSpace
objects. The JSpace Class Editor not only enables users to create class libraries and
on
define classes, but it also enables the instancing of objects in a JSM file. It should be
understood that although the Class Editor enables us to do this, it is not the way in
which JSM files are usually created or objects instanced. We are using it in this
manner to demonstrate the results of our class definitions. In normal situations, you
C
create the JSM file and instances using an application, such as the JSpace
MicroStation Connection.
.I.
We are going to instance objects within the JSpace Class Editor for learning purposes. This
is not generally done in using JSpace applications.
B
Alternatively, you can select the New File icon from the Class Editor menu bar.
2 In the Files of Type field, change JSpace Class Library to JSpace Object
Model.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 6-148
Working with JSM Files and Objects
Make sure that everyone follows this step or they will end up with a *.lib file instead of a *.jsm
file.
g
l tin
su
on
C
.I.
The Object Browser lists all objects contained within a JSM file. The following three
columns are displayed in the Object Browser dialog box:
Column Description
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 6-149
Working with JSM Files and Objects
Column Description
ID The unique number that is automatically generated every time you instance
an object. An object ID is a combination of two numbers:
A file number, which is unique for every JSM or class library
An object number, which is unique to every object within a JSM
Combining these two numbers ensures that every object created by JSpace
has a unique ID. Generally, the object ID is of no real interest to a user.
Name If an object has a NAME property, the value assigned to this property will be
displayed.
ng
Activating a JSM File
To create an instance of an object, you must have an active file in which the objects
lti
will be created. If you look at the Class Editor status bar at the bottom of your
screen, you will notice the comment "No Active Model Defined".
su
To activate the JSM file
1 In the Object Browser dialog box for your new JSM file, select Activate.
The status bar now reads Active Model: my_file.jsm. Now the objects that
on
Instancing Objects
C
After you create a class definition for PIPING objects, you can create an instance of
the class.
B
To instance an object
1 Open the Class Browser dialog box in my_library.lib, and select the PIPING
class.
2 Click Instance.
You are now prompted to enter a value for the property SPEC.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 6-150
Working with JSM Files and Objects
3 In the Enter SPEC field, select CS150 from the list and click OK.
The Prompt dialog box for LINENO is automatically displayed.
4 Type 2 and click OK.
The Prompt dialog box for SYSTEM is automatically displayed.
5 Type AD and click OK.
The Prompt dialog box for SIZE is automatically displayed.
6 Select 6 from the list and click OK.
Warning: Do not press the <Enter> key in place of the OK button because the
g
focus is on the Abort key and will return a misleading error message.
tin
The PIPING class object is instanced and is displayed in your Object
Browser.
If you failed to activate the JSM file, objects are instanced in the class library.
l
If this happens, you can simply delete the instances from the class library
su
Object Browser dialog box.
To review the object created, double-click it in the Object Browser dialog box. The
Relationships and Properties dialog box is displayed. This dialog box contains the
on
class name of the object, the properties of the object, and the values assigned to the
properties. We will look at this dialog box in greater detail later. So you can close it
now.
C
When a property is not assigned a value, JSpace shows this by displaying "NULL" for a
value.
NULL is different from a value of zero (0) or blank character (" "). A NULL value indicates that
no value has been assigned to the property. Zero or blank are valid values that can be
assigned to a property.
Parent-Child Hierarchy
[student page 6-124]
In JSpace, you can create a new class as a child of an existing class. Because the
child class can inherit all of the properties, relationships, and rules of the parent
class, it is easier to create a child class based on a parent class than to create a class
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 6-151
Working with JSM Files and Objects
from the beginning. You can then customize the child class by adding additional
properties, relationships, and rules as needed.
In the following exercise, we will step through the process of adding PIPING as a
ng
parent to a new class, VALVE.
lti
1
2 In the Enter Class Name field, type VALVE, and click OK.
su
You have now added a new class, VALVE, to the class library. Now you
need to add a parent to the VALVE class so that VALVE can inherit the
properties and relationships.
on
Properties to Parents.
.I.
B
The display in the Class Editor dialog box is changed to show parents of the
VALVE class. However, no parents exist at this time.
3 In the Class Editor dialog box, click Add.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 6-152
Working with JSM Files and Objects
g
l tin
su
You must now select the class library containing the parent that you want.
You will add the class PIPING as a parent from my_library.lib.
To add a parent, the class library that contains the class definition must
on
be open.
4 From the Class Library drop-down list box, select my_library.lib, if not
already selected.
C
Even though we did not open it, jclass.lib is listed in the drop-down list
box. When a JSpace application is started, jclass.lib is automatically opened.
5 From the Classes list box, select PIPING.
.I.
To verify inheritance
1 To verify the inheritance of the properties from PIPING, in the Class Editor
dialog box, change the List Of drop-down list box from Parents to
Properties.
You will see that the properties SPEC, LINENO, SIZE, and SYSTEM are
displayed. Also, in the Class Editor dialog box, you will notice the columns
Origin Class and Origin Library. The Origin Class (containing PIPING) is the
class from which the property originated. The Origin Library is the class
library in which the origin class originated.
In this exercise, because our classes contain only properties,
relationships are not inherited.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 6-153
Working with JSM Files and Objects
ng
Array Length: 1
3 Click the Add a Prompt Source button.
lti
4 In the Prompt Source Editor dialog box, add the following allowable value
expressions with quotation marks ():
GATE
su
BALL
CHECK
on
Point out that the Origin class for the TYPE property is VALVE.
.I.
VALVE class
1 In the JSpace Class Editor dialog box, make sure my_file.jsm is the active
model.
You must have a JSM file open to instance a class.
2 In the Class Browser dialog box, select the class VALVE and click Instance.
Each Prompt dialog box is automatically displayed one after another
displaying the values that you entered, as follows:
In the Enter Spec field, select CS150 and click OK.
In the Enter LINENO field, type 2 and click OK.
In the Enter SYSTEM field, type AD and click OK.
In the Enter SIZE field, select 6 and click OK.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 6-154
Working with JSM Files and Objects
An instance of the VALVE class has been added to the JSM file. Review the object to
confirm that the properties have been assigned values.
When you make a change to a parent class, those changes are also reflected in its child
classes.
g
tin
If you want the changes that you make to a class definition to update child classes, you must
ensure that the class libraries containing the child classes are open.
l
su
Localizing a Property
The parent class owns the properties that are inherited by the child. Typically, a change to a
property should be made in the parent class. However, if you need to modify only a property
on
for a child class, you should first change the ownership of the property to the child class. The
process of changing the ownership of the property from the parent to the child is known as
localizing. Localizing breaks the link from the property in the parent class to the property in
the child class. However, if the child class is the parent of another class, that parent-child link-
C
Tip: The Localize operation enables you to quickly copy properties from one class to another.
B
To infer a value for a property from a set of rules, you can use an Inference Source.
Each class can have a set of rules associated with it to infer the values of the
properties of the class.
To instruct JSpace to assign a property value based on a set of rules, you must
perform two steps:
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 6-155
Working with JSM Files and Objects
1 You must define an Inference Source for the property. This instructs JSpace
to evaluate the rules associated with the class to determine the property
value.
2 You must define the inference rules for a class. An inference rule enables
JSpace to evaluate a property value based on a series of user defined
IFTHEN statements.
Let's look at the format of inference rules. An inference rule, stated as an IF-THEN-
ng
ELSE proposition, means the following:
IF (ELSEIF) certain conditions are met
THEN certain assertions can be made
lti
ELSE other assertions can be made
su
Using Comparison Operators
[student page 6-128]
on
When comparing the value on one property or constant to another, you can use
comparison operators. The following is a table of valid comparison operators:
C
Comparison
Description
Operator
== Is equal to
.I.
!= Is not equal to
> Is greater than
B
When using the "is equal to" comparison operator, you must use two equals (=)
signs. By using only one equals (=) sign by mistake, you can inadvertently assign a
value to the property rather than compare it.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 6-156
Working with JSM Files and Objects
Logical Operators
A logical operator enables you to stipulate one or more conditions that must be
TRUE for the expression to be true.
Logical
Description
Operator
g
In the following exercise, you will add a new value source to the property TYPE in
tin
the VALVE class. We are going to add inference rules that will determine the value
for the property TYPE based on the following:
Size Type
<=5 Check
l
su
>5 Gate
Because this is just an instructor-led exercise, you should ignore the logic of this
on
example.
1 In the Class Editor - VALVE dialog box, select TYPE and click Edit.
2 In the Property Editor dialog box, click the Add an Inference Source button
(the If button).
.I.
3 Select or highlight the entire line for the inference source just added, and
then click the Promote button, which is now enabled.
B
This action tells the system to first look for the rule. Then if no value is
found, the user is prompted for the value.
4 Click Apply in the Property Editor dialog box.
5 In the Class Editor - VALVE dialog box change the List of drop-down list box
from Properties to Rules.
6 Click the Add button.
7 In the Rule Editor dialog box, type the following rule:
IF
SIZE <= 5
THEN
TYPE = "CHECK"
ELSE
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 6-157
Key Points in this Section
TYPE = "GATE"
8 Click Apply.
9 In the Class Editor - VALVE dialog box, click Close.
10 Instance valve objects in your JSM file to confirm that the rule is working.
Hint: Define one valve with a size less than 5 and another valve with a size
greater than 5.
ng
Key Points in this Section
[student page 6-129]
lti
Paraphrase the key points.
su
The key points in this section are:
A JSpace object model file, or simply JSM file, is a container for storing JSpace
on
objects.
To create an instance of an object, you must first activate a JSM file.
In JSpace, you can create a new class as a child of an existing class.
C
Each class can have a set of rules associated with it to infer the values of the
properties of the class.
.I.
You have seen JSpace expressions used in a number of different places. A JSpace
expression is a statement that JSpace evaluates to obtain a single value. An
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 6-158
Using JSpace Expressions to Format a Pipeline Callout
JSpace expressions can contain one or more of the following basic building blocks:
Numeric constants (0-9, +, -, .)
Character constants (a string of characters enclosed in quotation marks " ")
Logical constants (TRUE, FALSE)
g
Properties (a name of a class property)
tin
Built-in functions (routines used to perform specific tasks or computations)
Operators (+, -, /, *, AND, OR, ==, !=, <, <=, >, >=, =)
l
su
The following are examples of JSpace expressions that your instructor will explain:
NAME = "Piping Component"
DIAMETER = 2
on
THICKNESS = 5 * 3.142
DIAMETER = SIZE
C
Show example results of the expression for VLV_CALLOUT by writing the following on the
white board as you explain it. Write the result column last, then explain it.
B
V 003 V003
PV 123 A PV123A
PSV 01 B PSV01B
In the following exercise, we will create a JSpace expression that will result in a
formatted pipeline call-out, which will be AA-CS150-L002-1.5.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 6-159
Using JSpace Expressions to Format a Pipeline Callout
ng
4
5 In the Fixed Source Expression Editor dialog box, click the Add an
Expression button (the blue dot button).
6 Double-click the blue dot with the red X to open the Expression Editor
lti
dialog box.
7 Type the following JSpace expression:
su
SYSTEM+SPEC+LINENO+SIZE
8 Click the Verify button to confirm that the syntax of your expression is
correct.
on
C
.I.
Point out the new entry PIPELINE_CALLOUT in the properties dialog box.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 6-160
Using JSpace Expressions to Format a Pipeline Callout
SIZE: 1.5
3 In the Object Browser dialog box, double-click the PIPING object just
added and confirm that the value for PIPELINE_CALLOUT is aaCS15021.5.
4 Close the Relationships and Properties dialog box.
Although the call-out has all the necessary information, it is not formatted the way we would
like. Write the desired result of AA-CS150-L002-1.5 on the board and state that we need to
update our JSpace expression to obtain the desired results.
g
To add the dashes and the L prefix to the line number
tin
Explain that we are going to use an iterative process to update our JSpace expression.
Therefore, we are going to use the Evaluate Expression functionality.
l
su
1 In the Class Browser dialog box, double-click the PIPING class.
2 Double-click PIPELINE_CALLOUT to edit it.
3 Select the JSpace expression SYSTEM+SPEC+LINENO+SIZE, and right-click
on
PIPING object that we just instanced, and click the Build button (next to
Evaluate Expression).
.I.
6 Right-click and paste the JSpace expression into the Expression area of the
Expression Editor dialog box.
7 Click the Verify button to make sure that the syntax is correct and then click
B
OK.
8 Update the expression so that dashes ( - ) will be placed between each of
the property values, and an L will be added before the line number.
Your expression should now be one of the following:
SYSTEM+"-"+SPEC+"-"+"L"+LINENO+"-"+SIZE
SYSTEM+"-"+SPEC+"-L"+LINENO+SIZE
9 Verify the expression and click OK to close the Expression Editor dialog
box.
10 Click Apply (next to Evaluate Expression) and confirm that your results are:
aa-CS150-L2-1.5
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 6-161
Using JSpace Expressions to Format a Pipeline Callout
ng
State: A full description of the Expression Editor is available in Appendix B and Appendix C of
the JSpace Concepts and Technical Reference. Appendix B in this Course Guide describes
built-in functions. We are going to use built-in functions to overcome the two problems that
we just identified.
lti
2 Select the folder for Built-in Functions.
su
Briefly explain functions:
-- Built-in functions are routines that can be used in any JSpace expression to perform spe-
on
cific tasks or computations. For example, MIN (10, 5, 68) will return the value 5 because 5 is
the minimum number in the list.
-- Arguments passed to a built-in function must be of a particular data type. For example, the
values passed to MIN must be numbers (double or long).
.I.
-- Some functions allow optional arguments. For example, the declaration of MIN in the docu-
mentation is:
B
MIN (ARG1[,ARG2,ARG3,...,ARGn])
-- Function calls are always in the format, function_name(...) where ... represents 0 (zero) or
more arguments.
3 Select the Function Type String and the Built-in Function TOUPPER.
You will see a brief description of the function displayed in the lower left
corner.
4 To open the documentation in PDF format, choose
JSConceptsandTechRef.pdf from the ...\Bentley\Documentation\TriForma
\InterferenceMgr directory created when the software is installed.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 6-162
Lab: Using JSpace Expressions to Format a Pipeline Callout
Look at the documentation for the TOUPPER function and highlight the following items:
-- the Description indicates that all characters of a string will be converted to uppercase. This
will solve the problem that we previously identified with the system (aa will be converted to
AA).
-- The argument needs to be a string.
g
-- The return value is a string.
tin
5 In the Expression Editor, update the expression to include the TOUPPER
function, as follows:
TOUPPER(SYSTEM)+"-"+SPEC+"-L"+LINENO+"-"+SIZE
l
Verify and evaluate the expression.
6
su
Your result should be:
AA-CS150-L2-1.5
on
7 Copy the expression from the Expression Editor and replace the existing
expression in the PIPELINE_CALLOUT property of the PIPING class in
my_library.lib.
Save my_library.lib to use in the next Lab.
C
8
.I.
Objectives
This lab enables you to check your ability to perform the following skills:
Identify a built-in function (or functions) that can be used to format a numeric
value.
Call a JSpace function with multiple arguments.
Update a JSpace expression to include a function call.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 6-163
Lab Solution
Scenario
In the exercise, we created a JSpace expression that resulted in the pipeline callout:
AA-CS150-L2-1.5
Now we want to update the expression so that the line number will be in the
standard format, Lxxx where xxx is a zero-padded number. For example, L002,
L123, or L045. The final pipeline callout result for our data set should be:
AA-CS150-L002-1.5
ng
Directions
1 Open my_library.lib and my_file.jsm in the Class Editor.
2 Use the Expression Editor or the JSpace Concepts and Technical Reference
lti
PDF file to locate a function that can be used to zero-pad a value.
su
State: If the expression is not in the Expression Editor, use the documentation.
Lab Solution
.I.
The solution to this Lab could use either PADTEXT( ) or FORMAT_INTEGER( ) so you
should be ready to discuss both functions.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 6-164
Challenge Lab: Identifying the Pipe Size in Fractions
8 Verify your expression and exit the Expression Editor dialog box.
9 Click OK in the Fixed Source Expression Editor dialog box.
10 Click Apply in the Property Editor dialog box and close the Class Editor -
PIPING dialog box.
g
11 Instance a new PIPING object with the following values:
tin
SPEC: CS150
LINENO: 2
SYSTEM: aa
l
su
SIZE: 1.5
12 Open the PIPING object just created and verify that the value for
PIPELINE_CALLOUT is AA-CS150-L002-1.5.
on
If you finish the previous lab early, you might want to try this more difficult lab. It
.I.
is not required.
B
Objectives
This lab enables you to check your ability to perform the following skills:
Include a conditional option within a JSpace expression
Scenario
Because of project changes, your pipeline callout for the Instrument Air piping only
needs to identify the pipe size as fractions of an inch. For example:
AI-CS150-L002-1"
You therefore need to update the JSpace expression for the PIPELINE_CALLOUT
property to convert the size from a decimal value to a fractional value when the
SYSTEM property has the value AI.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 6-165
Challenge Lab Solution
You can assume that all values in the SYSTEM property are upper case.
Directions
Hint 1: The IIF and TO_FRAC functions should be used.
Hint 2: JSpace supports embedded quotation marks preceded by a
backward slash ( \ ). For example, the JSpace expression,
"This is an inch mark:\" "
when evaluated, will return:
This is an inch mark:"
ng
1 Open the 06ChallengeLab.jsm file in the JSpace Class Editor.
2 Copy your current JSpace expression for the PIPELINE_CALLOUT property
and paste it into the Expression area of the Object Browser -
lti
06ChallengeLab.jsm dialog box.
3 Use the five sample PIPING objects to evaluate your expression as you
su
make iterative updates to your expression.
PIPELINE_CALLOUT property. The objects also have descriptive names to make testing of
the JSpace expressions easier.
C
The TO_FRAC function converts the pipe size value (which is in inches and decimals of an
inch) into a whole number and a fraction. The accuracy of the fractions is determined by the
second argument to the function. The IIF function is used to conditionally call the TO_FRAC
function for Instrument Air piping components only.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 6-166
Design Series Class Libraries, Ams.lib and Ams_user.lib
The Design Series class library used to create objects from the Design Series 3D
components is ams.lib. Many post-processing modules, such as PlantSpace
AutoISOGEN, Object Reporter, and Interference Manager, use and depend on the
classes defined in ams.lib.
g
component classes in ams.lib have a corresponding parent class (*_USER) in
ams_user.lib.
tin
Changing Data in the Class Libraries
l
Warning: In general, you should not modify the ams.lib class library.
su
The ams_user.lib class library enables you to edit and modify the component
descriptions without modifying the ams.lib class library directly. As shown in the
following diagram, the parent of the PIPE_PELB class in ams.lib is the
on
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 6-167
Design Series Class Libraries, Ams.lib and Ams_user.lib
Temporary or intermediate properties are properties that have their Include With
Object flag deselected. In the class of PIPE_BASE_USER in ams_user.lib, several
temporary or intermediate properties are defined.
For example, the ZZ_FL_TYPE_DESC property is the temporary holding place for
the expanded description for the FL_TYPE property. All of these class names begin
with ZZ_, which has no meaning other than to force all of these properties to the
bottom of the alphabetical list in the Class Editor.
ng
The following are temporary or intermediate properties used to store descriptions
in ams_user.lib in the PIPE_BASE_USER class:
lti
Property Name Description Property
BR_TYPE ZZ_BR_TYPE_DESC
su
CONN_1 ZZ_CONN1_DESC
CONN_2 ZZ_CONN2_DESC
FL_FACE ZZ_FL_FACE_DESC
FL_TYPE ZZ_FL_TYPE_DESC
on
STR_TYPE ZZ_STR_TYPE_DESC
STYLE ZZ_STYLE_DESC
VLV_TYPE ZZ_VLV_TYPE_DESC
C
Because PIPE_BASE_USER is the parent class for all the PIPE_*_USER classes, the
temporary properties of the parent class are inherited by all of the child classes. The
.I.
temporary properties are also inherited by the PIPE_* classes in the ams.lib library.
Warning: If you make any changes to the classes in ams_user.lib, you must then use the
B
Database Setup tool to synchronize the ams.lib library with the new ams_user.lib. This
operation ensures that all changes to the parent class are inherited by the child classes.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 6-168
Creating a JSM File from a DGN
In this exercise, we will analyze the way that Design Series uses the data from a
design file to create the JSM file. We will analyze this process in the following
stages:
1 Viewing a design file
2 Viewing the rimref.dat file
g
3 Using the Label tool
4 Creating an object model file
tin
5 Analyzing the JSM in the JSpace Class Editor
For this exercise, we will use a simplified DGN file called 06pipe.dgn.
l
su
To analyze how data in a DGN is used to create a JSM
1 Open 06pipe.dgn in the East_River project and use the Read Label
command to display the attributes dialog box.
on
Remind the students that the actual attribute name is displayed in the lower left corner of the
attributes dialog box when you select a line.
C
2 Choose Design Series > Utilities > Label Edit or Read to open the Label
Operations tool box.
.I.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 6-169
Creating a JSM File from a DGN
ng
lti
su
on
C
.I.
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 6-170
Creating a JSM File from a DGN
Open your create_jsm.ppt file and display the two slides on the overhead projector.
Note: The 2 graphics in your instructor guide and slide show contain numbers 1 through 7.
(The graphics in the student guide do not have these numbers.) The numbers show you what
to point to as you cover explanations 1 through 7 below.
Every Design Series component turns into an intelligent object representation. The class
library used during this process is ams.lib. (The stages of the process are numbered on the
slides. Point out each stage in the slides as you explain the following:)
g
Slide 1
1. A component is read from the design file and the BUD_TYPE is determined.
tin
2. Based on the BUD_TYPE, information is read from rimref.dat to extract the attribute values
from the label of the component. For example, SYSTEM is a character (or alphanumeric)
value starting in position 113 of the label and spanning 8 characters.
l
su
3. The Input Property List, an area in memory referenced from the class library, is filled with
name-value pairs. The names are the attribute names defined in rimref.dat and the values
are extracted from the label.
on
4. Snap points are graphical components in the design file, but the program automatically
adds coordinate values for the snap points to the Input Property List.
Slide 2
C
5. and 6. The object is instanced. If ams.ib contains a class definition with a name that
matches the BUD_TYPE, that class will be instanced. If no match is found, a
PHYSICAL_GROUP object will be created. This object will be a non-intelligent graphical rep-
resentation.
.I.
7. If step 5 occurred, the properties of the object will be assigned based on the class defini-
tion.
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 6-171
Creating a JSM File from a DGN
=====================================================
ZZ_B_RADIUS_DESC
DB_QUERY("PS_CODES_DB","SELECT Description FROM B_RADIUS_DESC WHERE
code="B_RADIUS+" ' ")
B_RADIUS __ (from JSM file)
=====================================================
ZZ_CONN1_DESC
ng
DB_QUERY("PS_CODES_DB","SELECT Description FROM CONN_DESC WHERE
code=' "EPREP1+" ' ")
EPREP1 __ (from JSM file)
lti
Look in the database table and get BUTTWELD for ZZ_CONN1_DESC.
su
=====================================================
Now you have all the necessary values to figure out COMP_DESC resulting in:
ELBOW, 90 DEG., LONG RAD., BUTTWELD
on
Value:
C
A = "ELBOW,"+B_ANGLE+"DEG.,"+ZZ_B_RADIUS_DESC+"RAD.,"+ZZ_CONN1_DESC
A = "ERROR IN COMP_DESC"
.I.
ZZ_CONN1_DESC BUTTWELD
================================================================
ZZ_B_RADIUS_DESC
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 6-172
Key Points in This Section
===============================================================
ZZ_CONN1_DESC
g
==============================================================
tin
Now you have all the necessary values to figure out COMP_DESC resulting in:
l
su
Key Points in This Section
on
components is ams.lib.
All of the component classes in ams.lib have a corresponding parent class (*_USER) in
ams_user.lib.
Based on the BUD_TYPE, information is read from rimref.dat to extract the attribute
values from the label of the component. For example, SYSTEM is a character (or
alphanumeric) value starting in position 113 of the label and spanning 8 characters.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 6-173
Key Points in This Section
ng
lti
su
on
C
.I.
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 6-174
7 Defining Piping Specifications
g
Chapter Objectives
[student page 7-143]
Create reports
.I.
Training files for the student: none (files are supplied in the software)
Training files for the instructor:
--East_River_Lab1.s71
--East_River_Lab2.s71
--East_River_Lab3.s71
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 7-175
Introduction
Introduction
PlantSpace Specification Maker (or simply Spec Maker) creates and manages
material specifications for various component types such as pipe, fittings, and
valves associated with a Design Series model for a particular project database. Spec
Maker uses ODBC to communicate with the database.
Spec Maker communicates directly with your Design Series database. In your
Design Series model, you can place only components that are synchronized to the
various specification tables in your database.
ng
Spec Maker Objects as JSpace Objects
lti
Spec Maker stores its data in s71 files. These file formats are actually JSpace model
(JSM) files. As such, the JSpace Class Editor can open these files. Because Spec
Maker data files are JSpace model files, Spec Maker data consists of JSpace objects.
su
These Spec Maker objects are displayed in the Spec Maker project window. The
classes along with their locations in the Spec Maker tree structure are:
Project (first-level)
on
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 7-176
Introduction
PSDesign.s71
A complete, sample project file with specs specifically made for use with
the PlantSpace Design Series QuickStart Guide
CompDefn.s71
A project file containing only component definitions designed to work with
the default PlantSpace database
Eds-specs.s71
A sample project file with specs for the European Data Set (EDS) standard
g
Eds-compdefn.s71
tin
A sample project file containing component definitions for use with the
European Data Set (EDS) standard
l
Explain the following diagram.
su
The following graphic shows the data structure of a Spec Maker project
specification file. Spec Maker provides two major views, namely component view
on
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 7-177
Introduction
Specifications
[student page 7-145]
Open PSDesign.s71 and CompDefn.s71 in Spec Maker. Show online how the spec files are
displayed in the directory structure.
ng
CS150, which represents Carbon Steel with a 150 pound rating. Each specification
(or simply spec) is arranged in a tree structure, as shown on the left side of the
following graphic.
lti
su
on
C
Component Types
.I.
Show online how component types and guidelines are displayed in the directory structure.
In the previous graphic, you can see at a glance all the component types associated
with a spec. When you select a component type associated with a spec, its
guidelines are displayed. In the example, component type "Adapters" for the spec
CS150 consists of three guidelines labeled GL1, GL2, and GL3.
Guidelines
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 7-178
Introduction
criteria and data values for that guideline are displayed in the list pane, as shown
on the right side of the previous graphic.
Specification Criteria
The specification criteria (displayed only in the list pane) are the data (dimensions
or values) required for a particular guideline. For example in the previous graphic,
guideline GL1 is set up so that the larger end of the adapter must have a diameter
within 0.75 to 2 inches.
g
Project Windows
tin
State: When you open a project specification file, the contents of the file are displayed in a
project window. (Point out online the two project windows, one for each file.)
l
su
on
C
.I.
B
Project
Windows
You can open multiple project spec files at the same time and copy data from one file to
another. In the example, two project files are displayed, PSDesign.s71 and CompDefn.s71.
All project windows can be displayed as four panes, as shown in PSDesign.s71:
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 7-179
Setting Up a Project Specification File with Specifications
An upper tree pane and list pane to view the project from one perspective, such as guidelines
in the example
A lower tree pane and list pane to view the project from another perspective, such as compo-
nent criteria in the example
ng
You can specify the information displayed in these panes by selecting a view option in either
the View menu or the View tool bar.
lti
(Students should know from the product documentation how to view a project specification
file. If not, demonstrate how to:
su
-- Move through the levels of the tree, select various view options by using the tool bar, menu
bar, popup menu, and keyboard, manipulate the project window (enlarge and reduce it)
-- Customize the display of the Spec Maker interface by 1) displaying the status bar,
2) displaying, moving, and enlarging the tool bars, 3) enlarging the font size of text in the
on
Follow along with the instructor. Appendix A, Piping Material Specification, defines
the data to be included for one of the specs in our project. We will reference this
section throughout this chapter.
Spec Maker provides the option of using any existing specification (s71) file as the
basis or seed for a new specification file. Creating a new specification file without a
seed file results in a totally empty specification file. Specifications, component
types, guidelines, and criteria need to be added to an empty specification file. Seed
files act as a storage file for initial data (specifications, component types, guidelines,
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 7-180
Setting Up a Project Specification File with Specifications
and criteria) for new project specification files. Data from the seed files are copied
over to the new specification file.
Typically, you as the administrator set up a single seed file for use with several new
project specification files. For example, if your company is tasked to develop
multiple plants or sections of a plant for different customers, you would want to
use the same specifications. If an existing specification file contains all the specs
you want, you can save it as a seed file for safekeeping. You can then create new
specification files based on your archived seed file.
g
For this course, you will be creating a specification file generated from
tin
compdefn.s71.
l
1 Click the New tool.
su
The New dialog box is displayed.
2 In the New File Name field, type East_River.
You can use a long file name. The system will add the S71 extension.
on
5 Click Open.
6 Leave the database source as is (East_River).
.I.
7 Click OK.
The project window is displayed with East_River in the title bar.
B
Your new project will have a copy of the component types stored in the
template file, compdefn.s71.
Spec Maker provides the option to password protect the project spec file at two levels:
-- At the administrator level so that the administrator or project lead engineer with administra-
tor privileges can change the specs
-- At the user level so that engineer users can synchronize specs with the database or
change guidelines
As an administrator, you can change the password whenever necessary. If you enter the
Administrator password on a user machine to make changes and you want to reset the
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 7-181
Setting Up a Project Specification File with Specifications
machine to require a password, you can choose Tools > Reset Password Check Status from
the menu bar.
The Auto-Save feature on the File menu automatically saves your file as you add or change
data and ensures that your specification and template files are consistent with the state of the
database. Disabling the AutoSave feature places the burden on the user to manually save
the project specification file to maintain consistency with the database.
ng
Working with Specs
[student page 7-148]
lti
The process of working with specs involves the following stages:
1 Creating a new spec
su
2 Associating component types with a spec
3 Changing the specification status
on
Other operations on specs such as Delete, Copy, and Move are covered in the
PlantSpace Design Series Administrator Guide.
Mention: Now that you have set up your specification file, you can create new specs.
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 7-182
Setting Up a Project Specification File with Specifications
When a specification is approved, no further changes are permitted to any objects (compo-
nent types or guidelines) related to the approved specification. The only valid operations on
g
an approved specification are database synchronization and unsynchronization.
tin
This feature is useful if after setting up the project specifications, the administrator passes the
task of database synchronization and unsynchronization to a database operator in charge of
l
placing catalog and spec table entries.
su
The spec is displayed in the tree pane. In the next exercise, you will associate component
on
types with the spec. The component types will then be displayed in the list pane as active
components.
C
Guidelines can be created only after associating one or more component types with
.I.
a spec.
2 Be sure that CB31 is selected, right-click it, and select Select Active
Component Types from the popup menu.
The Select Active Component Types for the selected spec dialog box is
displayed.
3 Transfer the following to the list of Active Component Types:
Branch Table
Caps
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 7-183
Working with Guidelines
Elbows
Flanges
Gaskets
Pipes
Reducers
Unions
Valves
ng
Valve operators - Catalog Data Only
The Valve Operators - Catalog Data Only component type requires that all dimensional infor-
lti
mation on valves be defined in the project database. The Valve Operators - Data User
enables the user to type in dimensions for the valve operator during placement. If there is a
valid record found for the specified operator type in the valve operator catalog table, those
su
dimensions will be used. If not, the user will be prompted to enter dimensions during valve
placement.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 7-184
Working with Guidelines
3 Type the name Pipe: 0.5 thru 2.0 over the name displayed.
Mention: We are changing the name to make it more descriptive but this is not required.
4 Click OK.
g
You can edit the values of the criteria, which make up the guideline.
tin
To edit guideline values in vertical format
1 In the tree pane, click Pipe: 0.5 thru 2.0.
l
The information is displayed vertically in the list pane.
su
2 In the list pane by the Standard criterion, double-click the cell under Data.
Spec Maker displays an editable field, which can contain relationship
buttons and drop-down list boxes, depending on the current value of the
on
relationship selected.
3 Click the down arrow and select ANSI.
The following keys perform special actions when an edit window is visible:
C
Key Description
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 7-185
Working with Guidelines
ng
lti
su
Point out that the Long Description is automatically formed based on the values entered for
Material Standard, Material Code, Material Grade, and Schedule.
on
Spec Maker uses a mechanism similar to Windows Explorer for its Copy and Move (cut and
.I.
paste) operations. Spec Maker recognizes the standard Windows keyboard shortcuts
<Ctrl+C> for copy, <Ctrl+X> for cut, and <Ctrl+V> for paste. Similar to Windows Explorer,
Spec Maker does not remove a "cut" object until a successful "paste" operation is performed.
B
Spec Maker maintains its own internal clipboard for storing copied Spec Maker objects. Spec
Maker checks the type of objects stored in its internal clipboard and enables or disables the
Paste command accordingly.
Guidelines can be pasted only when a component type associated with a spec is
highlighted in the tree pane.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 7-186
Working with Guidelines
Spec Maker also supports the drag-and-drop technique to copy and move guidelines.
The cursor changes to an arrow with a small plus sign (+) indicating that the paste operation
is valid.
If a paste operation is not valid, the cursor changes to a circle with a slash across it.
g
tin
To copy guideline values
1 Right-click Pipe: 0.5 thru 2.0, and select Copy Guideline.
2 Right-click Pipes, and select Paste Guideline.
l
su
3 In the list pane, double-click the name Copy of Pipe: 0.5 thru 2.0 under the
Guideline Name heading.
4 Type the name Pipe: 2.5 thru 12.0 over the name displayed.
on
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 7-187
Key Points in This Section
Unsynchronizing a guideline refers to the process of removing all spec table entries
relevant to that particular guideline.
When using specification placement mode, PlantSpace Design Series can place in
the model, only component types that are stored in the spec tables.
Spec Maker provides a clickable icon in the guideline list pane when you view
guidelines in horizontal format, as indicated in the following graphic.
ng
Indicates an unsynchronized guideline
lti
Indicates a synchronized guidelinesu
Point out the icons and state that they toggle between the synchronized and unsynchronized
states. Clicking the modified icon changes the state of the guideline to synchronized.
on
To synchronize guidelines
1 In the tree pane, right-click Pipes and select Synchronize Guideline Group.
2 Respond to any confirmation messages that are displayed.
C
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 7-188
Lab: Defining Guidelines for Other Component Types
g
Unsynchronizing a guideline refers to the process of removing all spec table
tin
entries relevant to that particular guideline.
l
su
Lab: Defining Guidelines for Other Component Types
on
State that students have 40 minutes to complete the Lab. Point out that if they need help,
they can refer to the Lab Solution that follows.
.I.
Important: Before the students begin the lab, you should show them how to change the rela-
B
tionship operator when they enter guidelines. A good example would be changing the Bend
Radius criteria in an Elbow guideline to use the (Is An Element Of A List) relationship,
instead of the (Is Equal To) relationship.
Objectives
This lab enables you to check your ability to perform the following skills:
Define and edit guidelines
Synchronize guidelines
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 7-189
Lab Solution
Scenario
Update the CB31 spec within your project specification file to include guidelines for
elbows, unions, reducers, caps, flanges, gaskets, and valves in accordance with the
data shown in the Piping Material Specification section of Appendix A.
Directions
ng
1 Create new guidelines under each component type.
2 Define the guideline values.
lti
3 Synchronize the guidelines with the database.
4 Place components to verify that the specs have been defined properly.
su
Lab Solution
on
1 Right-click Elbows in the tree pane, and select Create New Guideline.
2 Type the name Elbows: 0.5 thru 2.0 over the name displayed.
.I.
3 Click OK.
4 Create the following guidelines by repeating steps 1 to 3 for the component
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 7-190
Lab Solution
g
synchronized before operator guidelines
can be added.
tin
Valve Operators - Catalog Data Only Handwheels: 0.5 thru 2.0
Valve Operators - Catalog Data Only Handwheels: 2.5 thru 12.0
Valve Operators - Catalog Data Only Levers: 0.5 thru 2.0
l
su
To define guideline values
1 In the tree pane, click Elbows: 0.5 thru 2.0.
2 In the list pane by the Short Description criterion, double-click the cell
on
under Data.
3 Click the down arrow and select Elbow.
4 Click anywhere outside the edit window to accept the value.
C
Criteria Data
.I.
Standard = ANSI
Standard Code = B16.11
Size 1 Minimum 0.5
Size 1 Maximum 2.0
End Preparation 1 = SOCKET WELD
End Preparation 2 = SOCKET WELD
Schedule/Rating 1 = 3000
Schedule/Rating 2 = 3000
Face =#
Bend Radius =#
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 7-191
Adding a Criterion to the Elbow Component Type
ng
6 Repeat steps 1 to 5 for all the guidelines.
Refer to the data in the "Piping Material Specification" section of
Appendix A for the required information.
lti
7 Right-click CB31 in the tree pane and select Synchronize Specification.
8 Respond to any confirmation messages that are displayed.
su
9 In Design Series 3D modeling, place components in Specification mode to
verify that all items are available through the spec.
on
Specification criteria (displayed only in the list pane) are the data required for a
particular guideline. We are going to add an additional criterion to the Elbow
.I.
Component types can have several criteria. Spec Maker provides five types of
criteria:
Catalog table field
Database table field
Database table lookup
JSpace expression
Text input
Each of these five criteria types are detailed in the following sections.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 7-192
Adding a Criterion to the Elbow Component Type
A catalog table field criterion enables you to create guidelines based on values
stored in the catalog table for a particular component type. For example, the
database table PIPE_PELB stores catalog data for standard elbows. One of the fields
in the PIPE_PELB table is EPREP_1. This field stores the end preparation data for a
standard elbow. For the EPREP_1 field, a catalog table field criterion type is
applicable.
g
A database table field criterion enables you to create guidelines based on values
stored in any table in the project database. For example, Material Standard is a
tin
database table field criterion that applies to most component types. The database
table containing this information is the MATERIAL_DATA table. The field in this
table containing the required information is MAT_STD.
l
su
Database Table Lookup
A database table lookup criterion enables you to create guidelines based on the
lookup value stored in any table in the project database relevant to a catalog table
on
the PIPE_DIAMETER table containing similar values to the SIZE_1 field is SIZE_1.
The lookup output field in the PIPE_DIAMETER table containing the required
metric conversion is METRIC_ND.
.I.
JSpace Expression
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 7-193
Adding a Criterion to the Elbow Component Type
Text Input
A text input criterion enables you to create guidelines based on text input gathered
from the user. You can optionally specify a default value for this criterion.
ng
Creating a Criterion
lti
[student page 7-157]
2 Right-click Elbows in the tree pane and select View Component Criteria.
3 Right-click Elbows in the tree pane, and select Create New Criterion.
.I.
The stock codes will be a concatenation of the bend angle, the letter "E",
the nominal pipe size, and the end preparation of the pipe. For example, a
" 45 degree elbow will have a stock code of 45E.5-SW.
7 Select STOCK_CODE as the specification field to place the result of the
Jspace expression into the specification table.
8 Click OK.
Criteria depend on one another in a linear fashion. The higher-level
criteria in the criteria order constrain the values for their lower-level
criteria.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 7-194
Defining Piping Specifications
g
6 Click anywhere outside the edit window to accept the change.
tin
The Stock Code value should now display "varies".
7 Synchronize the guideline and open the PIPE_PELB_SPEC table in the
database to confirm that values were written to the STOCK_CODE column.
8
l
Repeat steps 3 to 7 for the Elbows: 2.5 thru 12.0 guideline.
su
Defining Piping Specifications
on
Reordering Criteria
As you fill in criteria information for each component, a query is being created by each of the
.I.
following criteria to display only valid values based on what has already been selected.
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 7-195
Defining Piping Specifications
To reorder criteria
1 Create a new valve guideline and fill in the values as shown.
ng
lti
su
With the current criteria order, we were able to select 2 to 36 as a size
on
Criteria button.
4 Right-click any of the valve criteria, and select the Reorder Criteria option
from the dialog box.
.I.
5 Reorder the criteria so that Valve Rating, End Preparation 1 and End
Preparation 2 are higher on the criteria list than Size 1 Minimum, as shown.
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 7-196
Using Valves Operators Catalogs & User Input
g
tin
Using Valves Operators Catalogs & User Input
[student page 7-160]
l
The difference between the two Operator component types is that Catalog Data
su
Only requires that operator data for each valve size be loaded into the PIPE_PVOP
table. The Catalogs & User Input component type will allow you, as the
administrator, to synchronize operator guidelines to their corresponding valves,
even if catalog data for a specific valve or operator type is not loaded into the
on
database. In this case, the user will be prompted for operator dimensional data if it
does not exist in the PIPE_PVOP table.
1 Edit the pvop_fred.dat file to comment out the last three data lines. (1.5
2.5 Lever operator dimensions).
.I.
2 Load pvop_fred.dat into the database using the Database Setup tool.
3 Modify the guideline for Freds Ball valve in the Valves Operators Catalog
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 7-197
Using Valves Operators Catalogs & User Input
7 Add the Valves Operators Catalogs & User Input component type to the
CB31 spec from the Select Active Component Types dialog box.
8 Add a new guideline to this component type for Freds Ball valve.
There are more selections for Operator Type than just lever and sizes
are available up to 2.
9 Fill in values, as shown.
ng
lti
su
on
Criteria values for Valve Type, Standard, Code, End Prep, Rating, Schedule,
and Material are selected from the synchronized valve guidelines
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 7-198
Key Points in This Section
g
tin
Criteria values for Valve Type, Standard, Code, End Prep, Rating, Schedule,
l
Material, Size 1 Minimum, and Size 1 Maximum are selected from the
su
synchronized valve guidelines (PIPE_PVLV_SPEC table). The
VLV_VALID_OPER table is used to display a list of operators for each
specific valve type. If additional operator types are required for a specific
valve type, they can be added to the VLV_VALID_OPER table.
on
There are two additional criteria for Catalogs & User Input guidelines.
For descriptions of information required by these two criteria, see the
section, Drawings of Parameterized Components in Chapter 3 of the
C
design model.
0.5 to 1.25 valves will find operator data in the PIPE_PVOP table and use
B
that information. 1.5 and 2 valves do not have operator data and as a
result, the user is prompted for operator dimensions. Users can place the
same valve, and enter different operator dimensions for each placement.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 7-199
Working with Branch Tables
ng
Criteria depend on one another in a linear fashion. The higher-level criteria in
the criteria order constrain the values for their lower-level criteria.
lti
Break Time: 5 to 10 minutes
su
Working with Branch Tables
on
Branch tables specify which branch types are valid for a particular combination of
C
main pipe diameters and branch pipe diameters. Spec Maker enables you to define
a branch table for each spec. A branch table makes the process of defining
guidelines for branches easier.
.I.
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 7-200
Working with Branch Tables
Typically in a company, you would be given the task of creating a branch table
from a paper diagram like the following example:
g
l tin
su
on
C
.I.
The Branch Table component type makes use of a graphical version of this branch
table. This lesson shows you how to create this online version.
B
You can create only one branch table for each spec in your specification file.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 7-201
Working with Branch Tables
Typically, you would next select the displayed pipe diameters. Then you would
enter data into the branch table. Finally, you would create and synchronize
guidelines that make use of the branch table.
ng
Selecting Displayed Pipe Diameters for a Branch Table
[student page 7-165]
lti
Spec Maker enables you to select the pipe diameters displayed along the two axes
of the branch table.
su
To select displayed pipe diameters for a branch table
1 Click the Options button in the Branch Table dialog box.
on
The file East_River_Lab3.s71 contains the completed branch table and branch table guide-
lines.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 7-202
Working with Branch Tables
Spec Maker initially selects all pipe diameters when you create a new
branch table.
g
tin
3 Using the <Shift> or <Ctrl> key, select pipe diameters 0.5 through 12.0
(excluding 0.625, 1.25, 3.5, and 5.0).
l
su
4 Click the Apply button.
The only difference between the Apply button and the OK button is that
the Apply button leaves the Options dialog box open.
on
5 Click OK to accept the changes and leave the Branch Table dialog box
open.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 7-203
Working with Branch Tables
A branch type set contains a group of main pipe diameters and branch pipe
diameters that can be paired together to make a type of branch connection. For
example, tees, sweepolets, weldolets, and stub-ins are typical branch connections
for large bore pipe. Instead of having to define the different types of branch
connections in individual guidelines, Spec Maker enables you to create branch type
sets, which will automatically perform this task.
ng
To create a new branch type set
1 In the Branch Table dialog box, click the mouse pointer in the graph.
2 Refer to Branch Table A on page A-308, and select the range of main and branch
lti
pipe diameter pairs shown by holding down the Ctrl key as you click each block in
the range.
If you make a mistake, you can remove the highlighting by clicking
su
each block to deselect it and then starting again.
The selection set is highlighted as shown.
on
C
.I.
B
3 After defining the selection set, right-click to display the branch table popup
menu and select Create New Branch Types Set.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 7-204
Working with Branch Tables
g
tin
4 At the Label field, name the branch type set Tee.
5 In the list box, select Tee as the active branch type for this branch type set.
6 Click the Change Color button to select a color for this branch type set.
l
su
The standard Windows Color dialog box is displayed.
on
C
.I.
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 7-205
Working with Branch Tables
Sockolet by typing SOL as the label name, selecting Sockolet for the
active component type, and selecting the color blue.
The stub-in, weldolet, and sockolet blocks in your graph should look like
those marked B, W, and S, respectively, in Branch Table A on page A--308.
10 Click the Options button.
You should have four branch type sets, each displayed as a tab for Tee,
Stub-in, Weldolet, and Sockolet:
ng
lti
su
on
Your next task is to add guidelines for the new Branch Table. You will add four
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 7-206
Working with Branch Tables
g
l tin
su
Start at the top and work your way down. This a hierarchical system. The
on
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 7-207
Working with Branch Tables
8 Fill in the values shown in the Data field for each criterion.
ng
lti
su
9 In the same manner, create GL 3: CB31 Branch Table and fill in the values
shown in the Data field for each criterion.
on
C
.I.
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 7-208
Working with Branch Tables
10 In the same manner, create GL 4: CB31 Branch Table and fill in the values
shown in the Data field for each criterion.
g
l tin
su
11 In the same manner, create GL 5: CB31 Branch Table and fill in the values
on
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 7-209
Key Points in This Section
ng
lti
su
on
The guidelines are unsynchronized. (The criteria for each guideline are
displayed horizontally.)
2 To synchronize all the guidelines at the same time, right-click Branch Table
C
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 7-210
Key Points in This Section
A branch table makes the process of defining guidelines for branches easier.
You can create only one branch table for each spec in your specification file.
A branch type set contains a group of main pipe diameters and branch pipe
diameters that can be paired together to make a type of branch connection (for
example, tees). Instead of having to define the different types of branch
connections in individual guidelines, you can create branch type sets.
When you add new guidelines, they must be synchronized with the database.
g
l tin
su
on
C
.I.
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 7-211
Key Points in This Section
ng
lti
su
on
C
.I.
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 7-212
8 Customizing Reports
g
Chapter Objectives
[student page 8-175]
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 8-213
Introduction
--valves.jsm
--VPL.dbf
Introduction
ng
Demo the parts of the Object Reporter window that you will customize.
Reports are created by using the Object Reporter program. The application creates
lti
reports in dBASE format and you can customize them by defining fields and filters.
You can also apply additional filters to multiple reports at the same time. Third-
party applications are available to apply headers, footers, and other presentation
su
features.
This application uses ams.lib, which you can customize by modifying ams_user.lib
on
and then synchronizing the changes with ams.lib. You can do this by using the
Database Setup Tool delivered with the Design Series software. More information
on how to customize and synchronize ams.lib is in the chapter Configuring Your Project Needs
in the Design Series Administrator Guide.
C
You can create a report on objects that are located within one or more specific
areas of a model. The areas are selected from a list of areas defined in a volume
file. Because certain linear objects, such as pipes, are likely to pass through several
areas of a model, you may want to report on a clipped length value (the length of
the object that exists inside one or more selected areas). The clipped length of an
object is stored in a special property called CLIP_LENGTH, which is defined in the
ams_user.lib class library.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 8-214
Customizing Object Reporter
Have the Input Property List as the first data source of the CLIP_LENGTH
property.
Example: CLIP_LENGTH=.CLIP_LENGTH;
The system reports an object as being in an area if it meets the following criteria:
If the center point of an objectss SNAP_POINT range is inside the area.
If an object has two snap points and has the Input Property List as the first data
source of the CLIP_LENGTH property (for example,
CLIP_LENGTH=.CLIP_LENGTH;), and the center point of the clipped length is
inside the area.
g
A point is considered inside an area if it is greater than or equal to the minimum
tin
planes of the area and less than the maximum planes of the area.
In the Object Reporter, you can customize the output by defining report filters and
report fields, and by grouping and summarizing data.
C
In this exercise, we will create a report that will list the valves in the model and
query the cost of those valves from a procurement database.
.I.
First we will set up our procurement database and ODBC data source. If you have
not received the procurement.mdb file, ask your instructor for this file.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 8-215
Customizing Object Reporter
Inform the students that this procurement database only looks at ANSI valves. Therefore in
order for this report to display the cost of a valve, the model must have ANSI valves. All other
standards will have a NULL value in the cost column.
You can customize a report by defining the filters and report fields that you want
used in the output. In defining the reports and report fields, you can add, modify,
ng
or delete to suit your reporting needs.
We will need to create a report called Valve Price List. This report will query the
procurement database for the cost of each valve in the model. In this report we
lti
want the following columns:
dialog box is displayed. Once you select a project and click OK, you can
continue.
.I.
B
2 In the PlantSpace Object Reporter window, click the Define Reports button.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 8-216
Customizing Object Reporter
The Define Report dialog box is displayed. The reports listed are the ones currently
defined in the report_e.dat file for imperial projects or the report_m.dat file for SI
(metric) projects. The report fields displayed pertain to the selected report.
g
l tin
su
3 To define the Valve_Price_List report, click the Add button in the Reports
on
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 8-217
Customizing Object Reporter
CLASS("PIPE_PVLV") OR CLASS("PIPE_PVLG")
ng
To modify a report, perform the following operations:
a. Select the report and click the Modify button.
lti
b. In the Define Report Filter dialog box, change the name or JSpace expression and click
OK.
To delete a report, select it and click the Delete button. Click the Yes button to confirm the
su
deletion.
1 In the Define Report dialog box, click the Add Field button.
2 In the Define Report Field dialog box, type the following field names with
their JSpace expressions and click OK after each expression:
C
3 To add the cost to the report, click the Add Field button in the Define
Report dialog box.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 8-218
Customizing Object Reporter
g
tin
4 Type the field name COST and the following JSpace expression:
Hint: You may want to use valves.jsm to test your JSpace expression inside
the JSpace Class Editor before defining it in the report. Using a JSM file will
l
make debugging easier.
su
DB_QUERY("procurement","select COST from STOCK_CODE where SIZE_1 =
"+SIZE_1+ " and STANDARD = '"+STNDRD+ "'")
on
The students can use valves.jsm to test the above JSpace expression. They may even want
to test the SQL statement in MS Access before writing the JSpace expression.
C
Select COST from STOCK_CODE where SIZE_1 = 4 and STANDARD = 'ANSI' the result
should be 10.25
B
The name of the JSM file is stored in the NAME property of the MAIN object for
every JSM file. If you edit a PIPE_PVLV object in the Class Editor as shown in the
following diagram, you can see the MEMBER_OF relationship formed with the
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 8-219
Customizing Object Reporter
MAIN object and the properties of the MAIN object are shown on the right-hand
side of the dialog box.
ng
lti
su
on
Design Series objects, such as a PIPE_PVLV, are related to the MAIN object through
the MEMBER_OF relationship and conversely, the MAIN object is related to Design
C
Series objects through the MEMBERS relationship. The following diagram shows
this concept.
.I.
B
Within a JSpace expression, you can access the values of related objects by defining
an expression that follows the format:
CLASS\RELATIONSHIP\PROPERTY
This format uses the value for the PROPERTY of an object of a specified CLASS that
is related to the Active Object through a specified RELATIONSHIP.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 8-220
Key Points in This Chapter
For example, if you wanted to access the value of the UNITS_NAME property in the
MAIN object from a Design Series object, you would use the expression:
MAIN\MEMBER_OF\UNITS_NAME
Open the file valves.jsm in the Class Editor and evaluate expressions on one of the
PIPE_PVLV objects. For example, evaluate the expression
MAIN\MEMBER_OF\UNITS_NAME and show that the result of the expression is Inches.
g
1 In the Define Report dialog box, click the Add Field button.
tin
2 Type the field name JSM FILE and the following JSpace expression:
MAIN\MEMBER_OF\NAME
3 Click OK.
l
After you add these fields, run the Valve_Price_List report on the valves.jsm
4
su
file.
You can use a third party application to produce a particular layout, such as
on
grouped or summary data. You can also use a JSpace grouping class for the same
purpose. However, this requires a very thorough understanding of JSpace.
Therefore, it is recommended that you use a third-party application instead.
C
If students want to know more about grouping classes, refer them to the Design Series
Administrator Guide.
.I.
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 8-221
Lab: Creating a Component Information Report
You can create a report on objects that are located within one or more specific
areas of a model. The areas are selected from a list of areas defined in a volume
file.
The clipped length of an object is stored in a special property called
CLIP_LENGTH, which is defined in the ams_user.lib class library.
The clipped length is calculated only for objects that: have two snap points and
have the Input Property List as the first data source of the CLIP_LENGTH
property.
A point is considered inside an area if it is greater than or equal to the minimum
planes of the area and less than the maximum planes of the area.
ng
You can use a third party application to produce a particular layout, such as
grouped or summary data. Otherwise, you can use a JSpace grouping class for
the same purpose.
lti
su
Lab: Creating a Component Information Report
[student page 8-182]
on
State that students have 30 minutes to complete the Lab. Point out that if they need help,
they can refer to the Lab Solution that follows.
C
Objectives
.I.
This lab enables you to check your ability to perform the following skills:
Create a new report definition
B
Scenario
Our project needs to create reports that list every piping component in a group of
files. The report must contain a name, description, and pipeline call-out for each
component, an must specify the design file containing the component. The
following example shows a pipeline call-out format.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 8-222
Lab: Creating a Component Information Report
System: STH
Spec: CB31
Size_1: 2.5
Lineno: 12
g
COMPONENT DESCRIPT LINE ID DGN FILE
tin
PELB ELBOW, 90 DEG., # RAD., STH-L012-CB31-1" C:\dgn\file1.dgn
SOCKET WELD
V_GATE VALVE, GATE, BUTT STH-L001-CB31-6" C:\dgn\file2.dgn
Directions:
1 In the PlantSpace Object Reporter, define a new report called Pipe
Component Info.
C
2 Define a filter so that all piping objects will be included in the report.
3 Add fields called COMPONENT, DESCRIPT, LINE ID, and DGN FILE to the
report definition.
.I.
4 Load the files valves.jsm and elbows.jsm into Object Reporter and run a Pipe
Component Info report.
B
5 Open the DBF file in Excel and confirm that the desired information is included and
correct.
Valves.jsm contains only valves and elbows.jsm contains only elbows.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 8-223
Lab Solution
Lab Solution
[student page 8-183]
ng
To define a new report and filter
1 In the PlantSpace Object Reporter window, click the Define Reports button.
lti
2 In the Define Reports dialog box, click the Add button in the Reports group at the
top of the dialog box.
su
3 In the Define Report Filter dialog box, type the report name, Pipe Component Info.
4 At the File Name Base field, type the acronym PCI.
5 Type the following JSpace expression in the text box:
on
CLASS("PIPE_BASE")
6 Click OK.
1 In the Define Report Field dialog box, type the following field names with their
JSpace expressions and click OK after each expression:
.I.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 8-224
Lab Solution
g
l tin
su
on
C
.I.
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 8-225
Lab Solution
ng
lti
su
on
C
.I.
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 8-226
9 Customizing Isometric Drawings
IMPORTANT: You must get a temporary license for Personal ISOGEN from Bentley Institute.
Make sure all machines have the pisogen.lic file in the licensing directory. You will need to
have temporary licenses created for this class.
IMPORTANT: Because Alias left out a few DLLs that are needed on some machines, it is rec-
g
ommended that you and the students follow these steps to ensure that the ISOGEN Options
Editor will work properly:
1. Unzip IsogenPatchV81.zip on the drive where you have PlantSpace AutoISOGEN
installed.
2. Double-click the executable file:
The process will automatically set up ISOGEN properly.
l tin
su
Beginning of Day 4, review with question and answer what students learned in Ch. 6, 7, 8.
on
Chapter Objectives
.I.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 9-227
Introduction
ng
--fab_attribute.txt
--final.pos
--Isogen.fls
--IsogenPatchV81.zip
lti
--pipe_iso.pcf
--PS_ISO_USER.LIB
--style2.mld
su
--style2.OPL
--09_pipe.dgn
--09_pipe.jsm
--09_shopfab.jsm
--09_specbreaks.jsm
C
--East_River_iso_format.dgn
--fab_attribute.txt
--final.pos
--Isogen.fls
.I.
--IsogenPatchV81.zip
--pipe_iso.pcf
--PS_ISO_USER.LIB
B
--style2.mld
--style2.OPL
Introduction
The ISOGEN Interface in earlier releases is now called Bentley PlantSpace
AutoISOGEN in release 8.1.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 9-228
Introduction
files (PCFs). Personal ISOGEN then uses the PCFs to produce isometric drawings
called ISOGEN plot files.
The PCFs are created from PlantSpace databases or from JSpace model files
generated with the Design Series libraries.
The PlantSpace AutoISOGEN V8.1 project structure is now integrated into the
Design Series project structure. All the files relevant to PlantSpace AutoISOGEN are
g
now grouped under your ...\{ProjectName}\Pisogen directory. The installation of
the project does not require any separate procedure and is done automatically
tin
when you install a Design Series project.
l
su
All the configuration files related to PlantSpace AutoISOGEN are grouped together
in your ...\{ProjectName}\Pisogen\Config directory. This means that the paths to
some of the old configuration files have changed. For details on the updated paths
and the procedure to migrate old ISOGEN Interface V7 projects to the current
on
understand first how this application works. Your instructor will explain the
following diagram.
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 9-229
Introduction
ng
lti
su
on
C
.I.
Two mapping files, psisokey.dat and psisoend.dat, and the ps_iso.lib class library
control the creation of the ISOGEN PCF files.
Psisokey.dat File
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 9-230
Selecting Output Settings
Psisoend.dat File
g
PL for plain end LR for reducing liner/nut
tin
Ps_iso.lib Class Library
l
ps_iso.lib file enables you to configure the way components are called out on the
su
isometric drawing.
The Isometric Drawing Settings dialog box identifies the location of system files and
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 9-231
Selecting Output Settings
dialog box is displayed. Once you select your project (for example
East_River) and click OK, you can continue.
ng
project and isometric style (in square brackets) are displayed. The style is
explained in step 3.
lti
su
on
C
.I.
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 9-232
Selecting Output Settings
Iso Style The isometric style that will be used in generating the file. The
default options are:
Check
Final-Basic
Final-Cut-List
Final-Erection
Final-Fab
Final-Weld-Box
g
Overview
Spool
tin
Note: Refer to the Alias documentation for a description of
these styles in the ...\Bentley\Documentation\Pisogen
directory created at installation.
Option Switch Editor Accesses the Options Switch Editor program, an Alias product
l
that sets formatting options for the isometric drawing.
su
Note: Refer to the Alias documentation on using the Option
Switch Editor.
FLS file The name of the PlantSpace AutoISOGEN (.FLS) file. This file
contains a list of the files that PlantSpace AutoISOGEN will
on
Output Format Controls the output format of the isometric drawing. The
default setting is "MicroStation V8 DGN", but it can be set to
"Use Options Setting" to use the Alias options setting instead.
.I.
Imperial or metric.
Include nozzles on If selected, the system processes nozzles (PNOZ). If not
drawing selected, the system does not process nozzles.
4 To display the PlantSpace AutoISOGEN (.FLS) file, click the Edit button.
The files are displayed in the File Viewer, a default text editor.
5 Click Done to close the viewer, click OK to close the Isometric Drawing
Settings dialog box, and then click Exit to close PlantSpace AutoISOGEN.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 9-233
Creating a Sample Isometric Drawing
ng
pipe_iso for the Pipeline Reference Name.
4 Click the Create ISOGEN Plotfile button.
A message should be displayed that the ISOGEN process was successful.
lti
The instructors file, pipe_iso.pcf, contains the finished plot file.
su
Description of the Piping Component File
on
The Piping Component file (pipe_iso.pcf) that we created in the previous exercise
is located in C:\Projects\East_River\Pisogen\Inputs. The following provides a brief
description of each section of the file:
C
Briefly review the PCF file. State that we will explain in the next section how the information in
.I.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 9-234
Analyzing the Isometric Drawing Creation Process
g
l tin
Material item codes and descriptions (one block per file)
su
on
To understand how ISOGEN creates the isometric drawing, we will look at the
details in the process.
B
Explain that a tmp_pcf.jsm file is created every time that PlantSpace AutoISOGEN is run.
The ISO_OF relationships are formed in tmp_pcf.jsm to link the iso objects to the 3D model
objects. This file can be very useful for debugging problems.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 9-235
Analyzing the Isometric Drawing Creation Process
ng
SKEY ELBW ISO_SKEY
END-POINT -277.6938 635.2029 0.0000 6 BW ISO_END_POINT_2
ITEM-CODE PELB ISO_ITEM_CODE
lti
To understand how the ISO_ELBOW property values shown above were
obtained, we need to open ps_iso.lib in the Class Editor and examine the
su
value sources for each property.
4 In the Class Browser - ps_iso.lib dialog box, double-click the ISO_ELBOW class.
5 Double-click the ISO_END_POINT_1 property and see that the first value
on
snap_point: \ISO_OF\SNAP_POINTS[1]
nominal_size: NOM_SIZE1
B
end_condition: \ISO_OF\EPREP1
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 9-236
Analyzing the Isometric Drawing Creation Process
g
l tin
su
7 In tmp_pcf.jsm, open the first ISO_ELBOW class and find the values for the
expressions used in the arguments.
on
You will see that the first value source after the Input Property List is
GET_ISO_ITEM_CODE(\ISO_OF\NAME, \ISO_OF\COMP_DESC+"
"+\ISO_OF\L_DESC1+" "+\ISO_OF\L_DESC2)
.I.
item_code: \ISO_OF\NAME
description: \ISO_OF\COMP_DESC+" "+\ISO_OF\L_DESC1+"
"+\ISO_OF\L_DESC2
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 9-237
Customizing the ISOGEN Materials List
ng
lti
su
Have the students copy the second argument value (\ISO_OF\COMP_DESC+"
"+\ISO_OF\L_DESC1+" "+\ISO_OF\L_DESC2) into a buffer and then paste into the Expres-
sion area of the Object Browser - tmp_pcf.jsm file. With the first ISO_ELBOW object high-
lighted, click Apply. The value source should evaluate to "ELBOW, 90 DEG., LONG RAD.,
on
BUTT WELD ASTM-A234, Grade WPB, Schedule 40", which agrees with the data seen in
the Material Data section of the pcf file.
C
ITEM-CODE PELB
DESCRIPTION ELBOW, 90 DEG., LONG RAD., BUTT WELD ASTM-A234,
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 9-238
Customizing the ISOGEN Materials List
Style 1 is a very basic BOM that has a fixed content and layout. No material list
definition (*.mld) file is required. The column headings can be modified by
updating the ISOGEN Alternative Text (*.alt) file.
Style 2 is a user-definable BOM based on column and line definitions. A
material list definition (*.mld) file is required to specify the content and layout.
Style 3 is the most configurable BOM based on XY-coordinate values. A
material list definition (*.mld) file is required to specify the content and layout,
and a user-defined backing sheet must contain all column headings and boxing
in lines.
g
In the next exercise, we will set up our project to use a Style 2 Material List.
l tin
su
on
C
.I.
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 9-239
Customizing the ISOGEN Materials List
ng
3 Update style2.mld to define column content for the BOM by adding the
following lines:
STYLE2-DATA-ITEMS
lti
'PT-NO' 2 R
'QTY' 9 N
su
'N.S.' 17 L
'DESCRIPTION' 23 L 42
'ITEM CODE' 66 L
on
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 9-240
Customizing ISOGEN Output to Identify Shop Items
The process of customizing the ISOGEN output involves the following stages:
Adding an attribute to identify shop fabrication
g
Creating and updating user class libraries
tin
Customizing the material list
Testing the configuration for the shop
l
Adding an Attribute to Identify Shop Fabrication
su
You will add an attribute to all piping components so that the user can specify
whether the component is shop or field fabricated when the component is placed
on
This exercise also shows how inheritance and relationships work in JSpace.
.I.
1 Add the user attribute FAB to the attribute definition file, pip_atre_user.dat
by copying the following lines of code from fab_attribute.txt.
B
PIPE,,,,,\
FAB,,U,CHAR,700,2,,,\
"Shop/Field Fab",17,"S",\
"VALUES F,S",\
N,,N,,,,USER
2 Verify that label position 700 and spaces of 2 do not overlap any changes
you have previously made.
A text file is provided called fab_attribute.txt so that students can copy and paste the above
attribute into the PIP_ATRE_USER.dat file.
3 Save pip_atre_user.dat and load it as a DAT file in the Database Setup tool.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 9-241
Customizing ISOGEN Output to Identify Shop Items
If you are using MCS and you have an existing database already in use
(for example, components checked in), you will have to manually add a
column called FAB to both the PIPE_BUD and DEL_PIPE_BUD tables. If
you are still setting up a database, the columns will be updated
automatically when you build the storage tables.
4 Re-create your rimref.dat file by using the Database Setup tool.
5 Update your ams.lib file by using the Database Setup tool.
ng
[student page 9-196]
Currently, Design Series does not deliver a user class library for PlantSpace
lti
AutoISOGEN.
It is recommended that instead of changing a class in the ps_iso.lib class library file
su
for PlantSpace AutoISOGEN, you create a user class library to make the changes.
Warning: Although you do not have to create a user class library, you should be aware that
when a new version of Design Series is delivered, the installation will overwrite the original
on
class library.
The value determined for any property that begins with ISO_ is output to the PCF file for the
particular component.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 9-242
Customizing ISOGEN Output to Identify Shop Items
When adding these classes to the class library, you will see some error messages. These
result because the following functions are not defined in JSpace:
ISO_FABRICATION_ITEM_IF, ISO_ERECTION_ITEM_IF, and the relationship ISO_OF.
These functions and the relationship are for ISOGEN only, which is why you see the error
g
messages. These error messages are OK.
tin
3 With both LIB files still open, go to ps_iso.lib and make the class PIPE_FAB
in ps_iso_user.lib a parent of ISO_BASE_ITEM_CODE.
For our project, bolts will be supplied by the pipe fabricator (the shop) so
l
we want bolts to be listed as fabrication items.
su
4 In ps_iso_user.lib, create a new class called BOLT_FAB and add a property
called ISO_FIELD with the following two fixed sources:
.ISO_FIELD
on
ISO_ERECTION_ITEM_IF (TRUE)
5 Click Apply and Close but leave both LIB files open.
6 In ps_iso.lib, make the class BOLT_FAB in ps_iso_user.lib a parent of
C
ISO_BOLT in ps_iso.lib.
7 Save both files.
.I.
You are now ready for all commodities to be placed in separate BOMs on the
isometrics. We will test this process.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 9-243
Key Points in This Chapter
ng
[student page 9-198]
lti
Paraphrase the key points. su
The key points to remember in this chapter are:
You can create an ISOGEN project corresponding to the Design Series project
and include multiple iso types.
on
Two mapping files, psisokey.dat and psisoend.dat, and the ps_iso.lib class
library control the creation of the ISOGEN PCF files.
Instead of changing a class in the ps_iso.lib class library file for ISOGEN, you
C
State that students have 45 minutes to complete the Lab. Point out that if they need help,
they can refer to the Lab Solution that follows.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 9-244
Lab: Displaying Specification Breaks on Iso's
Objectives
This lab enables you to check your ability to perform the following skills:
Customize a class library to define additional data to be included on isometric
drawings created by ISOGEN
Modify the text displayed on isometric drawings by updating the alternative text
(.alt) file used by ISOGEN
Scenario
g
The isometric drawings for our project must clearly identify every location on the
pipeline where the piping specification changes. ISOGEN has the ability to output a
tin
specification break indication block whenever the specification value changes
along the pipeline so we need to setup our project to make use of this ISOGEN
feature.
Directions
l
su
1 Update ps_iso.lib and ps_iso_user.lib so that all components will include a
piping specification.
on
2 Test your class library updates by creating an iso from the file
09_pipebreaks.jsm and confirm that the iso includes several spec breaks.
3 Update the alternative text file to output the text "SPEC" instead of "MATL"
in the spec break symbols. Refer to the file 09_Atext.pdf to find the Atext
C
number.
4 Re-create an iso using the file 09_pipebreaks.jsm and confirm that the text
"SPEC" is displayed at the spec breaks instead of "MATL."
.I.
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 9-245
Lab: Displaying Specification Breaks on Iso's
Lab Solution
[student page 9-200]
ng
3 Add a property called ISO_SPEC_IDENTIFIER with a data type of String and
an array length of 1.
4 Add a fixed source with the following value:
lti
GET_ISO_PIPING_SPEC (\ISO_OF\SPEC)
-289 SPEC
9 Save the final.alt file, restart PlantSpace AutoISOGEN, and create another iso
from the file 09_specbreaks.jsm.
.I.
10 Confirm that the spec break components on the iso now say "SPEC".
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 9-246
10 Converting Component Labels
g
Chapter Objectives
[student page 10-201]
Run the Label Convert utility to add new attribute values and modify existing
attribute values
Check the output results
C
--no_insul_pipe.dgn
--v80sample.dgn
--v80rimref.dat
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 10-247
Introduction
--v80sample.dgn
--v80rimref.dat
Introduction
[student page 10-201]
The Label Convert utility, LBLCVT, supplied in Design Series does the following:
ng
Writes the new components into a copy of the design file, which is placed in
the .../new directory compared to the original file. The "bad" file is also created
in this directory with the extension *.bad.
lti
Creates the lblcvt.log in the PS_TEMP directory to record the results of each
model conversion. The log file shows the label and the error message for any
problem that occurs in the conversion of a label.
su
Enables you to select multiple design files to update with one click of a button.
Defaults to the label-position export file defined by the configuration variable
LBLCVT_OLD_DEFINITION_FILE
on
Uses the attribute definition table of the new database to place the resulting
values into a new label
B
Places the resulting values into a new label by using the attribute definition
table of the new database
Uses the LBLCVT_REPLACE_NONVALID_POUND_SIGN configuration variable
to replace the "#" sign values with the first matching value
Uses the LBLCVT_SAVE_CONVERSION_TO_JSM configuration variable to save
the objects created during the conversion
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 10-248
Converting Component Labels
g
How the Utility Processes a Component
tin
The Label Convert utility processes each component in the following order:
1 The utility extracts the component type (BUD_TYPE) from the existing
label.
l
su
2 The utility uses that type and the label-position export file to extract the rest
of the attribute values from the existing label.
on
Explain that the existing attribute values are placed on the Input Property List.
3 If a class library is specified, the utility creates an object of the class with the
attribute values as input.
C
The naming of the classes must be in the format LBLCVT_ + attribute BUD_TYPE. If that
.I.
specific class does not exist, then successively more general class names are evaluated by
removing the last underscore (_) until a class is found. For example, for an elbow
(BUD_TYPE=PIPE_PELB), the software looks for class LBLCVT_PIPE_PELB. But if that
B
class is not found, then the software looks for class LBLCVT_PIPE. If that class is not found,
the software looks for class LBLCVT. Thus, class LBLCVT could be used for all components,
or LBLCVT_PIPE could be used for all piping component-types.
4 If an object was created, the utility uses its value (if any) to determine the
new component type. If an object was not created or if the object does not
have a property name BUD_TYPE, the utility uses the component type
extracted from the existing label.
5 For each attribute of the new component type, the utility attempts to get its
value first from the object, second from the attribute values from the
existing label, and third from the default value and input method defined in
the new attribute definition.
6 If an attribute value is not valid (according to the INPUT_METHOD selected
by the values, SPC_MODE and STNDRD), it is recorded in the log file. If the
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 10-249
Converting Component Labels
Ignore new input method if any current value check box is not selected,
the component is presented in the "bad" file.
7 If no components are presented in the "bad" file, the "bad" file is deleted.
ng
Use the following guidelines to determine what setup you need to do beforehand
to get the results that you want after running LBLCVT:
If you just want to add new attributes to the components (a typical task
lti
performed during the life of a project), you would open projvars.cfg and leave
the configuration variable LBLCVT_LIB undefined. The new attributes will get
the default value defined in the new attribute definition.
su
If you want to perform special tasks, such as assigning a value to a new
attribute based on a particular condition (other values), you would use the
JSpace Class Editor to create (and use) your class library. Then you would edit
on
the particular class by adding a fixed source to a particular property of that class
to set up the condition.
If you want to change an attribute value from one component type to another
or to remove a sub-type, you would use the JSpace Class Editor. Then you
C
would edit the particular class by adding a working property (a property used
on a temporary basis) containing a fixed source to change the component type.
If you want to rename an attribute, such as changing CONN1 to EPREP1, you
.I.
would use the JSpace Class Editor to edit the particular class by adding a fixed
source to a property to rename the attribute.
B
If you want to perform special tasks, such as assigning a value to a new attribute,
you would use the JSpace Class Editor. In the JSpace Class Editor, you would create
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 10-250
Converting Component Labels
your class library and edit the particular class by adding a fixed source property of
that class to set the value for the new attribute.
For our project, we need to convert some design files from a Design Series version
8.0 project. The class library, lblcvt_80to81.lib, delivered with version 8.1 is set up
to add default values for new attributes. However, we want to define specific values
for two of the attributes. We will set the ORIG_DES (original designer) attribute to
Joe.Designer, and we will change all pipe components with spec CS150 to spec
CB31.
g
1 Copy the file ...\East_River\etc\lblcvt_80to81.lib to the
...\East_River\custom directory.
tin
2 In the JSpace Class Editor, open the class library that you just copied in the
...\East_River\custom directory.
3 Edit class LBLCVT_PIPE by adding the SPEC property.
l
su
The properties must be of the type STRING with an array length of 1.
All the other PIPE classes inherit the properties of the class LBLCVT_PIPE.
4 Edit SPEC by adding the following fixed source value:
on
.SPEC with the period (.) refers to the value of SPEC passed into the
class (in this application, the value of SPEC from the original label).
C
SPEC without the period (.) refers to the value of the property SPEC.
5 Click Apply.
.I.
6 Edit the ORIG_DES property and change the value source to Joe.Designer.
7 Click Apply.
B
We will open a sample version 8.0 file in our version 8.1 project to confirm that no
values are defined for the ORIG_DES attribute and that the spec of at least some of
the piping components is CS150.
1 Open the training file, v80sample.dgn, in our Design Series East_River
project.
2 From the MicroStation menu bar, choose Design Series > Utilities > Label
Tool.
3 In the Label Tool dialog box, click the Select button.
4 Identify and accept one of the piping components.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 10-251
Converting Component Labels
5 Select ORIG_DES from the list of attributes and confirm that no value is
displayed in the view window.
6 Select SPEC from the list of attributes and confirm that the value is CS150 in
the view window.
Warning: If you use the Read Label tool, the ORIG_DES attribute will display the default
value instead of a blank value.
When you are using Label Convert utility, the JSpace class library for label
ng
conversion can be updated or changed while the labelConvert.ma is loaded. The
changes will be reflected when you click the Process Files button.
1 From the MicroStation menu bar, choose Design Series > Utilities > Label
lti
Convert.
The Label Convert Utility window is displayed.
su
on
C
.I.
B
2 In the Files to Convert list box, create a list of files to convert by clicking the
Browse button.
3 Select the v80sample.dgn file, and click the Add button.
You can also double-click a file to add it to the Design Files to Convert list box.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 10-252
Converting Component Labels
5 In the Label Definition group, click the Browse button to select the
v80rimref.dat file from your training directory.
6 Select lblcvt_80to81.lib from your \custom directory for the conversion rule
library.
7 In the Log File group, leave the default path displayed where the lblcvt.log
file will reside.
8 To have the program write all attribute values of non-valid values to the log
file before and after conversion, leave the Display all attributes on non-
valid value check box selected.
g
Warning: You can also specify 1 for the configuration variable
LBLCVT_DIAGNOSTICS to obtain a more detailed log file output. Depending on
tin
the size of your DGN and the value specified for LBLCVT_DIAGNOSTICS, this
step could generate a huge log file.
9 Click the Process Files button.
l
su
on
C
.I.
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 10-253
Converting Component Labels
The output results are in the log file, as shown in the example.
ng
lti
su
on
C
.I.
B
Converted elements are copied to a file with the same base name with a
*.new extension.
Elements that are not valid are copied to a file with the same base name
with a *.bad extension.
Both files are placed in the ...\new directory.
10 Close the Label Convert Utility window by clicking the Exit button.
11 Open the v80sample.dgn file in the \new directory and confirm that the
ORIG_DES and SPEC attributes have been updated.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 10-254
Key Points in This Chapter
g
LABELCVT creates the labelcvt.log in the PS_TEMP directory to record the
results of each model conversion. The log file shows the label and the error
tin
message for any problem that occurs in the conversion of a label.
The Label Convert utility uses a label-position export file (also known as a
rimref.dat file).
l
It is most important that the rimref.dat file be generated from the existing
su
attribute definition, and that the Label Convert utility be run in a project that has
the new attribute definitions in its database.
on
State that students have 30 minutes to complete the Lab. Point out that if they need help,
.I.
Objectives
This lab enables you to check your ability to perform the following skills:
Define JSpace expressions within a class library to query a database
Use the Label Convert utility to change values of an existing attribute
Scenario
Your project now has a LineList database that defines insulation codes for all piping
components based on service, line number, and pipe size. All existing piping
components need to have the INSULAT and INS_CODE attribute values updated
based on the values in the LineInsulation table in the LineList database.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 10-255
Lab Solution
The sample database and design file are very small to simplify testing of our configuration.
Once the configuration is working, we can use it with any size of database and/or design files.
Directions
1 Define an ODBC data source that points to the LineList database.
2 In the Class Editor, create a new class library called lblcvt_add_insul.lib in the \custom
folder of your project.
ng
3 Add a class to define the new insulation values for all piping components.
4 Add a property to the class called INS_CODE. Set the value of this property to
query the insulation type from the LineInsulation table based on service, line
number, and pipe size.
lti
5 Add a property to the class called INSULAT. Set the value of this property to query
the insulation thickness from the INSULATION_CODE table in our Design Series
su
database based on the value of INS_CODE.
6 Save the class library and test your updates by running Label Convert using the files
lblcvt_add_insul.lib, no_insul_pipe.dgn, and v80rimref.dat.
on
Lab Solution
[student page 10-208]
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 10-256
Lab Solution
4 Add a property called INS_CODE to the LBLCVT_PIPE class with the following
settings:
Data Type: String
Array Length: 1
Value Source:
DB_QUERY ("LineList", "select InsulationType from LineInsulation
where ServiceCode = '" + .SYSTEM + "' and LineNumber = " + .LINENO
+ " and Size = " + .SIZE_1)
5 Add a property called INSULAT to the LBLCVT_PIPE class with the following
g
settings:
Data Type: String
tin
Array Length: 1
Value Source:
l
DB_QUERY ("PS_Codes_DB", "select INSULAT from INSULATION_CODE WHERE
su
INSULATION_CODE='" + INS_CODE + "'")
6 In the modeling environment, open the no_insul_pipe.dgn file and use the Read Label
command to confirm that the insulation values are all set to a thickness of 0 and a
type of None.
on
7 Start the Label Convert utility and select the no_insul_pipe.dgn file for the Files to
Convert.
8 Specify v80rimref.dat for the Old Label Definition and lblcvt_add_insul.lib as the
C
database.
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 10-257
Lab Solution
ng
lti
su
on
C
.I.
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 10-258
11 Setting Up Drawing Annotation
Beginning of Day 5, review with question and answer what students learned in Ch. 9 and 10.
g
Chapter Objectives
[student page 11-211]
l tin
su
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 11-259
Introduction
--East_River_annotation.lib
--projvars_user.cfg
Introduction
[student page 11-211]
ng
Open annotation_example.dgn in Design Series and then choose Design Series > Annota-
tion from the menu bar to open the Annotation dialog box.
lti
The Annotation utility enables you to interactively add notations on components in
a design file. To annotate a component, users choose Design Series > Annotation
from the MicroStation menu bar to open the Annotation dialog box.
su
on
C
.I.
B
Warning: To use Annotation, the items must be valid Design Series components or
annotation items from Drawing Extraction Manager.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 11-260
Introduction
Tell students: When you annotate a drawing produced with the TriForma Drawing Extraction
Manager, the attributes are stored on the item in the drawing. It is no longer necessary to
attach the model as a reference file.
g
tin
Open East_River.mdb in MS Access and then open the ANNOTATION_TYPES table. Show
that the values in the description column match the items in the drop-down list box for Type.
l
su
on
C
.I.
B
When the type is selected from the list box, the ANNOTATION_TYPES table is
queried to obtain values for the prefix and property. For example, if Annotation is
chosen for the type, the following values are queried from the table:
Prefix: ANNOT
Property: ANNOTATION
After a component is selected in the file, the class name is formed by adding the
component type (attribute BUD_TYPE) to the value for the Prefix that comes from
this table. If that class is not found, then the system tries to find the class by
dropping the last segment of the name until it finds a match.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 11-261
Configuring the Content
The annotation text comes from the evaluated property that is specified by the
Property column in the table.
Annotate a pipe.
The ANNOT_PIPE_PIPE class is found in the annotation class library and the
ANNOTATION property is evaluated. The annotation string output will be
ng
something like:
STH-L003-CB31-6
lti
Show the value source for the ANNOTATION property in the ANNOT_PIPE_PIPE class.
su
Example 2: An Elbow (BUD_TYPE = PIPE_PELB)
on
Annotate an elbow.
The ANNOT_PIPE_PELB class is not found in the annotation class library. So the
C
program looks for an ANNOT_PIPE class. This class is found and the evaluation of
the ANNOTATION property outputs the string PIPE_PELB.
.I.
If you want to show examples of updating the class library, edit the ANNOT_PIPE class and
change the value source for the ANNOTATION property. Set the value source to something
like This is a pipe component. Save the library and annotate the elbow again. Then change
the value source to a blank string (two double quotation marks) and annotate the elbow
again.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 11-262
Configuring the Content
The Annotation utility is delivered with several sample definitions, but other
definitions can be added. Annotation definitions are defined in an annotation class
library specified by the DS_ANNOTATION_DEFINITIONS configuration variable in
g
projvars.cfg. The default location of the annotation class library is:
tin
{PS_PROJ}\etc\annotatione.lib (for imperial)
{PS_PROJ}\etc\annotationm.lib (for SI or metric)
l
or metric), is in your ...\Projects\East_River\etc directory.
su
In Annotation, an annotation is created by using a class and an associated property
in the annotation class library. The class name is formed by a prefix and the
on
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 11-263
Configuring the Content
The flexibility allowed by the class name prefix and property name allow different
ways of organizing multiple definitions for one component.
The library that the Annotation utility is using is shown in the Class Library field.
ng
lti
su
on
When you are using Annotation, the JSpace class library for annotation can be
updated or changed while the autotext.ma is loaded. The changes will be reflected
when you click the Annotate button.
C
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 11-264
Configuring the Content
The ANNOTATION_TYPES table is new in V8.1 and specifies the values that match
the property values in the annotation class library. The table is described as follows:
ANNOTATION_TYPES Table
DESCRIPTION Text displayed in the drop-down list box for the annotation type
PREFIX Class name prefix that is prepended to the BUD_TYPE to define the
class
g
PROPERTY Name of the property to evaluate to obtain the annotation text
tin
To configure the ANNOTATION_TYPES table
1 Copy the annotation_types.dat file in your
...\East_River\dbload\data\core directory to your
l
...\East_River\dbload\data\project\core directory.
su
on
C
.I.
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 11-265
Key Points in This Chapter
dialog box.
--The Description (first) column shows the options as they will be displayed in this list box.
Warning: The data must match the properties in the class library.
3 Save and close the file.
4 Load the file into our project database through the Database Setup tool.
ng
Paraphrase the key points.
lti
The key points to remember in this chapter are:
su
The DS_ANNOTATION_DEFINITIONS configuration variable specifies the
annotation class library.
The DESCRIPTION column in the ANNOTATION_TYPES table defines the
on
State that students have 30 minutes to complete the Lab. Point out that if they need help,
they can refer to the Lab Solution that follows.
Objectives
This lab enables you to check your ability to perform the following skills:
Configure annotation output by updating a class library
Conditionally define annotation text based on label attribute values
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 11-266
Lab: Editing an Annotation Class Library
Scenario
Because your project is using insulation type codes to specify insulation type and
thickness for piping components, you need to update the annotation class library to
include these values. The callout for straight piping components should be updated
to include the insulation code and thickness whenever the code is not equal to
"NA". Also, piping sizes should be displayed with fractions instead of decimals (for
example, 2.5 inch pipe should be annotated as 2 1/2"). The following examples
show the desired output.
Example 1
g
If Then
tin
We have a pipe with the following information: The annotation should be:
System: STH STH-L012-CB31-2 1/2".
Spec: CB31
Size_1: 2.5
Lineno: 12
l
su
Ins_code: NA
Example 2
on
If Then
We have a pipe with the following information: The annotation should be:
System: STH STH-L003-CB31-6"(CP15/1.5).
C
Spec: CB31
Size_1: 6.0
Lineno: 3
Ins_code: CP15
.I.
Directions
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 11-267
Lab Solution: Editing an Annotation Class Library
5 Test your updates by placing a few straight pieces of pipe with different
values for INS_CODE and then try annotating them using the new class
library.
ng
[student page 11-218]
lti
1 Add a property called INSULATION_EXPRESSION to the
ANNOT_PIPE_PIPE class with the following settings:
su
Data Type: String
Array Length: 1
Value Source: IIF (.INS_CODE == "NA", "", "(" + .INS_CODE + "/" +
on
.INSULAT + ")" )
2 Update the ANNOTATION property to have either of the following value
sources:
C
or
.I.
The difference in the two expressions is the built-in function calls used to zero-fill the line
number to always be 3 digits. The FORMAT_INTEGER and PADTEXT functions will both
return the desired result.
3 To test the class library in the modeling environment, place a few straight
pieces of pipe with different values for INS_CODE. Start the Annotation
utility, select Annotation for the Type, and then annotate the pipe
components that you just placed.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 11-268
Challenge Lab: Calling Out Workpoint Elevations
If you finish the previous Lab early, you might want to try this more difficult Lab. It
is not required.
Objectives
This lab enables you to check your ability to perform the following skills:
g
Include connect point coordinate values in the annotation text
Copy properties from one class definition to another
tin
Scenario
l
Your project needs the capability to annotate workpoint elevations for piping
su
elbows. The annotation should include the prefix WP EL., followed by the elevation
in feet and inches. For example, an elbow that has its tangent point at an elevation
of 15 feet 4 inches should be annotated:
WP EL.
on
15'-4 1/2"
callout that can be used as a basis for updating the elbow elevation callout.
Information about the connect points of each object is stored as attributes on the
object. The attribute name for the coordinates of the connect points is POINT_n
.I.
where n is 0 (zero) through the number of points less one. These values are
available through the Input Property List.
B
In V8.0, the POINT_n values are returned in the units specified in the design file's Coordinate
Readout Settings. In version 8.1, the values in the POINT_n attribute are always in design file
sub-units.
Directions
1 Update the East_River_annotation.lib to include a class called
ANNOT_PIPE_PELB.
2 In the ANNOT_PIPE_PELB class, add ANNOT_PIPE_PIPE as a parent to
inherit the properties needed to extract the elevation information.
3 Delete the properties that will not be needed for the elbow.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 11-269
Challenge Lab: Calling Out Workpoint Elevations
The ELEVATION property would be localized in the next step if we did not do it here, but it is
a good idea to remove any inheritance that is not logical. The properties inherited from the
ANNOT class should always come from that class because they are generic to all classes.
5 Update the value source for the ELEVATION property to include the text
ng
"WP EL." on one line and the elevation value in feet and inches on a second
line. You will need to call a built-in function to convert the value to feet and
inches.
6 Test your updates by annotating elbows in the file annotation_test.dgn.
lti
Remember to save changes to the class library before testing.
su
on
C
.I.
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 11-270
Challenge Lab: Calling Out Workpoint Elevations
g
4 Add ANNOT_PIPE_PIPE as a parent and switch the drop-down list box at
the top to Properties.
tin
5 Delete the following properties: ANNOTATION,
EXPANDED_SYSTEM_NAME,INSULATION_EXPRESSION,MULTIPLE_LINE,
SYSTEM_SIZE, ZZ_SYSNAME because they are not needed.
6
l
Localize the following properties: ELEVATION, SET_ZCOORD, and
su
ZCOORD by highlighting each property and then clicking the Localize
button.
7 Update the ELEVATION property to have the value source:
on
SSCAN(.POINT_0, "%*f, %*f, %f", "ZCOORD"). This function call reads the string POINT_0,
which contains the XYZ coordinate values of the tangent point of the elbow, to extract the Z
coordinate value. In the SSCAN function call, an asterisk(*) following the percent sign (%)
.I.
suppresses assignment of the next input field, which is interpreted as a field of the specified
type. This means that the field is read but not stored. The format string "%*f, %*f, %f" speci-
fies that the string is to be parsed as a floating point number followed by a comma, another
B
floating point number followed by a comma, and then a floating point number, which is to be
read and then stored. The third floating point number is stored in the ZCOORD property.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 11-271
Challenge Lab: Calling Out Workpoint Elevations
ng
lti
su
on
C
.I.
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 11-272
12 Setting Up the Model Control
System
g
Chapter Objectives
[student page 12-223]
--equip_model.dgn
--pipe_model.dgn
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 12-273
Introduction
Introduction
Model Control System (MCS) is a program that stores in a master repository
database, the components (including non-graphical values and representations) that
you model. MCS also enables you to extract and update the components. These
components include piping, pipe supports, equipment, raceways, structural,
architectural, HVAC, and any other TriForma components.
ng
[student page 12-223]
For data, you can use the default imperial and System International (metric)
datasets that come with the software, or you can use your own data from a
lti
database such as Oracle or Microsoft SQL Server. Depending on the application
running on the TriForma EC, you can store and extract data from your project
database in one of two modes:
su
File-based storage
Component-based storage
on
File-Based Storage
In file-based storage, MCS stores the DGN file. File-based storage mode is required
C
TriForma.
Warning: Where MicroStation V8 DGN files can contain multiple models, DGN files for
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 12-274
Introduction
Assigns a different color to read-only components when they are not checked
out
Assigns a different color to locked components to indicate that another user has
checked them out for modification
Updates the central database only when you submit changes
Component-Based Storage
[student page 12-224]
g
Design Series uses component-based storage. In component-based storage, MCS
stores the components. Component-based storage mode is allowed for applications
tin
where all the components are independent of one another, allowing for the
creation of a model with any arbitrary set of components. You can extract these
components from your project database first by entering a query based on
component attributes, and then specifying an area name with the default master
l
volume definitions or area names with the discipline volume definition file name
su
and extension.
When the components are in the database, all users have access. The initial design,
review, and revisions can be organized in many different ways (for example, by
on
Check out a specified area, system, or line number from the project database
Go to the job site and model components
Return to the office and connect to the project database
.I.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 12-275
Key Points in This Section
ng
MCS
MCS(program
(programthat thatmanages
manages MCS
MCS(program
(programthat
thatmanages
manages
design
designfiles
filesininyour
yourdatabase)
database) components
componentsininyour
yourdatabase)
database)
lti
Your Project Your Project
Database Database
DGNs DGNs
Components Components
on
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 12-276
Defining Volumes
Defining Volumes
TriForma enables you to define and contain rectangular areas of a project model in
a volume definition file. All users can access predefined areas of the model using
g
MCS.
tin
For example, if an area of the plant is defined for the first floor turbine building,
you can perform piping isometrics, prepare material take off sheets, and perform
3D design and layout within this area of the model. For more information about
defining volume definition files and associated areas, see Creating a New Volume
l
Definition File in the Model Control System (MCS) in TriForma Guide.
su
Master and Discipline Volume Definition Files
on
The master volume definition file contains one or more areas that define the
project model work area. This file is loaded into your project database
during database setup or after database setup.
.I.
The master volume definition file defines the default areas used by MCS.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 12-277
Defining Volumes
A good example of using a discipline volume definition files is if you need to work on fire pro-
tection piping in the stairwell of a building from the bottom to the top floor.
Working with the master volume definition file involves the following tasks:
Creating the master volume definition file
ng
Loading the master volume definition file into the database
Adding areas to the master volume definition file
lti
Creating the Master Volume Definition File
[student page 12-227]
su
Using the master volume definition file, MCS enables you to assign an area to each
component. When you create the areas in the master volume definition file, you
must use the following rules:
on
All areas together should form a rectangular cube without any holes.
For example, the volumes shown are properly defined.
.I.
B
Usually someone familiar with the plant site assists in creating the master volume
definition file.
Warning: After the master volume definition file is created, it must be loaded into the
database.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 12-278
Defining Volumes
The master volume definition file and the discipline volume definition files are
created the same way. For the procedure on creating a volume definition file, see
Creating a New Volume Definition File in the MCS Guide.
To enable users to check in and check out project components through MCS, you
must load the master volume definition file into your project database by using the
g
Database Setup tool.
tin
The master volume definition file for our project has already been created. We need
to load the East_River.vol file into our database.
l
su
1 From the Windows Start > Programs menu, locate the Design Series v8
program group and click the Database Setup icon.
2 In the Select Project dialog box displayed, select the East_River project and
click OK.
on
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 12-279
Defining Volumes
4 Type the name of the file containing the master volume definition file, or
click the Browse button to locate the file, East_River.vol.
5 Select the Clear Existing check box if it is not already selected.
ng
This command removes the existing master volume definition file from the
database and loads the new or updated one.
6 Click OK.
lti
Status messages are displayed to inform you of progress, and a successful
completion message box is displayed.
su
Using the Database Setup Tool to Build MCS Storage Tables
on
Warning: You must build the MCS storage tables before using MCS.
The Build Storage Tables operation in the Database Setup tool creates the set of
.I.
<product>_BUD and DEL_<product>_BUD tables, one set of tables for each distinct
BUD_TABLE entry in the CLASSES table. The columns of these storage tables
correspond to the attributes as defined in the STAND_ATTR table and ATTRDEFN
B
table.
2 Click OK.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 12-280
Key Points in This Section
g
model in a volume definition file of two types: a master volume definition file
and discipline volume definition files.
tin
The master volume definition file contains one or more areas that define the
project model work area. This file is loaded into your project database during
database setup or after database setup.
l
Because the master volume definition file should be generated only
su
once, you should add areas to the master volume definition file before
modeling components in those areas.
The discipline volume definition files define specific work areas that the
designers frequently access during the project life cycle. These files are not
on
As your project grows, the Append tool enables you to move from a file-based
storage system to a component-based storage system. The Append operation adds
your Design Series components (stored in MicroStation design files) to your project
database so that you can manage them with MCS. The Append operation is also
used to add files to MCS that were never checked in before.
Later, you can append or add other design files to your project database. For
example, you can upload a steel file (created from the SDNF import operation) into
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 12-281
Appending Design Files to Move from File-Based Storage to Component-Based Storage
your project database to enable MCS to control the use of the file and to provide
users with a steel model for design purposes.
Warning: Only you as the administrator or another user under your guidance should use the
Append operation. Appending the same file repeatedly can result in putting duplicate
information into the database. You should also verify that the correct master volume
definition file has been loaded before appending a file.
ng
You can define a configuration variable to enable Append operations on a temporary or long-
term basis.
1.On the user machine, access the ...\Program\TriForma\config\appl directory and open the
tfmcs.cfg file.
lti
2.Define the following configuration variable:
MCS_ADMIN=1
Note: To enable a user on a temporary basis, you can delete the configuration variable when-
su
ever you want to disable the capability.
3. Save and close the file.
on
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 12-282
Appending Design Files to Move from File-Based Storage to Component-Based Storage
If you are using a commodity that can be edited only on a design file basis (such as Structural
for TriForma, HVAC for TriForma, or Architectural for TriForma), either:
-- If you want all of the graphics stored, select the All Graphics check box.
-- If you want just the items placed with an application, including the TriForma EC, leave the
check box blank.
2 Click the browse (<-) button and select the pipe_model.dgn file from your
training directory.
3 Click OK in the MCS Design File dialog box.
g
4 Repeat this procedure to append the equip_model.dgn file.
tin
To check out a sample file
1 From the MicroStation menu bar, choose MCS > Checkout.
The MCS Design File Check-out dialog box is displayed.
l
su
on
C
.I.
B
2 In the Areas group, leave the Use check box selected and click the browse
(<-) button by the Areas field.
3 Select AREA1 from the list of areas.
4 In the Primary File group, type pipe_area1 for the file name.
5 In the Primary File list box, select piping.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 12-283
Key Points in This Section
6 In the Reference Files group, leave the Create check box selected.
7 Click OK.
8 The new file, pipe_area1.dgn, opens.
If you have time, you can explain more details about the options available during the check-
out operation. The goal of this exercise was simply to confirm that MCS is now operational for
our project.
ng
Key Points in This Section
lti
[student page 12-232] su
Paraphrase the key points.
As your project grows, the Append tool enables you to move from a file-based
storage system to a component-based storage system.
The Append operation adds your Design Series components (stored in
C
MicroStation design files) to your project database so that you can manage them
with MCS.
The Append operation is also used to add files to MCS that were never checked
.I.
in before.
B
Warning: Only you as the administrator or another user under your guidance should use the
Append operation. Appending the same file repeatedly can result in putting duplicate
information into the database. You should also verify that the correct master volume
definition file has been loaded before appending a file.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 12-284
Using the MCS Administrator Database Tool
users, unlock components, add attributes to product BUD tables, and run queries
on your project database.
Being able to view which components are checked out by users enables you to
monitor what is going on in your project and to provide other users the name of
the user who checked out a particular component that they need to work with.
g
1 Locate the TriForma v8.1 program group on the Windows Start > Programs
menu and click the MCS Administrator Database Tool icon.
tin
The Internet Explorer automatically runs and the Remote MCS Admin Page
is displayed.
l
su
on
C
.I.
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 12-285
Using the MCS Administrator Database Tool
Field Description
ng
The Results text box displays checked out, related information (such as who
has checked out which components with what Checkout_ID). This
information comes from the CHECKOUT table.
lti
Unlocking Components
su
[student page 12-235]
If a user has checked out a file and is not available to check it in, you can unlock
on
the file so that other users can check out the components that they had in the file.
We will unlock our sample file as an example.
To unlock components
C
1 Select the checkout_ID that needs to be cleared from the drop-down list.
2 Click the Clear Checkout button.
.I.
Briefly explain the Insert Attribute into BUD Table section of the MCS Administrator Tool.
This operation is used only in the following situation.
An attribute has been added to the ATTRDEFN table in the database after the components
were checked into the database. No column exists in the product BUD table for that attribute.
The MCS Administrator Database Tool adds a column to the product BUD table to accommo-
date the new attribute.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 12-286
Key Points in This Section
g
or management tasks.
The program is a browser-based tool that consists of an HTML page, which can
tin
reside locally or on a server, enabling you to manage the database remotely if
necessary.
These tools enable you to view components checked out by users, unlock
l
components, add attributes to product BUD tables, and run queries on your
su
project database.
Access Control
MCS enables project administrators to enforce access controls to check components
.I.
into the project database and check them out of the project database. This access
control is configurable and is based on the following:
B
The following tables are used to define permissions for users to access the
components in TriForma applications as well as Design Series:
GROUP_CODE table
GROUP_USAGE table
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 12-287
Access Control
USERS table
ROLE_STATUS table
STATUS_TRANSITIONS table
The following attributes are defined in the delivered attrdefn.dat file in your
...\ProjectName\dbload\data directory:
ORIG_DES to track the originator
ng
ORIG_DES is the originator attribute. ENVVAR(USERNAME) is an input method
that evaluates the configuration variable USERNAME (defined by Windows). In
this way, components get the Windows login name automatically assigned
lti
to the originator attribute. This attribute controls the check-out access.
D_STATUS to track the status
su
D_STATUS is the status code attribute. When a component is created the
first time, it gets a default status of IN_STUDY. As the work progresses, the
MCS Change Status tool should be used to change the status of
components. For details, see Procedure for Using the MCS Change Status
on
Tool.
DB_BUILD to track the database build ID
DB_BUILD is used to validate components before check-in. When a
C
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 12-288
Access Control
g
tin
In the following sections, we will see how permissions for this user are controlled
at the commodity level and component level.
l
su
You can open the tables described in this section in MS Access if you want to display them
on the board, or you can reference the screen captures in this section. They should be identi-
cal.
on
rows that determine access control at the commodity level. The user's GROUP_ID
controls access at the commodity level.
GROUP_USAGE Table GROUP_CODE Table
.I.
B
As shown in the tables, our user belonging to the PIPE group has permissions for
the PIPE commodity only. (All other commodities are blocked.) That means that
user PIPE1_DESIGNER can perform MCS operations using piping components only.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 12-289
Access Control
The user's role (DESIGNER) controls access at the component level. Let us see the
corresponding rows in the tables that determine access control at the component
level. In the ROLE_STATUS table, we see that our user with the role DESIGNER has
the following valid statuses: IN_STUDY and IN_PRELIMINARY. In this example,
these are valid check-out statuses.
ROLE_STATUS Table STATUS_TRANSITIONS Table
ng
lti
In the STATUS_TRANSITIONS table, we see that a component with the status
IN_STUDY can be changed to the status IN_PRELIMINARY and similarly, a
su
component with the status IN_PRELIMINARY can be changed to IN_CHECKING. So
our user PIPE1_DESIGNER1 who has the role of DESIGNER has permissions to
change the status to IN_PRELIMINARY and to IN_CHECKING upon checking in a
component. This user would then be unable to check the component out again
on
because only IN_STUDY and IN_PRELIMINARY are valid statuses for MCS Check-
out. Presumably, the STATUS_TRANSITIONS table would have another row going
from IN_CHECKING back to IN_PRELIMINARY in case the checking process rejects
the component.
C
This section applies if users are able to change the status while modeling within
TriForma.
In the delivered project configuration, users cannot change the status through the
Label Edit utility. The only way to change the status of a set of components is by
using the Change Status tool.
If this workflow does not suit your projects needs, then by setting the appropriate
APP_FLAGS value in the ATTRDEFN table, a user can be allowed to use the Label
Edit utility to change the status, presumably just before the check-in. The
disadvantages of this action are:
Inconsistency of status codes between each component in a set
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 12-290
Access Control
(If you are not using the Change Status tool) the necessity of having
TriForma and MCS installed even if the person who is changing the
status (for example, the checker) does not need the modeling tools
Users can check in and append only those components that have valid check-in
statuses, as previously explained. If the status is not valid, the following message is
displayed:
g
tin
Valid check-in statuses include a status that is not valid for the Check-Out operation
l
(status IN_CHECKING is not a valid status for a designer for check-out).
su
The idea is that a user can check out a component and then after working on it the
component's status might change. That should not stop the user from checking in
on
the component as long as the changed status was a valid status as defined in the
STATUS_TRANSITIONS table. However, when the user checks in the modified
component with status changed to IN_CHECKING, this user has no more
permission to work on it as the component moves on to the next step, and a user
C
with another role (in this case a CHECKER) can work on it. Because the designer
will not be able to check out this component, MCS displays the following
confirmation message:
.I.
B
The system can also apply a check-in filter to a user-defined attribute and reject
(meaning archive) all components with a non-valid value for this attribute. For
example in the delivered project, attribute DB_BUILD should have the value 2003
as defined by configurations:
MCS_USER_VERIFY_ELEMENT_ATTRIB_NAME=DB_BUILD
MCS_USER_VERIFY_ELEMENT_ATTRIB_VAL=2003
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 12-291
Access Control
In other words, if the component has the attribute DB_BUILD with values other
than 2003, then that component will not be checked in. This feature can be used to
guard against checking in unintended components.
Check-Out Operation
[student page 12-240]
ng
The attribute ORIG_DES automatically gets the Windows login name
assigned to the components as they are placed and is used to track the
"owner" or "originator" of the components.
lti
For example user PIPE1_DESIGNER can check out only those components
that have ORIG_DES = "PIPE1_DESIGNER".
One exception is that super users can check out components belonging
su
to other users. For example user PROJ1 as defined in the USERS table is
a super user.
USERS Table
on
For example, user PIPE1_DESIGNER can check out only those components
that have IN_STUDY or IN_PRELIMINARY statuses.
.I.
Access control can be implemented at the commodity level and at the component
level. Component level access control is controlled based on attribute values of
each component.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 12-292
Access Control
This value will block the check-out of all commodities for any user_id that
has not been defined as a member of a group.
3 Use the Database Setup tool to load users.dat into the database.
4 Restart Design Series and choose MCS > Check-out from the Microstation
menu bar.
No commodities can be selected for check-out.
5 In users.dat, copy and paste the PIPE1_DESIGNER line in the USERS table
data loading section.
6 Change the user_id value to your Windows user name.
g
For example, if your Windows user name is Joe.Designer, the line would be
tin
as follows:
"Joe.Designer" "PIPE" "Designer1" "DESIGNER" "N"
l
Save users.dat and load it into the database with the Database Setup tool.
su
8 Restart Design Series and choose MCS > Check-out from the menu bar.
The piping commodity is now available for check-out.
on
commodities and all components. You need to activate the access controls by
following this procedure.
1 Edit users.dat in your ...\{ProjectName}\dbload\data directory.
2 Modify the entry for "Default" in the group_usage section as explained in
this DAT file.
3 Save and close the file.
4 Edit StatusControl.cfg in the ...\Program\TriForma\config\appl directory.
5 Enable the definitions of the following configuration variables:
STATUS_TOOL_STATUS_NAME
MCS_USER_CHECKOUT_CLAUSE
MCS_USER_VERIFY_ELEMENT_ATTRIB_NAME
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 12-293
Access Control
MCS_USER_VERIFY_ELEMENT_ATTRIB_VAL
6 Save and close the file.
ng
all of the piping components is different from your Windows username.
3 Check in the file.
lti
[student page 12-242]
su
A user can be identified as a superuser to allow access to components that have an
ORIG_DES value other than the users Windows username. Superusers can access
components that they did not create.
on
1 In users.dat, change the SUPER_USER value specified on the line with your
Windows username to "Y" as follows:
"Joe.Designer" "PIPE" "Designer1" "DESIGNER" "Y"
C
Some of the piping components are still in the reference file because we
have access only to components that have a D_STATUS value of
"IN_STUDY" or "IN_PRELIMINARY".
B
The user's role (such as DESIGNER) controls access at the component level based
on the value of the D_STATUS attribute, and the values in the ROLE_STATUS table.
We will change our role to PROJADMIN to gain access to all piping components.
1 In users.dat, change the ROLE value specified on the line with your
Windows username to "PROJADMIN" as follows:
"Joe.Designer" "PIPE" "Designer1" "PROJADMIN" "Y"
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 12-294
Key Points in This Section
g
components into the project database and check them out of the project
database.
tin
This access control is configurable and is based on: access control tables, access
control attributes, and access control configuration variables.
The GROUP_USAGE table and GROUP_CODE table determine each users
l
access (permissions) at the commodity level.
su
The ROLE_STATUS table and STATUS_TRANSITIONS table determine each
users access (permissions) at the component level.
commodities and all components. You need to activate the access controls by
configuring this program.
C
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 12-295
Key Points in This Section
ng
lti
su
on
C
.I.
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 12-296
13 Viewing External Data
g
Chapter Objectives
[student page 13-245]
--po.xls
--sample.bmp
--sample.txt
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 13-297
Introduction
Introduction
Design Series enables users to access data from third-party applications. The
delivered software is configured to access data in the form of a sample graphic
through the Windows Paint program. You can configure the software to access data
in a different application such as Microsoft Access or Excel. The new utility is
displayed to users by choosing Design Series > Utilities > Access External Data from
the MicroStation menu bar.
ng
These tables define the commands to be issued to the operating system, the
components that can be selected for each command, and the arguments defined for
each command.
lti
EXE_REPORT_CRITERIA Table su
[student page 13-245]
EXE_TYPE Text string to be displayed in the Access External Data dialog box
B
When the Access External Data utility is run, a list of applications that can be run is
displayed to the user. This list actually contains the values from the EXE_TYPE
column in the EXE_REPORT_CRITERIA table. When the user selects the
application, the user is prompted to select a component. If the selected component
meets the criteria defined in the BUD_TYPE and CRITERIA columns, the value for
REPORT_ID is retrieved. The REPORT_ID value is then used to obtain information
from the EXE_REPORT_TYPES table.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 13-298
Introduction
EXE_REPORT_TYPES Table
[student page 13-246]
The EXE_REPORT_TYPES table defines the command string used to start the
external application. This table is defined in the report_types.dat file in the {network
drive}\Projects\dbload\data\pipe directory.
g
The columns of the table are described as follows:
tin
Column Name Description
Arguments are appended to the command string based on values queried from the
EXE_REPORT_ARGS table.
C
EXE_REPORT_ARGS Table
.I.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 13-299
Setting Up Access to External Data
To make this exercise more meaningful, the following example explains how to set
up access to data in Microsoft Excel.
1 Open the report_criteria.dat file in the {network drive}\Projects
\dbload\data\pipe directory to edit the EXE_REPORT_CRITERIA table.
2 Between the lines, DATA_BLOCK_BEGIN and DATA_BLOCK_END, add the
following new row of data:
ng
"View Spreadsheet Data", 1, "*", "TRUE", "EXCEL"
lti
4
EXE_REPORT_TYPES table.
5 Between the lines, DATA_BLOCK_BEGIN and DATA_BLOCK_END, add the
su
following new row of data:
"EXCEL", "C:\Program Files\Microsoft Office\Office
\Excel.exe", "EXCEL_ARGS", "#"
on
Po.xls is a delivered sample file. However, you can use any Excel file.
9 Save and close the file.
10 Load all three modified files into your project database by using Database
Setup tool.
11 Copy the delivered Chapter 13 student files to C:\Program
Files\Bentley\Home\East_River.
12 Open a design model in Design Series and test the utility, Access External
Data.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 13-300
Key Points in This Chapter
g
The EXE_REPORT_CRITERIA table, EXE_REPORT_TYPES table, and
EXE_REPORT_ARGS table are used to control the functionality of this
tin
command.
These tables are in the report_criteria.dat file, report_types.dat file, and
report_arguments.dat file, respectively.
l
su
This chapter contains no Lab. However, if time permits, have students add an external data
link to an MS Word document.
on
After lunch, review the course. The afternoon is set aside as a workshop to enable students
.I.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 13-301
Key Points in This Chapter
ng
lti
su
on
C
.I.
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 13-302
Appendix A: East_River Project
Standards
Line Number Identification
Piping components will be called-out in the following format:
Nominal pipe size-Line Service Code-Material Classification-Line
Number-Insulation Code
g
Examples:
4-WCS-BA12-200-HC
8-STH-CB03-103-PP
l tin
su
Line Service Codes
on
AI Instrument Air 20 1
C
GN Nitrogen 20 5
B
GP Propane 20 6
GO Oxygen 20 7
GL Glycol 20 8
K Kerosene 20 9
RAB Ammonium Bisulfate 20 10
RCS Copper Sulfate 20 11
RHA Hydrochloric Acid 20 12
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 A-303
Code Description Level Color
g
WCR Cooling Water Return 22 19
tin
WCS Cooling Water Supply 22 20
WFP Fire Protection Water 22 21
WP Potable Water 22 22
l
WT Treated Water 22 23
su
on
Working Units
The standard working units for all drawings are:
C
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 A-304
Material Classification
Material Classification
Code Material
A Alloy
B Iron (cast ductile)
C Carbon Steel
g
D Stainless Steel 316L
tin
E Stainless Steel 304L
F Fiberglass Reinforced Plastic (FRP)
G Galvanized
H
l
Plastic (thermo setting)
su
J Non Ferrous metallic (copper, brass, and so on.)
M Plastic (pvc, cpvc, pvdf)
on
Pressure Rating
C
Code Description
A 125lb ANSI
.I.
B 150lb ANSI
C 250lb ANSI
B
D 300lb ANSI
E 400lb ANSI
F 600lb ANSI
G 900lb ANSI
H 1500lb ANSI
J 2500lb ANSI
K 3000lb ANSI
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 A-305
Insulation Codes
Class Description
Class Code
ng
Miscellaneous (81 - 99)
lti
Insulation Codes su
Code Description
CP Condensation Prevention
ET Electrical Trace
on
ST Steam Trace
HC Heat Conservation
C
PP Personnel Protection
.I.
SPEC CB31
Item or
Pipe Size Description
Commodity
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 A-306
Piping Material Specification
Item or
Pipe Size Description
Commodity
g
same schedule as pipe
Flanges to 2 ANSI B16.5 Class 150 Forged Carbon Steel, ASTM A105,
tin
Raised Face, Socket Weld, Same Schedule as Pipe
2 to 12 ANSI B16.5 Class 150 Forged Carbon Steel, ASTM A105,
Raised Face, Weld Neck, Same Schedule as Pipe
l
2 to 12 ANSI B16.5 Class 150 Forged Carbon Steel, ASTM A105,
su Raised Face, Slip-on, Same Schedule as Pipe
Branch Connections to 12 See Branch Table A
Gaskets to 12 ANSI B16.21, Class 150 Garlock BLUE-GARD Style 3200,
on
1/8 Thick
Valves to 2 VELAN Style 3054W, 1500# Gate Valve, ASTM A105
to 2 VELAN Style 8076Z, 1500# Y-Pattern Globe Valve, ASTM
A105
C
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 A-307
Branch Table A
Branch Table A
ng
lti
su
on
C
.I.
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 A-308
Appendix B: JSpace Built-in Functions
Introduction
The following built-in functions support the chapter Object Concepts and JSpace
Expressions on page 6-125.
g
CLASS
Declaration
CLASS( ARG1 [, ARG2, ARG3, ..., ARGn ] )
l tin
Parameters
su
Description
The CLASS function reports if the Active Object is derived from an input JSpace
C
class. The arguments must be Strings that are the names of JSpace classes written in
upper case letters.
Returns
.I.
CLASS returns a Boolean value of either TRUE or FALSE. If the Active Object is
B
derived from an input JSpace class, the function value is TRUE. Otherwise, the
function returns FALSE.
Example
The following function call returns TRUE if the current object is created from the
class CYLINDER or CONE, or one of the child classes of the class CYLINDER or
CONE:
IF ( CLASS( "CYLINDER", "CONE" ) )
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 B-309
DB_QUERY
Declaration
DB_QUERY( ALIAS, QUERYSTRING )
Parameters
ALIAS An alias for the ODBC data source name, user name, and password
is expanded using the environment variable by the same name. The
environment variable should have a data source name (DSN), a user
g
name, and a password delimited by the semi-colon character ";". User
name and password are optional for most desktop database systems.
If the alias has not been defined, the alias string itself is assumed to
tin
be the exact name of the ODBC data source.
For client-server RDBMS such as Oracle, the network specific
parameters (such as SQL*Net network string) required to complete
the connection to data source can be specified using the ODBC
l
driver manager.
QUERYSTRING
su A String that evaluates to a complete SQL statement of the format
"SELECT ...". For maximum inter-operability, ODBC standard SQL
grammar should be used. However, because the SQL String is passed
to the database system for direct execution, database specific SQL
on
grammar is allowed.
Description
C
The DB_QUERY function returns the result of an SQL query in a variable length
array of a type determined by the type of the column in the database with the
number of elements equal to the number of rows returned from the query. If the
.I.
Returns
B
DB_QUERY returns an array containing one element for each row returned from
the query. The array type corresponds to the type of the database column returned.
All standard ODBC SQL types are supported. The following mapping for ODBC
SQL types is used:
SQL_BIT Boolean
SQL_CHAR Character
SQL_VARCHAR Character
SQL_LONGVARCHAR Character
SQL_DECIMAL Double
SQL_NUMERIC Double
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 B-310
DB_QUERY
SQL_SMALLINT Short
SQL_INTEGER Long
SQL_REAL Float
SQL_FLOAT Double
SQL_DOUBLE Double
SQL_TIME Date
g
SQL_DATE Date
SQL_TIMESTAMP Date
tin
For more information about the mapping of database specific data types to
corresponding SQL data types in ODBC, see the documentation on your ODBC
driver.
l
su
Example
The following expression reports the diameter of a spool in the SPOOL table whose
on
ID field is equal to the value of the COMP_ID property for the Active Object:
SP_DIA = DB_QUERY( "IDS", "SELECT SPOOL_DIA from SPOOL where ID = " +
COMP_ID )
C
For this function call to succeed, the configuration variable IDS is required in the
following format:
IDS=PlantSpace Database;proj;none
.I.
In this example, "PlantSpace Database" is the exact name of the ODBC data source
for an Access database, "proj" is the user name, and "none" is the password. In an
B
Optionally, Alias can be the exact name of the ODBC data source. For improved
performance, create an index on the column referenced in the where clause of the
SQL statement.
Because the first connection to the database requires the loading of the ODBC
Driver DLL, the first query to a SQL database takes slightly longer than subsequent
queries that can reuse the existing connection when the Alias name used in the
DB_QUERY function is the same.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 B-311
FORMAT_INTEGER
FORMAT_INTEGER
Declaration
FORMAT_INTEGER( FORMAT_SPEC, NUMBER )
Parameters
ng
Description
lti
flag can be "-" or "0". The "-" flag causes the integer to be left aligned in the String
with spaces on the right. The "0" flag left pads the integer with zeros. If no flag is
specified, the integer is right aligned with spaces on the left. The width is defined
su
as the number of Characters in the String.
Returns
on
Example
C
IIF
Declaration
IIF( TEST, TRUE_VALUE, FALSE_VALUE )
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 B-312
MIN
Parameters
Description
The IIF function provides for conditional actions in an expression. The evaluation
of the condition in the first argument of the function to either true or false
g
determines the value of the function.
tin
Returns
If TEST is true, IIF returns the TRUE_VALUE argument. Otherwise, the function
returns the FALSE_VALUE argument. If TRUE_VALUE or FALSE_VALUE is a String
l
that starts with the apostrophe character ( ' ), the String is assumed to be an
su
expression and the result of the expression is returned. Another IIF function can be
used as the second or third argument.
Example
on
When A is 6
MIN
Declaration
MIN( ARG1 [, ARG2, ARG3, ..., ARGn ] )
Parameters
Description
The MIN function determines the minimum value from the list of values. The MIN
function has two versions. If only one argument is passed into the function, MIN
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 B-313
PADTEXT
determines the smallest value in the array. If more than one argument is passed into
the function, MIN determines the minimum of all of the arguments.
Returns
MIN returns the minimum value of the type of argument with the highest priority.
From low to high, the priority is Byte, Short, Long, Float, and Double.
Example
ng
MIN( 5, 7, 10 )
lti
PADTEXT
Declaration
su
PADTEXT( SOURCE_STRING, PAD_CHARACTER, TARGET_LENGTH, PAD_JUSTIFICATION )
Parameters
on
Description
The PADTEXT function returns a padded text String containing a specified source
B
text String. Three arguments to the function specify the length of the padded String,
the padding Character to be used, and where the padding is to be applied to the
source String.
Returns
Example
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 B-314
SSCAN
SSCAN
Declaration
SSCAN( STRING, FORMAT [, PROPERTY1, PROPERTY2, ..., PROPERTYn ] )
Parameters
g
FORMAT A format control String specifying the interpretation of the String. The control
String can contain one or more of the following:
tin
White-space Characters or blank ( ). A white-space Character causes the
function to read, but not store, all consecutive white-space Characters in the
String up to the next non-white-space Character. One white-space Character
in the format matches any number (including 0) and combination of white-
space Characters in the String.
l
Non-white-space Characters with the exception of the percent sign (%). A
su
non-white-space Character causes the function to read, but not store, a
matching non-white-space Character. If the next Character in the String does
not match, the function terminates.
Format specifications introduced by the percent sign (%). A format
specification causes the function to read and convert Characters in the String
on
String; the matching Characters in the String are scanned but not stored. If a
Character in the String conflicts with the format specification, the function
terminates. When the first format specification is encountered, the value of
the first input field is converted according to this specification and assigned to
.I.
the first property specified in the argument list. The second format
specification causes the second input field to be converted and stored in the
second property, and so on through the end of the format String.
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 B-315
SSCAN
ng
Characters to be read from the String. No more than "width" Characters are
converted. Fewer than "width" Characters may be read if a white-space
Character or a Character that cannot be converted according to the given
format occurs before "width" is reached.
lti
To read Strings not delimited by space Characters, a set of Characters in
brackets ([ ]) can be substituted for the "s" (String) type Character. The
corresponding input field is read up to the first Character that does not
appear in the bracketed Character set. If the first Character in the set is a
su
caret (^), the effect is reversed. The input field is read up to the first
Character that does appear in the rest of the Character set.
The "type" Character is the only required format field; it appears after any
optional format fields. Type "type" Character determines whether the
on
Description
.I.
The SSCAN function retrieves values from a given String based on a specified
format control string and assigns the values to one or more properties of the Active
B
Object.
Returns
Example
The following expression retrieves and assigns values for ID and SUFFIX from the
literal String "V001A":
ID = SSCAN( "V001A", "V%[0123456789]%s", "ID", "SUFFIX" )
The following expression retrieves and assigns values for LINE, SERVICE, SPEC, and
SIZE from the literal String "L-101-AA-HBD-3":
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 B-316
TO_FIF
TO_FIF
Declaration
TO_FIF( VALUE )
Parameters
g
VALUE A Double defining a distance
tin
Description
The TO_FIF (to feet-inch-fraction) function converts the input distance value to a
l
String of the form 1'-1". The value input to the function is in the units of the
su
JSpace model. If the model units are metric, the conversion to feet is performed.
Returns
on
Example
C
TO_FRAC
B
Declaration
TO_FRAC( NUMBER, BASE )
Parameters
Description
The TO_FRAC function converts the input number to a whole number and a
fraction.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 B-317
TOUPPER
Returns
TO_FRAC returns a String that is the input number formatted as a whole number
and a fraction.
Example
ng
TOUPPER
Declaration
lti
TOUPPER( SOURCE_STRING )
Parameters
su
SOURCE_STRING A String
on
Description
The TOUPPER function returns a String that is the uppercase equivalent for each
character in the argument.
C
Returns
TOUPPER returns a text String that is the uppercase equivalent of a specified source
.I.
String.
B
Example
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 B-318
Appendix C: Tips
General Help
This tip identifies the database tables that must be updated if you want to incorporate a new
standard into the Design Series product.
It is assumed that you have taken the proper training courses and understand how the Design
Series piping database tables are populated.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 C-319
To determine dimensional information needed for each component, refer to the Design Series
Reference Guide for Administrators.
Notes
Refer to these notes according to the number shown in the Notes column of the tables that
follow.
1 If a component is flanged, you must also update the PIPE_PFLG and PIPE_PGKT
database tables.
When adding new flanges, you must also update the BOLTS database table.
g
2
3 The PIPE_PEND is used to define pipe end conditions for a given standard. When
tin
creating a new end condition, you must also create a rule file for that end condition.
4 Both tables contain the same information. When adding data to one of these tables,
you must also add it to the other.
l
5 The BOLTS table must contain bolt information for flanges. If no bolt data is
su
defined for a given flange of a given standard, ISOGEN will report an error.
Currently only ANSI and EDS (European data set) standard bolts are delivered in
Design Series.
on
6 When defining a flanged pipe in the PIPE_PEND table, you must also define the
flange in the PIPE_PFLG database table.
7 When adding flanges to the PIPE_PFLG database table, you must also add
dimensional information to the PIPE_PEND database table.
C
.I.
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 C-320
General Help
BOLTS Bolts.dat 5
g
PIPE_PGKT Pgkt.dat 2
tin
Adding Pipe Diameter Data
l
su
DIAMETER_TABLES Diatable.dat
PIPE_PIPE Pipe.dat
WALLTHK Wallthk.dat 4
on
WALLTHK_HLP Wallthk_hlp.dat 4
PIPE_END_RATING end_ratg.dat
C
MANUFACTURERS Manufac.dat
B
MATERIAL_DATA Material.dat
PIPE_PVOP Pvop.dat
PIPE_PVLV Pvlv.dat 1
PIPE_OPER Oper.dat
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 C-321
General Help
STANDARD_DESC Glossary.dat
PIPE_PNOZ_ENDS Pnoz.dat 1
ng
Adding End Preparation Data
lti
End Preparation Database Table DAT File That Creates Table Notes
Component type Database Table DAT File That Creates Table Notes
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 C-322
General Help
Component type Database Table DAT File That Creates Table Notes
g
Instruments PIPE_PINS Pins.dat
Nipples PIPE_PNLP Pnlp.dat 1
tin
Orifice plates PIPE_POPL Popl.dat
Point-of-use Bend PIPE-POUB Poub.dat
l
Point-of-use Straight PIPE_POUS Pous.dat
su
Plug PIPE_PPLG Pplg.dat
Concentric Reducer PIPE_PRED Pred.dat 1
S-bend PIPE_PSBN Psbn.dat 1
on
ISOGEN will identify the bend radius of an elbow based on the diameter of the pipe. For
example if a bend is placed with a radius that is three times the pipe diameter, ISOGEN will
identify that bend as 3D.
To call out the bend radius, you need to use the GET_ISO_BEND_RADIUS user function,
an optional function that can be used on the ISO_BEND class. For details on this user
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 C-323
General Help
ng
THEN BEND = "1.5D"
ELSEIF \ISO_OF\B_RADIUS == "A"
THEN BEND = "U/D"
lti
ELSE BEND= \ISO_OF\B_RADIUS
When the bend radius of the elbow is determined, you can then use the
GET_ISO_BEND_RADIUS function to output the value of the bend radius to the
PCF file. At this point, you can then continue to the next step.
.I.
4 Create a new property called BEND_RADIUS with a String data type and an array
length of 1.
B
6 Click Apply and save and close the user class library.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 C-324
General Help
You can view how the system determines the values displayed in the attributes dialog box,
shown in this example. This tip can help you determine which, if any, overlay
INPUT_METHOD is being used for a particular attribute.
g
l tin
su
While the attributes dialog box is displayed, press the F4 key. This action creates a file called
psAttrs.log in the directory that $PS_TEMP points to. The path to this file in the Tutorial
project is ...\Bentley\Home\psdstut\temp.
on
C
.I.
B
While the Design Series menu is visible, type MDL COMMAND configVar_dump
[filename]. This command writes all of the configuration variables to the file [filename]
(including those set at the project level and user level and those beginning with "_").
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 C-325
Debugging
ng
Set configuration variable LBLCVT_SAVE_CONVERSION_JSM to any value to leave the
object model created using the conversion class library, instead of deleting it. This allows you
to examine the values of all of the properties set by the class library.
lti
su
Debugging
Set configuration variable JMDLODBC_LOG to any value to write the actual, expanded
database queries sent by the MDL applications and status received by the MDL applications,
C
such as the attribute dialog box. This can help you find the query that fails and why it is
failing.
.I.
To create a log file with the queries sent to an ODBC-compliant database by all applications,
use SQL tracing.
SQL tracing slows performance tremendously, so it is recommended that you use it only
when no other option is available.
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 C-326
Debugging
The SQL.LOG file is turned on in Control Panel > Data Sources (ODBC) > Tracing
tab. The log file can be turned on and off while applications are running. This
setting logs all calls to ODBC drivers to help you in debugging your applications.
It may be helpful to run a query that fails in Design Series using another application that
connects to the database. Some applications that can be used are Microsoft Access and
Oracle ODBC Test.
g
Using PROJVARS.CFG to Check Failed Queries
tin
In projvars.cfg, set JMDLODBC_LOG = 1. This setting creates a log file of your query steps
and the tables used if a query was successful. The log file is called JMDLODBC.LOG and
helps you troubleshoot problems if a query was unsuccessful. You can then go to the DAT
l
file to see if you have a syntax error.
su
on
C
.I.
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 C-327
Debugging
Troubleshooting Bolts
ng
lti
su
on
C
.I.
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 C-328
Debugging
g
l tin
su
on
C
.I.
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 C-329
Debugging
ng
lti
su
on
C
.I.
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 C-330
Debugging
g
l tin
su
on
C
.I.
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 C-331
Debugging
ng
lti
su
on
C
.I.
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 C-332
Debugging
g
l tin
su
on
C
.I.
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 C-333
Debugging
ng
lti
su
on
C
.I.
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 C-334
Debugging
g
l tin
su
on
C
.I.
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 C-335
Debugging
ng
lti
su
on
C
.I.
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 C-336
Debugging
g
l tin
su
on
C
.I.
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 C-337
Debugging
ng
lti
su
on
C
.I.
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 C-338
Debugging
g
l tin
su
on
C
.I.
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 C-339
Debugging
ng
lti
su
on
C
.I.
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 C-340
Debugging
g
l tin
su
on
C
.I.
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 C-341
Debugging
ng
lti
su
on
C
.I.
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 C-342
Index
C E
Catalog Table Field 193 East_River Project.pcf 23
Catalog Tables, loading 76 Eds-compdefn.s71 177
Challenge Labs Eds-specs.s71 177
Calling Out Workpoint Elevations 269 EXE_REPORT_ARGS Table 299
Combining Statements into One Query 61 EXE_REPORT_CRITERIA Table 298
Displaying Insulation Code Descriptions 121 EXE_REPORT_TYPES Table 299
Identifying the Pipe Size in Fractions 165 Exercises
CHECKOUT Table 286 Defining Volumes 277
Class in object-oriented environment 126 To activate the access controls 293
Class Libraries 167 To activate the JSM file 150
Class library, definition of 134 To add a class to a class library 137
CLASSES Table 280 To add a fixed source property 144
CLIP_LENGTH property 214 To add a fixed source property that uses a JSpace
Comments, adding to data files 69 expression 160
Comparison Operators 156 To add a new guideline 184
CompDefn.s71 177 To add a parent to the class 152
Component Labels To add a prompt source property 145
To add a prompt source property to the class VALVE 154
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 IN-343
To add a prompt source property using a JSpace To investigate a sample design file 251
expression that queries a database table 146 To load the catalog tables 76
To add a property 138 To load the master volume definition file into the
To add a source property that uses an inference rule 157 database 279
To add guidelines to the branch table and synchronize To load the modified text file 83
them 206 To modify guideline values 187
To add the dashes and the L prefix to the line To modify the SPOOL_NO attribute 114
number 161 To order the output 50
To add the JSM FILE field 221 To override access control based on the ORIG_DES
To add the new SCH_COND attribute 111 attribute 294
To analyze how data in a DGN is used to create a To place components to confirm the dimensions 77, 83
JSM 169 To query a column in a table 49
To analyze the isometric drawing creation process 235 To re-create the table with a primary key defined 47
To append a design file 282 To reorder criteria 196
ng
To associate component types with a spec 183 To run LABELCVT to assign a value to a new
To build MCS storage tables 280 attribute 252
To call out the bend radius on an isometric drawing 324 To select displayed pipe diameters for a branch table 202
To check out a sample file 283 To select multiple columns 50
To check the results of the JSpace expression 160 To select output settings (for iso drawings) 231
lti
To configure access control at the commodity level 292 To set up a class so that a value is assigned to a new
To configure access control based on the D_STATUS attribute 251
attribute 294 To set up a user project directory 31
To configure the ANNOTATION_TYPES table 265 To set up the procurement database and ODBC data
su
To confirm that access control at the component level is source 215
working 294 To synchronize guidelines 188
To confirm the working units 73 To synchronize the new Branch Table guidelines 210
To connect to an AMS database 27 To test the configuration for the shop items 243
To copy guideline values 187 To test the primary key constraint 47
on
To copy the DAT files and rename them 79 To unlock components 286
To create a criterion using a JSpace expression 194 To update the projdefe.rul file 71
To create a JSM File 148 To update the PROJECT_CONFIG table 72
To create a JSpace class library 136 To update your Attrdefn file and database 241
To create a label definition file 103 To update your class libraries 242
C
To create a new branch type set 204 instance of the VALVE class 154
To create a new class 152 To view components checked out by users 285
To create a new spec 182
To create a new specification file 181
B
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 IN-344
Creating and updating user class libraries 242 Creating 278
Customizing the ISOGEN Materials List 238 Defining 277
Mapping Design Series Data 230 Loading 279
PS_ISO.LIB 231 MCS Administrator Database Tool 284
PSISOEND.DAT 231 Unlocking components 286
PSISOKEY.DAT 230 Viewing components checked out by users 285
Selecting output settings 231 MCS Storage Tables
Testing the Configuration for the Shop Items 243 Building 280
ISOGEN plot files 229 Model Control System
How MCS uses your project database 274
mslocal.cfg file 22
J
JSM files 148, 150
JSpace Class Editor 250 O
g
JSpace expressions 158, 193 Object Browser 149
JSpace object model files 148 Object in object-oriented environment 126
JSpace technology 126 Object Model Files 148
tin
Object Reporter program 214
Object-oriented technology 127
K Ordering the Output in SQL 50
Keys, concept in SQL 46 ORIG_DES configuration variable 288
l
su
L P
Lab Solutions Parent-Child Hierarchy 151
To create a new file 118 Parent-Child relationship 130
To create a user attribute definition file 119 PCF files 228
Piping component files (PCFs) 228
on
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 IN-345
Deleting 39
Inserting 38
S
Seed Files 181
SELECT Statement in SQL 48
Selecting Multiple Columns in SQL 49
Settings in PlanSpace AutoISOGEN, Selecting output
settings 231
Setup Types
Description of 14
Local Project Configuration 17
Network Project Configuration 18
ng
Spec Maker
Creating a Branch Table for a Spec 201
Creating a New Branch Type Set 204
Description of
Seed files, efficient use 181
lti
Selecting Displayed Pipe Diameters for a Branch
Table 202
Spec file, creating 180
Specification
su
Guidelines 178
Specification Maker. See Spec Maker
SQL 36
Structured Query Language 36
Synchronizing and Unsynchronizing Guidelines 187
on
T
Tables
ATTRDEFN 280
C
CHECKOUT 286
CLASSES 280
Creating new 37
Defining in text files 66
.I.
Deleting 40
Deleting data from in text files 68
Loading data into 68
Text Input 194
B
U
Unlocking Components 286
V
Viewing Components Checked Out by Users 285
Volume Definition Files
Discipline files 277
W
WHERE clause 51
Working Units 73
PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate
11/24/03 IN-346