You are on page 1of 360

PlantSpace Design Series

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.

Windows is a registered trademark and Win32s is a trademark of Microsoft Corporation.

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

2003 Bentley Systems, Incorporated.


MicroStation 1998-2003 Bentley Systems, Incorporated.
C

MicroStation Image Manager 1997-2003 Bentley Systems, Incorporated.


Portions of QuickVision are 1993-1995 Criterion Software Ltd. and its licensors.
Portions of QuickVision were developed by the CAD Perfect Development Laboratory.
Portions 1992-1997 Spotlight Graphics, Inc.
.I.

Portions 1993-1995 Spyglass, Inc.


IGDS file formats 1987-1994 Intergraph Corporation.
Intergraph Raster File Formats 1994 Intergraph Corporation Used with permission.
B

Portions 1992-1994 Summit Software Company.


Unpublished rights reserved under the copyright laws of the United States and international
treaties.
All rights reserved.

PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate

11/24/03 ii
Welcome!

About This Course


Welcome to the PlantSpace Design Series Administrator Course for version 8.1
provided by Bentley Systems Incorporated. This course is five days in length and
covers administrator tasks on a more in-depth and advanced level than they are
covered in the PlantSpace Design Series Administrator Guide. The course also

g
provides for the demonstration of customization tasks that are better understood
through instructor-led training.

Objectives of the Course

This course teaches you how to:


l tin
su
Set up your project
Update your project database and customize the attributes
Customize Specification Maker
on

Use basic Structured Query Language statements


Customize object properties, rules, and JSpace expressions
Customize deliverables such as reports, isometric drawings, and drawing
C

annotations
.I.

Prerequisites
B

You should have the following prerequisites:


Knowledge of Windows basics including working with files in Windows
Explorer
Experience using MicroStation V8
Design Series User Course or a working knowledge of Design Series

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

Chapter 4, Updating Database Tables (first half)

l
Day 2
su
Chapter 4, Updating Database Tables (second half)
on

Chapter 5, Customizing Attributes and Component Labels

Day 3
C

Chapter 6, Working with Object Concepts and JSpace Expressions

Chapter 7, Customizing Spec Maker


.I.

Day 4

Chapter 8, Customizing Reports


B

Chapter 9, Customizing Isometric Drawings

Chapter 10, Label Conversion

Day 5

Chapter 11, Setting Up Drawing Annotation

Chapter 12, Customizing the Model Control System

Chapter 13, Viewing External Data

Workshop: Help in resolving software problems (if time permits)

PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate

11/24/03 iv
About This Course Guide

About This Course Guide


This Course Guide is used with the PlantSpace Design Series software in
MicroStation using datasets that come with the software or are provided by the
instructor.

Chapter Contents

Each chapter contains the following information:

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 key points summarize important information to remember from the


topics covered.
Lab
C

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.

scenario that is typical in the plant design industry, and directions.


Lab solution
B

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

Setting Up Your Project ______________________________2-13


on

Chapter Objectives ____________________________________ 2-13


Introduction _________________________________________ 2-14
Project Setup Types ________________________________ 2-14
Installing the East_River Project __________________________ 2-19
C

Reviewing the Results of the Project Configuration ________ 2-22


Local Configuration File _____________________________ 2-22
Project Configuration Files ___________________________ 2-23
.I.

Project Variables File _______________________________ 2-24


Defining Your ODBC Data Source________________________ 2-24
Populating the Project Database __________________________ 2-27
B

Creating a User Project Directory _________________________ 2-31


Customizing the Display of Menus and Tool Boxes ___________ 2-33
Key Points in This Chapter ______________________________ 2-34

Structured Query Language Basics ____________________3-35


Chapter Objectives ____________________________________ 3-35
Introduction _________________________________________ 3-36
Creating New Tables _______________________________ 3-37
Inserting Rows ____________________________________ 3-38

PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate

vii
Table of Contents

Deleting Rows ____________________________________ 3-39


Deleting a Table ___________________________________ 3-40
Finding and Selecting Records ________________________ 3-40
Creating a Table, Inserting Data, and Deleting a Table _________ 3-41
Worksheet _______________________________________ 3-44
Creating a Table ___________________________________ 3-44
Inserting Data_____________________________________ 3-45
Deleting a Table ___________________________________ 3-46
Testing the Primary Key Constraint ____________________ 3-47
Finding and Selecting Records ___________________________ 3-48
SELECT Statement ________________________________ 3-48
DISTINCT Keyword _______________________________ 3-49
Selecting Multiple Columns __________________________ 3-49

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

Updating Database Tables ___________________________4-63


on

Chapter Objectives ____________________________________ 4-63


Introduction _________________________________________ 4-64
Using Edited Text Files _____________________________ 4-65
Advantages of Maintaining Data in Text Files ____________ 4-65
C

Commands Used to Create and Load Database Tables______ 4-66


Defining a Table___________________________________ 4-66
Loading Data into a Table ___________________________ 4-68
Deleting Data from a Table __________________________ 4-68
.I.

Adding Comments to Data Files_______________________ 4-69


Updating the Working Units _____________________________ 4-69
B

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

Copying and Renaming the DAT File___________________ 4-79


Editing the Text File________________________________ 4-80
Loading the Modified Text File _______________________ 4-83
Placing Components to Confirm the Dimensions__________ 4-83
Key Points in This Section ______________________________ 4-84
Lab: Adding a New Standard with Catalog Data ______________ 4-84
Lab Solution _________________________________________ 4-85

Customizing Attributes and Component Labels __________5-89


Chapter Objectives ____________________________________ 5-89
Introduction _________________________________________ 5-90
Explaining Attribute Definitions_______________________ 5-91
Attribute Definition Tables___________________________ 5-92

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

Checklist for Adding an Attribute______________________ 5-110


Displaying Descriptions for the Schedule Condition Attribute ___ 5-113
Modifying an Existing Attribute, SPOOL_NO _______________ 5-114
Key Points in This Section ______________________________ 5-115
C

Lab: Updating Insulation Attributes _______________________ 5-116


Lab Solution _________________________________________ 5-118
.I.

Object Concepts and JSpace Expressions _______________6-125


Chapter Objectives ____________________________________ 6-125
Introduction _________________________________________ 6-126
B

Defining Basic Terminology __________________________ 6-126


Object-Oriented Technology and Relational Databases _____ 6-127
Inheriting from Parents _____________________________ 6-130
Applying Object-Oriented Concepts to JSpace ____________ 6-134
Key Points in This Section ______________________________ 6-134
Creating a JSpace Class, Properties, and Relationships _________ 6-135
Creating the Class Library and Adding a Class ____________ 6-135
Adding Object Properties ____________________________ 6-138
Adding a Property Source____________________________ 6-143
Key Points in this Section _______________________________ 6-147
Working with JSM Files and Objects_______________________ 6-148
JSpace Object Model Files ___________________________ 6-148
Using the Object Browser____________________________ 6-149

PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate

ix
Table of Contents

Activating a JSM File _______________________________ 6-150


Instancing Objects _________________________________ 6-150
Parent-Child Hierarchy ______________________________ 6-151
Using an Inference Source Property ____________________ 6-155
Formatting Inference Rules __________________________ 6-156
Using Comparison Operators _________________________ 6-156
Logical Operators __________________________________ 6-157
Key Points in this Section _______________________________ 6-158
Using JSpace Expressions to Format a Pipeline Callout ________ 6-158
Writing JSpace Expressions __________________________ 6-158
Lab: Using JSpace Expressions to Format a Pipeline Callout_____ 6-163
Lab Solution _________________________________________ 6-164
Challenge Lab: Identifying the Pipe Size in Fractions __________ 6-165

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

Defining Piping Specifications ________________________7-175


l
su
Chapter Objectives ____________________________________ 7-175
Introduction _________________________________________ 7-176
Spec Maker Objects as JSpace Objects __________________ 7-176
Structure of a Project Specification File _________________ 7-176
on

Setting Up a Project Specification File with Specifications_______ 7-180


Creating a New Spec File ____________________________ 7-180
Working with Specs ________________________________ 7-182
Working with Guidelines________________________________ 7-184
C

Copying and Moving Guidelines_______________________ 7-186


Key Points in This Section ______________________________ 7-188
Lab: Defining Guidelines for Other Component Types ________ 7-189
Lab Solution _________________________________________ 7-190
.I.

Adding a Criterion to the Elbow Component Type____________ 7-192


Types of Criteria for a Component Type ________________ 7-192
B

Creating a Criterion ________________________________ 7-194


Defining Piping Specifications ___________________________ 7-195
Reordering Criteria _________________________________ 7-195
Using Valves Operators Catalogs & User Input _____________ 7-197
Key Points in This Section ______________________________ 7-199
Working with Branch Tables_____________________________ 7-200
Creating a Branch Table for a Spec_____________________ 7-201
Selecting Displayed Pipe Diameters for a Branch Table _____ 7-202
Creating a New Branch Type Set ______________________ 7-204
Adding Guidelines to the Branch Table and Synchronizing __ 7-206
Key Points in This Section ______________________________ 7-210

PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate

x
Table of Contents

Customizing Reports ________________________________8-213


Chapter Objectives ____________________________________ 8-213
Introduction _________________________________________ 8-214
Processing Report Data on Specific Areas of a Model ______ 8-214
Customizing Object Reporter ____________________________ 8-215
Create ODBC Data Source for a Procurement Database ____ 8-215
Defining a Report in Object Reporter___________________ 8-216
Key Points in This Chapter ______________________________ 8-221
Lab: Creating a Component Information Report______________ 8-222
Lab Solution _________________________________________ 8-224

Customizing Isometric Drawings ______________________9-227


Chapter Objectives ____________________________________ 9-227

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

Customizing ISOGEN Output to Identify Shop Items _________ 9-241


Adding an Attribute to Identify Shop Fabrication__________ 9-241
Creating and Updating User Class Libraries ______________ 9-242
Testing the Configuration for the Shop Items_____________ 9-243
C

Key Points in This Chapter ______________________________ 9-244


Lab: Displaying Specification Breaks on Iso's ________________ 9-244
.I.

Converting Component Labels ________________________10-247


Chapter Objectives ____________________________________ 10-247
Introduction _________________________________________ 10-248
B

Converting Component Labels ___________________________ 10-249


How the Utility Processes a Component ________________ 10-249
Setup Guidelines Before Running the Label Convert Utility __ 10-250
Assigning Values to New Attributes ____________________ 10-250
Key Points in This Chapter ______________________________ 10-255
Lab: Using Label Convert to Update Insulation Values _________ 10-255
Lab Solution _________________________________________ 10-256

Setting Up Drawing Annotation _______________________11-259


Chapter Objectives ____________________________________ 11-259
Introduction _________________________________________ 11-260
Understanding the Configuration of the Annotation Utility __ 11-261

PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate

xi
Table of Contents

Configuring the Content ________________________________ 11-262


Configuring the Content in Your Annotation Class Library __ 11-263
Configuring the ANNOTATION_TYPES table __________ 11-265
Key Points in This Chapter ______________________________ 11-266
Lab: Editing an Annotation Class Library ___________________ 11-266
Lab Solution: Editing an Annotation Class Library ____________ 11-268
Challenge Lab: Calling Out Workpoint Elevations ____________ 11-269

Setting Up the Model Control System __________________12-273


Chapter Objectives ____________________________________ 12-273
Introduction _________________________________________ 12-274
How MCS Uses Your Project Database _________________ 12-274
Key Points in This Section ______________________________ 12-276

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

Access Control _______________________________________ 12-287


Access Control Tables ______________________________ 12-287
Access Control Attributes____________________________ 12-288
Access Control Configuration Variables _________________ 12-288
C

How Access Control Works __________________________ 12-289


How Access Control Works in MCS Operations __________ 12-290
Configuring Access Control __________________________ 12-292
Key Points in This Section ______________________________ 12-295
.I.

Viewing External Data _______________________________13-297


B

Chapter Objectives ____________________________________ 13-297


Introduction _________________________________________ 13-298
Setting Up Access to External Data _______________________ 13-300
Key Points in This Chapter ______________________________ 13-301

Appendix A: East_River Project Standards ______________A-303


Line Number Identification______________________________ A-303
Line Service Codes ____________________________________ A-303
Working Units________________________________________ A-304
Material Classification __________________________________ A-305
Basic Material of Construction ________________________ A-305
Pressure Rating____________________________________ A-305

PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate

xii
Table of Contents

Class Description __________________________________ A-306


Insulation Codes ______________________________________ A-306
Piping Material Specification _____________________________ A-306
Branch Table A _______________________________________ A-308

Appendix B: JSpace Built-in Functions _________________B-309


Introduction _________________________________________ B-309
CLASS _____________________________________________ B-309
DB_QUERY ________________________________________ B-310
FORMAT_INTEGER _________________________________ B-312
IIF ________________________________________________ B-312
MIN _______________________________________________ B-313
PADTEXT __________________________________________ B-314

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

Adding a New Standard to Design Series Piping___________ C-319


Using a User Function to Call Out the Radius of a Bend ____ C-323
Determine Overlay INPUT_METHOD for an Attribute ____ C-325
Checking that Configuration Variables Are Set Properly_____ C-325
C

Adding Diagnostic Information to the Log File


During Label Conversion ____________________________ C-326
Examining the Properties Set by a Class Library
.I.

During Label Conversion ____________________________ C-326


Debugging __________________________________________ C-326
Finding a Failed Query and the Cause___________________ C-326
B

Components Not Properly Checking In/Out in MCS ______ C-326


Create a Log File of Queries to an ODBC Database
To Debug Applications _____________________________ C-326
Query Fails in Design Series __________________________ C-327
Using PROJVARS.CFG to Check Failed Queries__________ C-327
Troubleshooting Bolts ______________________________ C-328

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

Guidelines to the Instructor on Using the Courseware


The courseware consists of:
Software and dataset on a CD or server to be downloaded to your machine and the
student machines, as explained at the beginning of each chapter

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.

Load on each student machine the product software:


--PlantSpace Design Series v08.01.01.09.
--Licenses: pspiping.lic, pisogen.lic, tfeqmod.lic, tfrace.lic, hvac.lic, msv8.lic
IMPORTANT: You must get a temporary license for Personal ISOGEN from Bentley Institute.

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.

Load on your instructor machine:

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]

State the objectives.

The objectives of this chapter are to:

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

The opportunity to practice and ask questions as you learn.


An opportunity to network with other attendees and learn different ways that they use
the software to meet their needs.

Overview of Design Series Software


[student page 1-2]

Explain each slide in 01_DS_overview.ppt.

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

Key Points in This Chapter


[student page 1-9]

Paraphrase the key points.

The key points to remember in this chapter are:


Design Series provides two modes of data storage: file storage and database storage (also

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

Time Needed to Cover Chapter: 2 hours

g
Chapter Objectives
[student page 2-13]

State the objectives.


l tin
su
The objectives of this chapter are to:
Install a project
on

Create a user project directory


Define the ODBC source for the project
Populate the project database
C

For this chapter, you will be using:


.I.

Training files for the students:


--PlantSpace Design Series product CDs (one for each student)
B

--East_River_seed3d.dgn

Training files for the instructor:


--02_proj_config_setup.ppt

--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

the project network server.


.I.

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.

Mention that Design Series needs to be installed wherever MicroStation is installed.

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

Local Project Configuration


C

[student page 2-17]


.I.

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

5 Verifying that the configuration variable _USTN_PROJECT points to the directory


containing the project *.pcf file.
If you did not verify this information when you installed the Local User/Network
Server setup type, you should do so now.

Network Project Configuration


[student page 2-17]

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

Installing the East_River Project


[student page 2-18]

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

7 Select Microsoft Access and then click Next.

PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate

11/24/03 2-20
Installing the East_River Project

The Choose Project Installation Location dialog box is displayed.

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

Start Copying Files


Complete Setup
The Complete Setup dialog box is displayed.
C
.I.
B

10 Click Finish to complete the setup.

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.

Reviewing the Results of the Project Configuration


[student page 2-21]

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.

Local Configuration File

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.

Project Configuration Files

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

Project Variables File

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

Defining Your ODBC Data Source


C

[student page 2-23]


.I.

Continue to follow along on your computer.

For this course, our data source will be called East_River.


B

To define the ODBC data source


1 From the Windows Start > Settings menu, choose Control Panel.
2 Double-click the Administrative Tools icon.
3 Double-click the Data Sources (ODBC) icon.
The ODBC Data Source Administrator dialog box is displayed.
4 Select the System DSN tab.
By using the System DSN tab, the ODBC connection is available to all users who
log on to that computer. However, if you create the ODBC connection on the
User DSN tab, that connection is available only to that user on that computer.

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

6 Select the Microsoft Access Driver (*.mdb) and click Finish.

PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate

11/24/03 2-25
Defining Your ODBC Data Source

The setup dialog box for the selected driver is displayed.

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

12 Click OK to close the dialog box.

Populating the Project Database


[student page 2-26]

Again, follow along on your computer.

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

configuration variable, _USTN_PROJECT, the Select Project dialog box will be


displayed.
.I.
B

3 Select East_River and click OK.


The Database Setup window is displayed.

Based on the DBSETUP_* configuration variables in C:\Projects\East_River


\projvars.cfg, the project settings are displayed in the dialog box.

PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate

11/24/03 2-27
Populating the Project Database

Make sure that everyone has Access set as the Vendor.

ng
lti
su
on
C

4 Click the Load Database button.


The System User and System Password fields can be left blank because they are not
required with Microsoft Access.
.I.

The following warning message is displayed.


B

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

If the following message is displayed prompting you to synchronize the class


library with the AMS database, you should click Yes.
C
.I.
B

The following message should be displayed confirming the successful


synchronization and you can should click OK.

PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate

11/24/03 2-29
Populating the Project Database

The system then displays the progress of the installation.

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

7 To exit the Messages dialog box, click OK.


8 Exit the Database Setup tool.

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.

Creating a User Project Directory


[student page 2-30]

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

Emphasize this as a warning.

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.

2 Create the following new directories:


C:\Projects\East_River\custom
C:\Projects\East_River\dbload\data\project

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.

4 Create a file called projvars_user.cfg.


This file is to be located in the C:\Projects\East_River\custom directory, as defined
by the DS_USER_CFG_DIR variable discussed in step 1.
5 Using a text editor such as Notepad, add the following to the projvars_user.cfg file:
# projVars_user.cfg
# Date By Reason

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

# Configure DBSetup to remember the last directory accessed


DBSETUP_REMEMBER_LAST_DIR = 1
# Define variables used for automatic loading of customized files
C

into the database


DBSETUP_PRODUCTS > project
DBSETUP_PROD_DIRS> project
.I.

6 Create a text file called project.dat in the \Projects\East_River\dbload\data\project


folder.
B

We will add information to this file later in the course.


7 From the dataset provided, copy seed file East_River_seed3d.dgn into the
C:\Projects\East_River\custom directory.

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.

You should be able to confirm that MS_DESIGNSEED is defined correctly in the


projvars_user.cfg file. Click the Design Series Modeling icon and select East_River as the

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.

All other directories will be used in other chapters of this course.

Customizing the Display of Menus and Tool Boxes


You can customize the Design Series menu to display menus and tool boxes that suit your

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.

To customize the display of tool boxes

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

5 Close MicroStation again.


6 Open ps_user.rul in the C:\Program Files\Bentley\Home\East_River directory.
.I.

Your edits are not in this file.


7 Delete ps_user.rul in the C:\Program Files\Bentley\Home\East_River directory.
B

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

Key Points in This Chapter


[student page 2-32]

Paraphrase the key points.

The key points to remember in this chapter are:


To set up a project, you must install the Project setup type.

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.

Note: This chapter contains no Lab.


on

Break Time: 5-10 minutes


C
.I.
B

PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate

11/24/03 2-34
3 Structured Query Language
Basics

Time Needed to Cover Chapter: 2 hours

g
Chapter Objectives
[student page 3-33]

State the objectives.


l
The objectives of this chapter are to:
tin
su
Explain the meaning of a table, row, and column in a database
Create a table and insert data
on

Delete data from a table and delete the table


Define table constraints to promote data integrity
Find and select data from tables
C

Note that SQL is often pronounced sequel.


.I.

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

contain more in-depth information on SQL.

For this chapter, you will be using the Line Service Codes included in the East_River Project
Standards in Appendix A.

Training files for the students:


--no new files (Use the database file already created in Chapter 2.)
Training files for the instructor:
--none

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.

In a relational database, data is stored in two-dimensional tables (containing rows


C

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

Draw a skeleton table on the white board similar to the following:


Table
Column1-------------------------Column2
record 1 ------------------------- xx xx
record 2 ------------------------- xx xx
Note: Every column has a defined data type.

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

[student page 3-34]

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

type abbreviations and associated descriptions in your project database:


.I.

Open BR_TYPE_DESC in the East_River project database to show what the table looks like.
B

CREATE TABLE BR_TYPE_DESC


(CODE CHAR(8) NOT NULL,
DESCRIPTION CHAR(50));

Explain that the standard syntax for creating a table is as follows:


Create Table table_name
(column-name1 data_type [NOT NULL],
column-name2 data_type [NOT NULL],
.
.
.
column_namen data_type [NOT NULL]);

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

Char(x), a column of characters, where x is a number designating the maximum


number of characters allowed (maximum length) in the column. This data type
is commonly referred to as a string.
Integer, a column of whole numbers, positive or negative.
C

Decimal(x, y), a column of decimal numbers, where x is the maximum length


in digits of the decimal numbers in this column, and y is the maximum number
.I.

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

[student page 3-35]


C

Write the basic statement on the white board as you explain.


.I.

Let's delete this new row from the table:


DELETE FROM BR_TYPE_DESC
B

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

becomes obsolete. To delete a table, we use the DROP keyword.

The DROP command deletes the entire table, not just the data.
C

Warning: Use this command with caution.

The basic statement is:


.I.

DROP TABLE table_name


B

We will use the DROP statement later in this chapter.

Break Time: 5-10 minutes

Finding and Selecting Records


[student page 3-35]

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

SELECT column_name FROM table_name

For example, to select all branch descriptions, the statement would be:
SELECT DESCRIPTON FROM BR_TYPE_DESC

Creating a Table, Inserting Data, and Deleting a Table


[student page 3-36]

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

fore switch to another tool if you want.


C

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

Creating and Saving a New Query

1. In Access, open your East_River project database.

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

5. From the menu bar, choose View > SQL View.


C
.I.
B

6. Write your SQL statement in the Query1:Select Query dialog box.


For example, you could type SELECT DESCRIPTION FROM BR_TYPE_DESC;.

7. Close the dialog box and save the changes as prompted.

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

Editing an Existing Query


C

You can edit a query by selecting the query and then clicking the Design button, or right-click-
.I.

ing and selecting Design View from the list.


B

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

Table Name: Piping_Services

Column Purpose Column Name Data Type Width Required

Piping Service Name service_name char 4 yes


Service Description description char 30 no
MicroStation Level ustn_level integer not yes
applicable
MicroStation Color ustn_color integer not yes
applicable

ng
Then discuss and fill in each row.

lti
Worksheet
su
[student page 3-36]

Use your project database.


on

Table Name: ___________________

Column Purpose Column Name Data Type Width Required


C

Piping Service Name


Service Description
.I.

MicroStation Level
MicroStation Color
B

We cannot use the name level in a column because it is a SQL keyword.

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

INSERT INTO piping_services VALUES('AI','Instrument Air',20,1);

2 Run this statement to add 1 row of data to our table.


3 Open the table to confirm that the data was added.
4 Save the following as InsertData2:
INSERT INTO piping_services VALUES('CLP','Low Pressure
Condensate',20,2);

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

Tell students: We are inserting wrong data here on purpose.

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.

To delete the table


1 Save the following query as DeleteTable:
DROP TABLE piping_services;

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

2 Run this statement to delete the table and its contents.

To re-create the table with a primary key defined


1 Open the CreateTable query and add the keywords primary key.
CREATE TABLE piping_services (service_name char(4) primary key,
description char(30),
ustn_level integer not null,
ustn_color integer not null);

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

Testing the Primary Key Constraint


C

[student page 3-38]

We can quickly test whether the primary key constraint is working by attempting to
add duplicate data to our table.
.I.

To test the primary key constraint


B

1 Run the InsertData1 query.


2 Run the InsertData2 query to confirm that valid data can be added to the
table.
3 Run the InsertData3 query again.
You should receive an error message indicating that there was a key
violation.

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

Finding and Selecting Records


[student page 3-39]

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:

Column Name Data Type Description of Column


su
STNDRD char(4) Piping standard abbreviation
CODE char(12) Specification number
on

SIZE_1 decimal(7,3) Pipe size


RATING integer Pressure rating
MAT_NAME char(25) Material name
C

P1_PAR decimal(10,4) Ring gasket outside diameter


PAR_UNITS char(2) Dimensional units (mm or in)
.I.

SELECT Statement
B

[student page 3-39]

Open the table, PIPE_PGKT, and do the following as you explain.

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

To query a column in a table


1 Enter the following query as Select1:
SELECT stndrd FROM pipe_pgkt;

2 Run the query.


Notice that the data returned contains many duplicates (for example, ANSI
displayed multiple times in the list of values).

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

SELECT DISTINCT stndrd FROM pipe_pgkt;

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

Selecting Multiple Columns


[student page 3-40]

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

To select multiple columns


1 Edit Select1 and update it to be:
SELECT DISTINCT stndrd, code FROM pipe_pgkt;

2 Run this statement.


The database returns a list of the unique combinations of standards and
codes included in the gasket table:

Standards Codes

ANSI B16.21

ng
ANSI B16.5
EDS 2690

lti
EDS 16966-6
EDS 2691
su
EDS 1514-1

Ordering the Output


on

[student page 3-41]

We will now add another column to our SELECT statement to see how we can
C

change the order of the query results.

To order the output


.I.

1 Continuing from the previous exercise, add another column called size_1 to
our query statement.
B

2 Run this statement.


The output seems to be in no particular order.
3 To have the output displayed according to the size_1 values, modify your
statement to include an ORDER BY clause:
SELECT DISTINCT stndrd, code, size_1 FROM pipe_pgkt ORDER BY
size_1;

4 Run this statement.


Now you can look at the output and see which standard and code are
available for each size of pipe.

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

SELECT stndrd, code, size_1


FROM pipe_pgkt
WHERE size_1=3;

An example that you can use on the white board is:

SELECT DISTINCT stndrd, code, size_1

ng
FROM pipe_pgkt
WHERE size_1 = 3 and stndrd = 'ANSI';

lti
Relational Operators su
[student page 3-42]

The following table lists six relational operators in SQL:


on

= Equal
<> or != Not Equal
< Less Than
C

> Greater Than


<= Less Than or Equal To
.I.

>= Greater Than or Equal To

The relational operators can be used with either numeric or string values.
B

String values must be enclosed in single (') quotation marks.

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';

Remember that quoted strings are case sensitive.

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

FYI. Here are some common SQL questions and answers:

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

3. (Related question) Database tables are just like spreadsheets, correct?


.I.
B

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.

4. How can I use wildcards?

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.

SELECT DISTINCT EPREP1 FROM PIPE_PRED


WHERE EPREP1 LIKE 'B*'; [if using Access]
WHERE EPREP1 LIKE 'B%'; [if using Oracle]

ng
Key Points in This Chapter

lti
[student page 3-42] su
Paraphrase the key points.

The key points to remember in this chapter are:


on

SQL is an ANSI standard language supported by most database systems.


SQL statements are used to create, delete, and populate tables.
C

SQL statements are used to select data from existing tables.


The basic SQL statements covered in this chapter are:
.I.

CREATE TABLE table_name (column_name char(n)|integer...)


INSERT INTO table_name VALUES (...)
DROP TABLE table_name
B

DELETE FROM table_name WHERE condition


SELECT DISTINCT column_name FROM table_name WHERE condition
ORDER BY column_name ASC|DESC

Break Time: Lunch

PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate

11/24/03 3-54
Lab: Using SQL to Select Data

Lab: Using SQL to Select Data


[student page 3-43]

State that students have 40 minutes to complete the Lab.


Do this before the break. In this way, slower students will have an additional 15 minutes by
working through the break.

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

Column Name Data Type Description of Column

eprep1 char(2) Inlet end preparation


sch_rat1 char(4) Inlet schedule or rating
eprep2 char(2) Outlet end preparation
sch_rat2 char(4) Outlet schedule or rating
size_1 decimal(7,3) Inlet pipe size

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.

Column Name Data Type Description of column


B

code char(8) Piping standard abbreviation


description char(50) Long description of piping standard
overlay_suffix char(9) Defines the suffix for the attribute
definition overlay table

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.

Explain how to do this lab by doing the example.

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

All the answers are in the next section, Lab Solution.

1 What is the long description for three of the piping standard abbreviations
C

included in the results of the example question?


Use the STANDARD_DESC table for this question. You will need to execute
.I.

a statement for each abbreviation. However, all statements will be identical


other than the abbreviation value used in the WHERE clause of each
statement.
B

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

2 What inlet sizes are available for ANSI reducers?


SQL Statement:
.I.

_____________________________________________________________
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.

Standard Inlet Size Outlet Sizes

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.

[student page 3-46]


B

If you need some help, here are the steps to follow.


1 What is the long description for each of the piping standard abbreviations
included in the results of the example question?
Use the STANDARD_DESC table for this question. You will need to execute
a statement for each abbreviation. However, all statements will be identical
other than the abbreviation value used in the WHERE clause of each
statement.
SQL statements:
SELECT description FROM standard_desc where code='ANSI';
SELECT description FROM standard_desc where code='BIO';
SELECT description FROM standard_desc where code='CMPR';
SELECT description FROM standard_desc where code='EDS';

PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate

11/24/03 3-59
Lab Solution

SELECT description FROM standard_desc where code='VICT';


SELECT description FROM standard_desc where code='WTRF';
SELECT description FROM standard_desc where code='WTRH';
SELECT description FROM standard_desc where code='WTRI';
SELECT description FROM standard_desc where code='WTRP';

Answer: Use the following chart to record your answers.

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

WTRP Flanged plastic


WTRS Steel Victaulic
C

2 What range of inlet sizes are available for ANSI reducers?


SQL Statement:
SELECT DISTINCT size_1 from pipe_pred WHERE stndrd='ANSI' ORDER BY
.I.

size_1;

Answer: 0.25 through 48


B

3 What outlet sizes are available for the following standard and inlet size
combinations? Record your answers in the chart.

Standard Inlet Size Outlet Sizes

ANSI 2 0.5, 0.75, 1, 1.25, 1.5


Victaulic 4 1, 1.5, 2, 2.5, 3, 3.5

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?

Standard Inlet Size Outlet Size Inlet End Preparations

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

Challenge Lab Solution


[student page 3-49]

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

FROM pipe_pred, standard_desc


WHERE pipe_pred.stndrd = standard_desc.code;
C
.I.
B

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]

State the objectives.


l tin
su
The objectives of this chapter are to:
Update project units
on

Add catalog data

For this chapter, you will be using:


C

Training files for the students:


-- none
.I.

Training files for the instructor:


--ams_mcs.ppt (1 slide from 01_DS_overview.ppt in chapter 1)
B

--diatable_fred.dat (for Freds Ball Valves lesson)


--manufac_fred.dat (for Freds Ball Valves lesson)
--pvlv_fred.dat (for Freds Ball Valves lesson)
--pvop_fred.dat (for Freds Ball Valves lesson)
--standard_desc_fred.dat (for Freds Ball Valves lesson)

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

Using Edited Text Files


[student page 4-51]

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.

return a list of DAT files containing the table name.


B

Advantages of Maintaining Data in Text Files


[student page 4-52]

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.

Commands Used to Create and Load Database Tables

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

Break Time: 5-10 minutes

Defining a Table

The first step in defining a table is to give it a name:


CREATE_TABLE TableName

The columns to be included in the table are defined by using the following command
sequence:

Show the column name, data type, and width.

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

These commands are analogous to the SQL CREATE TABLE command.

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

The column descriptions are defined with the following syntax.


[index] ColName DataType DataWidth [DecPlace] [ColConstraint]
C

Tell students that index is equivalent to a primary key in SQL.


.I.
B

Where Means

index The SET_UNIQ_INDEX keyword specifies that the column is to be included in


the unique identification of data rows within the table. This keyword prevents the
loading of duplicate information in the table. This is equivalent to a primary key in
SQL.
ColName Column name (maximum length 32 characters)
DataType Type of the data (CHAR, NUMBER, DATE)
DataWidth Width of the column, including decimal places and the decimal point for real
numbers
DecPlace Number of decimal places for real numbers
ColConstraint Constraint to be imposed on the data when loaded into the table (NOT NULL,
CHECK (constraint))

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.

Loading Data into a Table


[student page 4-53]

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

The required DATA_BLOCK_BEGIN and DATA_BLOCK_END keywords delineate the


start and end of the rows of data. The data for each row is entered by using comma-delimited
on

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

TableName VALUES (...).

Deleting Data from a Table


[student page 4-54]

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.

may comment-out a large section of the file unknowingly.


B

Updating the Working Units


[student page 4-55]

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.

We need to update our working units. Currently, they are:


25400 = imperial and 1000 = metric.

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

3 Confirming the working units setting in the modeling environment

Updating the Projdefe.rul File


C

The projdefe.rul file is read whenever a modeling session is initiated.


.I.
B

PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate

11/24/03 4-70
Updating the Working Units

To update the projdefe.rul file


1 Copy projdefe.rul from the C:\Projects\East_River directory to the
C:\Projects\East_River\custom directory.
2 Open the projdefe.rul file in our \custom directory.

g
l tin
su
on
C
.I.
B

3 Set B3D_UORS_PER_SYSTEM_UNIT to the value 8000.


4 Save and close the file.

Updating the PROJECT_CONFIG Table


[student page 4-56]

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

To update the PROJECT_CONFIG table


1 Copy the prjcfg_e.dat file in ...\Projects\East_River\dbload\data
\core\english into ...\Projects\East_River\dbload\data\project
\core\english, and open it.
You will have to create the specified folder.

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

2 Set B3D_UORS_PER_SYSTEM_UNIT to the value 8000.


3 Save and close the file.
4 From the Windows Start > Programs menu, choose PlantSpace Design Series V8 >
Database Setup.
5 In the Select Projects dialog box, select East_River and click OK.
6 In Load group of the Database Setup window, click the Data File button.
7 Browse to the prjcfg_e.dat file and click Open.

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.

Working Units Setting in the Modeling Environment


[student page 4-58]

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

Key Points in This Section


[student page 4-58]

Paraphrase the key points.

The key points to remember in this section are:


Design Series uses ASCII text files to load your project database. The text files are in

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

Break Time: End of Day 1


C

Beginning of Day 2, review by question and answer what students learned in Ch 1, 2, 3 and
.I.

the first half of Ch 4.


B

Adding New Catalog Data Based on an Existing Standard


[student page 4-59]

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

Generic Stages in Adding Catalog Data

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.

Editing the Text File


B

[student page 4-59]

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.

To edit the text file


1 Using a text editor such as Notepad, open the required text file in the appropriate
subdirectory in the {network drive}\Projects
\{ProjectName}\dbload\data directory.

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

The standard catalog files are in the {network drive}\Projects\{ProjectName}\dbload


\data\<product> directories:
C

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

To load the catalog tables


1 In the Database Setup window, click the Data File button.
2 Select the data file that you want to load.
You can select multiple data files. Each file is loaded in turn.
3 Click Open.
The amount of time required for the process to finish increases as the size of the file
increases. A message is displayed indicating that the file was successfully loaded.
4 Click OK.

PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate

11/24/03 4-76
Adding a New Standard with Catalog Data

Placing Components to Confirm the Dimensions


[student page 4-61]

Once the database is successfully updated, you should try to place a component in the
modeling environment to verify that the dimensions are correct.

To place components to confirm the dimensions


1 From the Windows Start > Programs menu, choose PlantSpace Design Series V8 >
Design Series Modeling and open your design file.

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

[student page 4-61]

Continue to follow along on your computer.


C

Tell students that this exercise is a worst-case scenario.


.I.

While Design Series contains an extensive catalog of piping components, as an administrator


B

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.

Freds Ball Valves

ng
lti
su
on
C
.I.
B

Stages in Adding Catalog Data

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.

Copying and Renaming the DAT File

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

Chapter 4 of the Design Series Reference Guide for Administrators.


You can see that valve data is stored in the catalog table PIPE_PVLV that is created
from SQL commands in the pvlv.dat file.
.I.

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

Editing the Text File


.I.

[student page 4-64]


B

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.

To edit the text file that defines manufacturers

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

// the standard_desc table.


//================================================================
*/
.I.

/* Table: STANDARD_DESC
set_uniq_index CODE char 8 "check (code = upper(code))"
B

Description char 50
OVERLAY_SUFFIX char 9
*/

4 Add the following lines to the file.


These lines will update the data in the table when this file is loaded into the database.
DELETE_FROM standard_desc "where CODE='FRD' "
INSERT_INTO standard_desc

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

5 Save and exit.

To edit the text file defining the valve dimensions


1 Using an ASCII text editor, open pvlv_fred.dat.
With any new catalog files, it is recommended that a revision history be
maintained for DAT files created for a project.
2 Replace the original revision history and modify the file header to indicate the correct
information.
3 As the PIPE_PVLV table already exists and has been populated with data, remove

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

your project database.


This step will eliminate duplication of catalog data.
Your file should now contain the following lines:
C

DELETE_FROM pipe_pvlv "where STNDRD = 'FRD' and type = 'BALL'"


INSERT_INTO pipe_pvlv
.I.

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

Your file should now contain the following data:

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.

Loading the Modified Text File


[student page 4-66]

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

Placing Components to Confirm the Dimensions


.I.

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

To place components to confirm the dimensions


1 From the Start > Programs menu, choose PlantSpace Design Series V8 > Design Series
Modeling and open your design file.
2 Click the Place Valve tool and select Freds Piping Supply for the Standard.
3 Confirm that the values for Size 1, Size 2, Type, End Preparation 1 and 2, Valve
Rating, and Body Material are correct.

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

Key Points in This Section


[student page 4-67]

Paraphrase the key points.

The key points to remember in this section are:


When you edit text files in Design Series, use a text editor, not MS Word.

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

Break Time: 5 to 10 minutes


C

Lab: Adding a New Standard with Catalog Data


.I.

[student page 4-67]


B

State that students have 40 minutes to complete the Lab.

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

[student page 4-68]

If you need some help, here are the steps to follow.


C

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

Your file should contain the following lines:

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

'FRD' indicating ANSI for the end-prep dimensions.


Your file should contain the following data:
DELETE_FROM manufacturers "where MANUFACTURER='FRD' "
C

INSERT_INTO manufacturers
.I.

DATA_BLOCK_BEGIN
"FRD", "ANSI", "#"
B

DATA_BLOCK_END

3 Using an ASCII text editor, open the diatable_fred.dat file.


We will modify this file to indicate to Design Series that the column PIPEDIA_IN
from the table PIPE_DIAMETER is to be used to calculate the outside diameter of
pipe connecting to our valves.
DELETE_FROM diameter_tables "where STNDRD = 'FRD' "
INSERT_INTO diameter_tables

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

Time Needed to Cover Chapter: 3-4 hours

g
Chapter Objectives
[student page 5-71]

State the objectives.


l tin
su
The objectives of this chapter are to:
Explain attribute definitions and attribute definition tables
on

Work with component labels


Add (define) an attribute
Modify an attribute
C

For this chapter, you will be using:


.I.

Training files for the students:


--none (files used are supplied with the software)
B

Training files for the instructor:


--attr_desc_user.dat
--Attrdefn_Tables.ppt
--challenge_attr_desc_user.dat
--challenge_insul.dat
--core_atre_user.dat
--figure_1_elbow.ppt
--figure_2_elbow.ppt
--insul.dat
--pip_atre_user_insul1.dat

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.

Show figure_1_elbow.ppt, then figure_2_elbow.ppt.

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

Explaining Attribute Definitions


C

[student page 5-73]

Configuration of attribute definitions should be done early in the project life cycle.
.I.

Changes to component attribute definitions should be completed before implementing the


Model Control System (MCS) because the Catalog_BUD tables that MCS uses for storage
B

contain columns that correspond to the attributes of every component.

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.

Attribute Definition Tables

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

Break Time: Lunch

Using Different Sets of Attributes for the Same Component


[student page 5-74]

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

ATTRDEFN table for specification-driven components


ATTRCDEF table for catalog-driven components
ATTR_XXn or ATTRC_XXn tables for multiple standards of components

Layers of the Attribute Definition Tables

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

ATTRCDEF table overlays the ATTRDEFN table.


C
.I.

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

Layering of Attributes to Support Engineering Standards

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

OVERLAY_SUFFIX in the STANDARD_DESC table where CODE = the value of STNDRD.

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.

Column Data in the Attribute Definition Tables

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:

I = Ignored, never used by software U = Used

ng
NO = Used, but not modifiable X = Not Used

(catalog driven)

ATTRC_XXn
ATTRDEFN

(catalog driven
ATTRCDEF

ATTR_XXn
(spec driven)

lti (spec driven


standards)

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.

Controlling Options Available in the Placement Mode Field

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.

Warning: The ATTRDEFN table should not be edited directly.


C

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

3 Checking for errors in the attribute definitions.


4 Re-creating the rimref.dat file (the delivered label position file) and building the
storage tables (the <product>_BUD table and DEL_<product>_BUD table).
5 Synchronizing the ams.lib file with your project database.
6 Placing components in the modeling environment to confirm the attributes updates.

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

Levels Used to Define Hierarchical Relationships


[student page 5-98]

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

Then for subclass PIPE.PVLG.REDUCING


on

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

Attributes That Should Not Be Changed

Warning: The following attributes should not be changed, moved, or deleted:

Attribute Name Description Position


COMPTYPE Component type 1-4
DATABASE Discipline or module 66-70
SRC_CODE Source of component 71-76
SEQ_NUMB Sequence number 77-80
BUD_TYPE Bud type 81-92
BUD_ID ID number 93-102
CAE_ID Reserved 103-110
SITE_ID Site ID 111, 112

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.

Description of the Required Fields


[student page 5-80]

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

Column Name Description

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

Column Name Description

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

APP_FLAGS Indicates if this label field should be displayed or copied for a


particular label operation. The allowable flags are:
B = build label
C = copy label
E = edit single label
C

M = edit multiple labels


R = read label
H = do not display the attribute if only one value exists for that
attribute
.I.

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

Break Time: 5-10 minutes

Using the INPUT_METHOD Query


[student page 5-82]

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

In Design Series, the general format of an INPUT_METHOD query is:


QUERY [DISTINCT] table_name[:column_name]
[USING attribute1 [, attribute 2, [, ...]]
C

[WHERE attribute = $attribute [AND attribute2 = $attribute2 [...]]


[other SQL statements]
[ORDER BY attribute]
.I.

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.

The parts of the query statement are explained as follows:

Part of the Query


Explanation
Statement
QUERY Clause The QUERY keyword is a synonym for the SQL keyword SELECT.
Note: This is required.
DISTINCT The DISTINCT keyword is standard SQL. It directs ODBC to retrieve
Keyword only those values that are unique and not to return any value that has
been returned previously.
Note: When both the DISTINCT keyword and the ORDER BY
clause are used, the ORDER BY clause cannot refer to columns that
were not mentioned in the QUERY.
Table_Name The table_name is the name of the table.

PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate

11/24/03 5-101
Working with Component Labels

Part of the Query


Explanation
Statement
Column_Name The [:column_name] portion is optional if the column name of the
specified table is the same as the attribute name of the label definition.
USING Clause The optional USING clause is a synonym for the SQL command:
WHERE attribute1 = 'attribute1_current_value' AND attribute2 =
'attribute2_current_value' AND ...
That is, the SELECT statement is qualified using the named label
attributes and their current values.
WHERE Clause The WHERE clause is standard SQL. It qualifies the query and can be
used alone or with any other valid SQL operation, such as UNION

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

Working with Component Labels


[student page 5-83]
C

Continue to follow along on your computer.


.I.

Re-Creating a Label Position (rimref.dat) File


B

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

To re-create the label position file


1 In the Database Setup window, click the Create Label Position File button.
The Select Label Position File dialog box is displayed.

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.

4 To replace the rimref.dat file, click Yes.


5 Click OK in the message displayed that the new rimref.dat file was successfully
B

created.

Displaying Component Labels


[student page 5-84]

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.

To display a component label


1 Start PlantSpace Design Series and select a drawing file and a project.
2 From the MicroStation menu bar, choose Design Series > Utilities > Label Tool.
The Label Tool dialog box is displayed with the path to the rimref.dat file where the
label data is stored.

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

The entire label is displayed as shown in the example.

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

Mapping Component Attributes to Label Positions


[student page 5-87]

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

4 Click Create Attribute Map.

PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate

11/24/03 5-106
Working with Component Labels

The Create Map File dialog box is displayed.

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

Creating a Summary of Label Utilization


[student page 5-89]

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

To create a summary of label utilization


1 In the Label Tool dialog box, display a component label.
2 Click the Open Rimref Data File button if the rimref.dat file is not already displayed.
3 Select a data file, and click OK.
4 Click the Create Attribute Summary button.
The Create Summary File dialog box is displayed.

ng
lti
su
on

5 Accept the default name lblrpt.txt and click OK.


When the summary is complete, the program writes the output to the selected output
directory. You can open the summary in a text editor, as shown in the example.
C
.I.
B

6 Close the Label Tool dialog box.

PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate

11/24/03 5-108
Key Points in This Section

Key Points in This Section


[student page 5-90]

Paraphrase the key points.

The key points to remember in this section are:


The Database Setup tool creates a label position file or updates an existing one. This is an

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

Adding an Attribute for Schedule Simulations


C

[student page 5-91]

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

SCH_COND Value SCH_COND Description

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

Checklist for Adding an Attribute

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

query from the database or a comparison to a fixed list.


Set the box order to control the position of the attribute in the attributes dialog
box, and make sure that the attribute is not evaluated before any of the other
attributes that it depends on.
C

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.

Remember that the overlay attribute tables ATTRCDEF, ATTR_XXn and


ATTRC_XXn provide different database queries, display order, and display flags
B

for the attributes, but require adding data to multiple tables.


4 Load the attribute definition(s) by loading the new data file using the Database Setup
tool.
5 Make a copy of the current rimref.dat file for converting existing components.
6 Run all Maintenance operations in Database Setup:
Check the attribute definitions.
Build the storage tables, if using MCS.
Create the label position (rimref.dat) file.
Synchronize the ams.lib file so that the new attribute will be a property.
7 Test the attribute inside the product.
8 Run the Label Convert utility on any existing components.

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.

To add the new SCH_COND attribute


1 Create a new file to create and load the table that will list the schedule condition
values.
2 Place this file in the ...\East_River\dbload\data\project\core directory.
The contents of the file are shown as follows:

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.

"0", "New Construction"


"1", "Demolition"
B

"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:

The file core_atre_user.dat contains the finished 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.

DELETE_FROM attrdefn "where ATTR_NAME='SCH_COND' and


USER_FLAGS='USER' "

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.

QUERY DISTINCT "table_name": "column to be queried" "where clause" "order by"

5 Save the file and load it into the database.

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

directory and rename it attr_desc_user.dat.


2 Update the attr_desc_user.dat file to be similar to the following:
.I.

DELETE_FROM attr_desc "where attr_name = 'SCH_COND'"


/* Table: attr_desc
B

set_uniq_index attr_name CHAR 8


desc_table_name CHAR 30
short_name_column CHAR 20
description_column CHAR 20
*/
INSERT_INTO attr_desc
DATA_BLOCK_BEGIN
"SCH_COND", "SCH_COND", "STATUS", "DESCRIPTION"
DATA_BLOCK_END

The instructor file attr_desc_user.dat contains the finished file.

PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate

11/24/03 5-113
Modifying an Existing Attribute, SPOOL_NO

3 Save the file and load it into the database.


4 In the 3D modeling environment, place a pipe component and confirm that the
drop-down list for schedule conditions displays the descriptive text instead of the
numbers 0 (zero) through 4.

Modifying an Existing Attribute, SPOOL_NO


[student page 5-95]

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.

To modify the SPOOL_NO attribute


C

1 Copy the file ...\dbload\data\project\core\english\core_atre_user.dat to the


\dbload\data\project\pipe directory and rename it pip_atre_user.dat.
.I.

2 Add the following line to the top of your pip_atre_user.dat file above the
INSERT_INTO statement:
B

DELETE_FROM attrdefn "where level_1 = 'PIPE' and attr_name =


'SPOOL_NO' "

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

6 Save the file and load it into the database.


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 verify that
SPOOL_NO is displayed with the value 00000000.

g
Key Points in This Section

tin
[student page 5-96]

Paraphrase the key points.

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

Changes to component attribute definitions should be completed before implementing


the Model Control System (MCS) because the Catalog_BUD tables that MCS uses for
storage contain columns that correspond to the attributes of every component.
Within Microstation, the attributes for every Design Series component are stored in a text
C

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

Break Time: 5-10 minutes

Lab: Updating Insulation Attributes


[student page 5-97]

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

Set the value of an attribute based on a query statement


Display or hide attributes in the modeling environment
C

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.

Insulation Type Thickness (inches) Insulation Type Thickness (inches)

CP34 0.75 HC10 1.0


CP10 1.0 HC20 2.0
CP15 1.5 HC30 3.0
ET10 1.0 PP20 2.0
ET20 2.0 PP30 3.0

PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate

11/24/03 5-116
Lab: Updating Insulation Attributes

Insulation Type Thickness (inches) Insulation Type Thickness (inches)

ST10 1.0 NA 0.0


ST20 2.0

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

value does not need to be displayed.)


5 Try modeling some piping components and see that the value for insulation
thickness is not displayed.
C

When students are finished, ask if they have questions or comments.


.I.
B

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]

If you need some help, here are the steps to follow.

To create a new file


1 Create a new file to create and load the lookup table for insulation codes, and place
the file in the ...\dbload\data\project\pipe directory for the East_River Project.
The contents of the file are shown as follows:

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.

insulat NUMBER 3,2 "check (insulat >= 0)" /* insulation


thickness */
TABLE_END
B

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

The file pip_atre_user_insul1.dat contains the finished file.

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.

To modify the existing INSULAT attribute


1 Edit the user-defined attribute definition file again and add the following line:
DELETE_FROM attrdefn "where level_1='PIPE' and attr_name
='INSULAT'"

PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate

11/24/03 5-119
Lab Solution

Explanation: Even though the INSULAT attribute will be redefined to contain


USER in the USER_FLAGS field, we need to include ATTR_NAME in the delete
selection clause because it is an existing attribute. Also, all new and modified pipe
attributes should be loaded through one DAT file. The reason is that we are adding
USER as a USER_FLAG and some DAT files will make use of USER_FLAGS =
USER in the delete selection clause.
2 Copy the INSULAT information from pip_atre.dat and paste it into
pip_atre_user.dat.
3 Revise the attribute INSULAT as shown below:
PIPE,,,,,\

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.

The file pip_atre_user_insul2.dat contains the finished file.


on

5 In the 3D modeling environment, place various types of pipe components and


confirm that the value for insulation thickness is correct.
C

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

To edit the INSULAT attribute so as not to display it in the label

Users should be able to copy INSULAT when copying a pipe component.


1 Revise the attribute INSULAT, as shown below:
PIPE,,,,,\
INSULAT,INCH,,REAL,142,4,,2,\
"Insulation Thickness",16,"0.00",\
"QUERY DISTINCT INSULATION_CODE where insulation_code=$ins_code
order by insulat",\
N,,Y,,,ABEM,USER

2 Save the file and load it into the database again.

PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate

11/24/03 5-120
Lab Solution

The file pip_atre_user_insul3.dat contains the finished file.

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

Include a description to be displayed in the attributes dialog box

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

3 Save the file and load it into the database.


Warning: The word inch must be used because the inch symbol () is used to
enclose string fields to be loaded into the database. As an alternative, two single
.I.

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

software. This data is for information to the user only.

The instructors file, challenge_insul.dat, contains the finished file.

4 Update the ...\dbload\data\project\core\attr_desc_user.dat file to include the


following line within the data block.
"INS_CODE", "INSULATION_CODE", "INSULATION_CODE", "DESCRIPTION"

5 Save the file and load it into the database.

The instructors file, challenge_attr_desc_user.dat, contains the finished file.

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]

State the objectives.


on

The objectives of this chapter are to:


C

Describe basic object concepts as they relate to Design Series


Create and use JSpace classes and class libraries
Work with properties
.I.

Write basic JSpace expressions


B

For this chapter, you will be using:

Training files for the students:


--06pipe.dgn
--06ChallengeLab.jsm

Training files for the instructor:


--creating_jsm.ppt (slides)
--06ChallengeLab.jsm
--06my_library_final.lib

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

Defining Basic Terminology


C

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

In an object-oriented environment, any item, such as a piping component, schedule


activity, or purchase order line item, can be represented by an object. An object can
represent both tangible and intangible items.

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

Use an example of a recipe for making cookies. The recipe = a class.

Instance

An instance of an object is an object that is created by using a predefined class.


When an object is instanced, the class definition determines the characteristics of
that object.

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

Object-oriented technology provides a means for storing and relating information in


a manner that differs from traditional relational databases. However, we can make
comparisons to a relational database that help our understanding of object-oriented
technology.
C

A relational database typically consists of a collection of tables:


.I.
B

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:

Database Object-Oriented Environment


on

Table Class
Column Property
Record Instance of an object
C

(row)
.I.
B

Label the object-oriented equivalents (class, records, properties) on your drawing.

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

When a record is added to a database, it is added to a table suitable to that record.


C

Similarly, when an object is instanced, a class defined for that classification of object
is used.
.I.

When we create an instance of a class, the class definition is used as a template to


define the instanced objects attributes. For example, if we create an instance of
class Customer, the object instanced looks like the following:
B

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.

Relationship Purchase Order


Customer
PO Number

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

Consider the following example:


Parent

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 A is a parent of Class B


Class B is a child of Class A

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 using the principles of parent-child hierarchy, we can simplify the process of


defining our data model and more easily make changes to the data model. For
example, we may want to add a new property called Rating to all piping
components.
C
.I.
B

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.

Inheritance applies to properties and other features defined in a class such as


relationships.

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

parents, Gate Valve and Nuclear Component.

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.

Let's summarize what we know about objects so far.

Break Time: 5 to 10 minutes

PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate

11/24/03 6-133
Key Points in This Section

Applying Object-Oriented Concepts to JSpace


[student page 6-111]

The object-oriented concepts discussed in the previous section also apply to


JSpace. JSpace enables you to fully control class definitions of objects and their
behaviors. You can modify the existing object classes and add new classes to
extend the behavior of the applications.

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

Briefly describe class libraries and JSM files.


.I.

Key Points in This Section


B

[student page 6-112]

Paraphrase the key points.

The key points to remember in this section are:


In an object-oriented environment, any item can be represented by an object.
An object can represent both tangible and intangible items.
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-134
Creating a JSpace Class, Properties, and Relationships

An instance of an object is an object that is created by using a predefined class.


When an object is instanced, the class definition determines the characteristics
of that object.
Inheritance enables you to define a parent-child hierarchy so that the features
of a parent class are passed to a child of that class.
JSpace, the object-oriented technology used to develop Design Series, enables
you to fully control class definitions of objects and their behaviors.
A unique feature of JSpace is that the object class definitions are maintained in
class libraries that are external to the application software.

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

because this part of the lesson builds on a later lesson.

The process of working with classes involves the following stages:


C

1 Creating a class library


2 Adding a class to the class library
.I.

3 Defining object properties


B

Mention this process.

Creating the Class Library and Adding a Class

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

To create a JSpace class library


1 Open the JSpace Class Editor in the PlantSpace Design Series V8 program
group.
2 From the JSpace Class Editor menu bar, choose File > New.

ng
lti
su
on

3 Type the class library name, my_library, and click Open.


The *.lib extension will be added.
A new class library is created in the directory chosen.
C
.I.
B

PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate

11/24/03 6-136
Creating a JSpace Class, Properties, and Relationships

To add a class to a class library


1 From the Class Browser dialog box, click Add.

The Add Class dialog box opens.

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

Can contain any character except the following:


~`!&*()-+=[]|\;"',.<>?/
In the Enter Class Name field, type PIPING and click OK.
C

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

You have just created a JSpace class.

Break Time: 5 to 10 minutes

Adding Object Properties

ng
[student page 6-115]

A property is a characteristic of an object. Each class can have one or more


properties. The property definition includes the following:

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

The daemon expressions that execute automatically when a property value is


assigned or changed
C

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

2 In the Class Editor-PIPING dialog box, click Add.

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.

A property name has the following characteristics:


Can be any length
Must begin with a letter
Cannot contain blank spaces

PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate

11/24/03 6-139
Creating a JSpace Class, Properties, and Relationships

Mention: You can replace blank spaces with an underscore (_).

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>

Tell students to leave the default selections in the check boxes.

Explain what the Value Constraint Expression can be used for.

Value Constraint Expression Field


A Value Constraint Expression field contains a Boolean expression that restricts the value
that can be assigned to a property. After a value for the property is determined, this expres-
sion is evaluated as follows:

--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.

The Value Constraint Expression field is optional.

g
Explain each of the settings:

Include with Object

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.

Constraint Override (by default, not selected)


If selected, this option enables the user to override a constraint violation (for example, the
B

expression in the Value Constraint Expression field).

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.

Property Inheritance Priority Field


The Property Inheritance Priority value enables you to resolve inheritance conflicts. When a
class is defined from multiple parent classes, it inherits all properties of the parent classes. In
the case of a conflict when duplicate property names are inherited from more than one parent
class, the property from the parent class with the highest value for the property inheritance

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.

Value Inheritance Priority Field


The Value Inheritance Priority value enables you to resolve inheritance conflicts. When a
class is defined from multiple parent classes, it inherits all properties of the parent classes. In
the case of a conflict when duplicate property names are inherited from more than one parent
class, the value from the object with the highest value inheritance priority for that property is

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

Daemon Radio Button


When you select the Daemon radio button, the daemons are displayed in the list box. Dae-
mons are JSpace expressions that are executed when certain events occur, such as when
.I.

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

Adding a Property Source


[student page 6-117]
C

When an object is instanced, JSpace evaluates a list of sources to determine a value


for each property. Each source is evaluated in order until a value is determined.
When a value for the property is determined, the succeeding sources are not
.I.

evaluated. If none of the sources evaluate to a valid value, a value is not assigned
to the property.
B

The order of the value sources is very important.

The types of sources used in Design Series are:


Fixed source
Prompt source
Inference source

The inheritance source is not used in Design Series.

Explain the four types of sources:


1) A fixed source, when evaluated, obtains a value for the property by evaluating a JSpace

PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate

11/24/03 6-143
Creating a JSpace Class, Properties, and Relationships

expression when the object is created.


2) A prompt source, when evaluated, prompts the user to supply a value for the property
when an object is created.
3) An inference source, when evaluated, infers a value for a property from a set of rules.
4) An inheritance source can be used only for a sub-object that is created automatically when
its parent object is created. When evaluated, the value is inherited from a parent object with
the same property name. This type of source is not used in Design Series because Design
Series does not create sub-objects automatically.

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

2 Click Add a Fixed Source.

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.

Leave the Property Editor dialog box open.


on

Explain what the Input Property List is.


The Input Property List is a global table of properties and their values and is maintained while
C

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

To add a prompt source property


1 Continuing in the Property Editor dialog box, click the Add a Prompt Source
button (the red question mark).
2 In the Allowable Value Expressions list box, click Add an Expression (the
blue dot).
3 Select the Must use a value from the list check box, and then add the
following value expressions with quotation marks ( '' ):
''CS150''
''CS300''
''SS150''
4 Click OK in the Prompt Source Editor dialog box.

PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate

11/24/03 6-145
Creating a JSpace Class, Properties, and Relationships

5 Click Apply in the Property Editor dialog box.


6 Starting at the Class Editor - Piping dialog box, add two more properties:
LINENO, with the following values:
Data Type: Long and Array Length: 1
The same fixed source (Input Property List)
A prompt source with no value expressions
SYSTEM with the following values:
Data Type: String and Array Length: 1

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

To add a prompt source property using a JSpace expression that queries


a database table
1 Continuing in the Class Editor-PIPING dialog box, click the Add button.
2 In the Property Editor dialog box, select or type the following:
Name: SIZE
Data Type: Double
Array Length: 1

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

Key Points in this Section


[student page 6-121]
C

Paraphrase the key points.


.I.

The key points in this section are:


B

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.

Break Time: 5 to 10 minutes

PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate

11/24/03 6-147
Working with JSM Files and Objects

Working with JSM Files and Objects


[student page 6-121]

Continue to follow along on your computer.

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

Mention this process.

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

In the following exercise, you will create a new JSM file.

To create a JSM File


1 From the Class Editor menu bar, choose File > New.

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.

3 In the File Name field, type my_file and click Open.


You do not have to enter the JSM file extension. If an extension is not
entered, the JSM file extension is automatically added to the file name.
An Object Browser dialog box is displayed showing your new file.

g
l tin
su
on
C
.I.

Using the Object Browser


B

[student page 6-122]

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

Class Class of the object

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

you instance will be stored in this file.

Instancing Objects
C

[student page 6-123]


.I.

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

It is uncommon that an application uses a prompt source for a property. Later


exercises will show how these property values are more commonly assigned.
.I.

Displaying NULL Values


B

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.

An easy way to define a new class is to make it a child of an existing class.

The parent-child relationship between classes does not imply a parent-child


relationship between objects created from these classes.

In the following exercise, we will step through the process of adding PIPING as a

ng
parent to a new class, VALVE.

To create a new class


In the Class Browser dialog box in my_library.lib, click Add.

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

To add a parent to the class


1 In the Class Browser dialog box, select the class VALVE and then click Edit.
2 In the Class Editor dialog box, change the List Of drop-down list box from
C

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

The Add Parents dialog box is displayed.

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.

6 In the Add Parents list box, click Apply.


You have now added PIPING as a parent of VALVE.
B

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

State: In this example, we will add a property to the class VALVE.

To add a prompt source property to the class VALVE


1 In the Class Editor--VALVE dialog box, click Add.
2 In the Property Editor dialog box, type or select the following:
Name: TYPE
Data Type: String

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

5 Click OK in the Prompt Source Editor dialog box.


6 Click Apply in the Property Editor dialog box.
C

Point out that the Origin class for the TYPE property is VALVE.
.I.

7 In the Class Editor -- Valve dialog box, click Close.

To verify the effect of adding the parent by creating an instance of the


B

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

In the Enter TYPE field, select GATE and click OK.

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.

Modifying a Parent Class

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

age is not broken.


.I.

Tip: The Localize operation enables you to quickly copy properties from one class to another.
B

Using an Inference Source Property


[student page 6-127]

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.

Formatting Inference Rules

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

>= Is greater than or equal to


< Is less than
<= Is less than or equal to

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

AND If both sides are TRUE, then the expression is true


OR If either side is TRUE, the expression is true

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.

To add a source property that uses an inference rule


C

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.

Break Time: 5 to 10 minutes


B

Using JSpace Expressions to Format a Pipeline Callout


[student page 6-130]

Continue to follow along on your computer.

Writing JSpace Expressions

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

expression can be a single basic item, such as a constant or variable, or a


combination of basic items with one or more operators.

Building Blocks of a JSpace Expression

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, ==, !=, <, <=, >, >=, =)

Examples of JSpace Expressions

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

VLV_CALLOUT = VLV_ID + VLV_NO + VLV_SUFFIX


.I.

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

vlv_id vlv_no vlv_suffix result = vlv_callout

V 003 V003
PV 123 A PV123A
PSV 01 B PSV01B

The term concatenation is used to describe the process of adding strings


indicated by the plus (+) sign.

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

To add a fixed source property that uses a JSpace expression


1 In the Class Browser, select PIPING and then click Edit.
2 In the Class Editor - PIPING dialog box, click Add.
3 In the Property Editor dialog box, type or select the following:
Name: PIPELINE_CALLOUT
Data Type: String
Array length: 1
Click the Add a Fixed Source button.

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.

9 Click OK until you return to the Property Editor dialog box.


10 Click Apply.
B

11 Click Close in the Class Editor - PIPING dialog box.

Point out the new entry PIPELINE_CALLOUT in the properties dialog box.

To check the results of the JSpace expression


1 In the Class Browser dialog box, select the class PIPING and click Instance.
2 Type or select the following values:
SPEC: CS150
LINENO: 2
SYSTEM: aa

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

and copy it.


4 Click Cancel and then Close.
5 Go back into the Object Browser dialog box of the JSM file, highlight the
C

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

11 Close the Expression Results dialog box.

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

Point out that our result has two problems:


1. The system is in lower case letters (aa should be AA).
2. The line number is not zero padded (L2 should be L002).

To use built-in functions


1 Click the Build button to return to the Expression Editor.

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.

-- Built-in functions return a value of a particular data type.


C

-- 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])

The square brackets [ ] represent optional arguments.

-- 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

The description of the TOUPPER function is in the Built-in Functions


appendix.
For your convenience, Appendix B in this course guide contains a copy
of the TOUPPER function.

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.

Lab: Using JSpace Expressions to Format a Pipeline Callout


B

[student page 6-133]

Tell the students that they have 15 minutes to do this Lab.

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.

3 Update the JSpace expression in the PIPELINE_CALLOUT property of the


on

PIPING class to incorporate a call to the function just identified.


4 Instance a PIPING object with LINENO=2 and verify that the
PIPELINE_CALLOUT contains L002 for the line number.
C

Lab Solution
.I.

[student page 6-134]


B

If you need some help, here are the steps to follow.

The solution to this Lab could use either PADTEXT( ) or FORMAT_INTEGER( ) so you
should be ready to discuss both functions.

1 Open my_library.lib and my_file.jsm in the JSpace Class Editor.


2 In the Class Browser dialog box, double-click the PIPING class.
3 Double-click PIPELINE_CALLOUT to edit it.
4 Double-click the expression to open the Fixed Source Expression Editor
dialog box.
5 Double-click the blue dot to open the Expression Editor dialog box.

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

6 Refer to Appendix B, JSpace Built-In Functions to see the syntax and


description of the FORMAT_INTEGER function.
7 Update your expression to include a call to the FORMAT_INTEGER function
as shown:
TOUPPER(SYSTEM)+"-"+SPEC+"-L"+FORMAT_INTEGER("03",LINENO)+"-"+ SIZE

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

Challenge Lab: Identifying the Pipe Size in Fractions


C

[student page 6-135]

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.

Each of the objects in 06ChallengeLab.jsm contain the desired results in the


on

PIPELINE_CALLOUT property. The objects also have descriptive names to make testing of
the JSpace expressions easier.
C

Challenge Lab Solution


.I.

[student page 6-135]


B

If you need some help, here is the step to follow.

Your final expression should be similar to the following:


SYSTEM+"-"+SPEC+"-L"+FORMAT_INTEGER("03",LINENO)+"-"+ IIF (SYSTEM == "AI",
TO_FRAC(SIZE,4), SIZE) + "\""

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

Design Series Class Libraries, Ams.lib and Ams_user.lib


[student page 6-136]

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.

Inheritance from multiple parent classes is a feature of JSpace technology, the


object-oriented technology used to develop Design Series software. All of the

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

PIPE_PELB_USER class in ams_user.lib.


C
.I.
B

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

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:

Piping Object Corresponding Temporary

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.

Break Time: Lunch

PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate

11/24/03 6-168
Creating a JSM File from a DGN

Creating a JSM File from a DGN


[student page 6-138]

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.

3 Click the Read Label tool and select the pipe.


This is an easy way to see what values are assigned to each attribute. The
B

default rimref.dat file from PS_PROJ is used.


4 Create an object model (JSM) file by choosing Design Series > Object Tools >
Create Object Model.
5 Click the Extract button in the JSpace MicroStation Connection dialog box.
6 Open 06pipe.jsm in the JSpace Class Editor and double-click PIPE_PIPE.
You see:
SYSTEM = STH
LINENO = 3
SIZE_1 = 6.0

PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate

11/24/03 6-169
Creating a JSM File from a DGN

To understand how this happened, refer to the following diagrams:

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.

Describe the process as follows.

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

7 In the JSpace Class Editor, open ams.lib in the ...\East_River\etc directory,


and edit the PIPE_PELB class.
8 Edit the SIZE_1 and LINENO properties and notice that their values are set
directly from the Input Property List.
9 Edit the COMP_DESC property and see the following value sources:
A = "ELBOW,"+B_ANGLE+"DEG.,"+ZZ_B_RADIUS_DESC+"RAD.,"+ZZ_CONN1_DESC
A = "ERROR IN COMP_DESC"
B_ANGLE __(from JSM file)
ZZ_B_RADIUS_DESC _____ Where do these values come from?
Look at ams.lib.
ZZ_CONN1_DESC ___________

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)

Look in the database table and get LONG for ZZ_B_RADIUS_DESC.

=====================================================
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.

B_ANGLE 90 (from JSM file)

ZZ_B_RADIUS_DESC LONG Where do these values come from?


Look at ams.lib.
B

ZZ_CONN1_DESC BUTTWELD

================================================================

To get LONG from ams.lib:

ZZ_B_RADIUS_DESC

DB_QUERY(-,"SELECT Description FROM B_RADIUS_DESC WHERE code="B_RADIUS+"


' ")

B_RADIUS L (from JSM file)

PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate

11/24/03 6-172
Key Points in This Section

Look in the database table and get LONG for ZZ_B_RADIUS_DESC.

===============================================================

ZZ_CONN1_DESC

DB_QUERY(-,"SELECT Description FROM CONN1_DESC WHERE code=' "EPREP1+" ' ")

EPREP1 BW (from JSM file)

Look in the database table and get BUTTWELD for ZZ_CONN1_DESC.

g
==============================================================

tin
Now you have all the necessary values to figure out COMP_DESC resulting in:

ELBOW, 90 DEG., LONG RAD., BUTTWELD

l
su
Key Points in This Section
on

[student page 6-141]


C

Paraphrase the key points.


.I.

The key points to remember in this section are:


The Design Series class library used to create objects from the Design Series 3D
B

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.

This section contains no Lab.

Break Time: 5 to 10 minutes

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

Time Needed to Cover Chapter: 3 hours

g
Chapter Objectives
[student page 7-143]

State the objectives.


l tin
su
The objectives of this chapter are to:
Set up a project specification file
on

Work with specifications and guidelines


Work with component types and criteria
Work with branch tables
C

Create reports
.I.

For this chapter, you will be using:


B

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

Specifications and component types (second-level)


Associated specifications and component types (third-level)
Guidelines (fourth-level)
C

Criteria (fifth level)

Guidelines on Spec Maker Objects


.I.

[student page 7-144]


B

A specification file can have only one project object.


Several specification and component type objects can be under the project
object.
Guideline objects are related to a particular specification and component type
pair.
Criteria objects store the constraint values for a specific guideline.

Structure of a Project Specification File

A Spec Maker specification file (*.s71) contains specifications, component types,


guidelines, and criteria. The installation process places the following two files in the
\SpecMakr subdirectory of your project-specific directory.

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

and spec view.


C
.I.
B

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.

Within the project specification file are individual specifications arranged by


specification name. The following graphic shows an example of specification

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.

[student page 7-146]


B

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

A guideline is a rule representing the constraints or limitations on a component


type. The specification guidelines determine which specific component types are
valid for a Design Series model. When you select a guideline, such as GL1, the

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

project windows, 4) displaying dimensions in metric and imperial units)


C

Break Time: 5 to 10 minutes


.I.

Setting Up a Project Specification File with Specifications


B

[student page 7-147]

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.

Creating a New Spec File

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.

Efficient Use of Seed Files

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.

To create a new specification file

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

3 Click the Browse button and select ...\East_River\custom.


4 In the Based on Existing Spec Maker File field, click the Browse button and
select ...\East_River\SpecMakr\compdefn.s71.
C

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.

Creating a New Spec


C
.I.

Mention: Now that you have set up your specification file, you can create new specs.
B

To create a new spec


1 In East_River.s71, display the spec view of the tree pane and select Project.
2 Right-click Project, and select Create New Specification from the pop-up
menu.
The Create New Specification dialog box is displayed.
The length of the name of a specification depends on the length
specified in the ATTRDEFN table of the project database. You can
change the length to allow for spec names that are longer than 8
characters.
3 Type CB31 for the new spec and click OK.
A message is displayed confirming the new spec name.
4 Click OK.

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

5 To display the detailed view of the specs, select Project again.

Specifications have two states:


-- Approved, indicating that a spec is ready for production use
-- In Development, indicating that a spec is not ready for production use

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

Associating Component Types with a Spec

Guidelines can be created only after associating one or more component types with
.I.

a spec.

To associate component types with a spec


B

1 Display the spec view and select CB31.

Demonstrate to refresh memory in case someone is lost.

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.

Warning: Valve guidelines must be synchronized before valve operator guideline


on

values can be added.


4 Click OK.
C

Working with Guidelines


.I.

[student page 7-149]


B

Working with guidelines involves the operations of adding, editing, deleting,


copying, moving, synchronizing, and unsynchronizing guidelines. For this exercise,
we will add, edit and synchronize guidelines.

Adding a New Guideline

A guideline contains a predefined set of criteria.

To add a new guideline


1 Display the spec view and select CB31.
2 Right-click Pipes in the tree pane, and select Create New Guideline.
The Add New Guideline dialog box is displayed. Spec Maker creates a
default guideline name and number based on the guideline count,
specification name, and component type name.

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.

Editing Guideline Values


[student page 7-150]

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

Backspace Clears the selected value in a choice list


.I.

Delete Clears the selected value in a choice list


Enter Accepts the selected value in a choice list
B

Esc Cancels any changes made in the edit window

4 Click anywhere outside the edit window to accept the change.

PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate

11/24/03 7-185
Working with Guidelines

5 Define the rest of the data as shown.

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

Copying and Moving Guidelines


[student page 7-151]
C

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.

Guidelines can be copied and pasted:


Within the same component type associated with the same spec
To another component type associated with the same spec
To another component type associated with a different spec
To another component type associated with a spec in another project file

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

5 Click anywhere outside the edit window to accept the change.

To modify guideline values


1 In the tree pane, click Pipe: 2.5 thru 12.0.
C

The information is displayed vertically in the list pane.


2 Update the following values:
.I.

Size 1 > 2.5


Minimum
B

Size 1 < 12.0


Maximum
Schedule = 40

The Long Description value automatically updates to reflect the new


schedule value.

Synchronizing and Unsynchronizing Guidelines


[student page 7-152]

Synchronizing a guideline refers to the process of searching a catalog table inside


the PlantSpace database for items that satisfy the guideline criteria and placing
these items into a spec table.

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.

An icon in front of a guideline in a list pane means the following:

ng
Indicates an unsynchronized guideline

Indicates a modified 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

You can look at the table PIPE_PIPE_SPEC in East_River.mdb, in Access to


verify the synchronization process.
.I.

Key Points in This Section


B

[student page 7-153]

Paraphrase the key points.

The key points to remember in this section are:


Spec Maker stores its data in s71 files. Their file formats are actually JSpace
model (JSM) files. Because Spec Maker data files are JSpace model files, Spec
Maker data consists of JSpace objects.

PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate

11/24/03 7-188
Lab: Defining Guidelines for Other Component Types

A guideline is a rule representing the constraints or limitations of a component


type. The specification guidelines determine which specific component types
are valid for a Design Series model.
The specification criteria (displayed only in the list pane) are the data
(dimensions or values) required for a particular guideline.
You can create a new guideline only after you associate a spec with a
component type.
Synchronizing a guideline refers to the process of searching a catalog table
inside the PlantSpace database for items that satisfy the guideline criteria and
placing these items into a spec table.

g
Unsynchronizing a guideline refers to the process of removing all spec table

tin
entries relevant to that particular guideline.

Break Time: 5 to 10 minutes

l
su
Lab: Defining Guidelines for Other Component Types
on

[student page 7-153]


C

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.

The file East_River_Lab1.s71 contains the finished lab results.

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

[student page 7-154]

To create new guidelines


C

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

types listed below:

Component Type Guideline Name

Elbows Elbows: 2.5 thru 12.0


Unions Unions: 0.5 thru 2.0
Reducers Reducers: 2.5 thru 12.0
Caps Caps: 0.5 thru 2.0
Caps Caps: 2.5 thru 12.0
Flanges Socket weld Flanges: 0.5 thru 2.0
Flanges Weld neck Flanges: 2.5 thru 12.0
Flanges Slip-on Flanges: 2.5 thru 12.0

PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate

11/24/03 7-190
Lab Solution

Gaskets Gaskets: 0.5 thru 12.0


Valves THRD Gate Valves: 0.5 thru 2.0
Valves THRD Globe Valves: 0.5 thru 2.0
Valves THRD Ball Valves: 0.5 thru 2.0
Valves BW Gate Valves: 2.5 thru 12.0
Valves FL Gate Valves: 2.5 thru 12.0
Valves BW Globe Valves: 2.5 thru 12.0
Note: Valve guidelines must be

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

5 Define the rest of the data as listed below:

Criteria Data
.I.

Short Description = ELBOW


B

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

Bend Angle (45.0; 90.0)


Material Standard = ASTM
Material Code A105
Material Grade
Schedule 80
Long Description ASTM-A105
Long Description 2 Forged

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

Adding a Criterion to the Elbow Component Type


[student page 7-156]
C

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 type to define a stock code value.


B

Types of Criteria for a Component Type

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

Catalog Table Field

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.

Database Table Field

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

field. For example, a common database table lookup operation pertains to


converting imperial sizes to metric sizes. For example, the lookup input field in the
catalog table that you may want to convert is SIZE_1. The database table containing
this conversion information is the PIPE_DIAMETER table. The lookup link field in
C

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

A JSpace expression criterion enables you to create guidelines based on value


resulting from a JSpace expression. For example, Long Description 1 is a JSpace
Expression criterion that is applicable to most component types. This description
text is usually a concatenation of various properties of the guideline data.

Spec Maker uses two new JSpace functions:


CRITERIA_VALUE (criteria_name)
where criteria_name is a string enclosed in quotation marks. This function
takes the specified value of the guideline criteria that have the same name
as criteria_name.
The variable criteria_name is case sensitive. It must be identical in
upper and lower case letters to the criteria name you created.
DB_ROW_VALUE (criteria_name)

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

where criteria_name is a string enclosed in quotation marks. This function


takes the database field value of the specification table row that has the
same name as criteria_name.
The variable criteria_name is case sensitive. It must be identical in
upper and lower case letters to the criteria name you created.

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]

We will create a criterion by using a JSpace expression.


su
The file East_River_Lab2.s71 contains the new stock code criterion.
on

To create a criterion using a JSpace expression


1 Right-click Project in the tree pane, and select View as Project Component
Types.
C

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.

4 Type Stock Code as the criterion name.


5 Select Jspace Expression as the type of criterion.
B

6 Type the following Jspace expression exactly as shown:


DB_ROW_VALUE ("Bend Angle") + "E" + DB_ROW_VALUE ("Size 1 Minimum")
+ "-" + CRITERIA_VALUE ("End Preparation 1")

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

To define values for the new criterion


1 Right-click Project in the tree pane and select View as Project Specifications.
2 In the tree pane, expand CB31 and then expand Elbows.
3 Click the guideline Elbows: 0.5 thru 2.0.
The guideline information is displayed vertically in the list pane.
4 In the list pane by the Size 1 Minimum criterion, double-click the cell under
Data.
5 Click the down arrow and re-select 0.5.

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

[student page 7-159]


C

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

range for this valve.


2 Click the View as Project Component Types button from the top menu bar.
3 Select the Valve component type and then click the View Component
C

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

6 Switch to Spec Mode by clicking the View as Project Specifications button


from the top menu bar.
7 Modify the criteria for Size 1 Maximum so that the selection displays
available sizes.
The selection list now displays values up to 24 for an ANSI B16.10 400#
BW Gate Valve. An ANSI B16.10 150# Gate Valve (Butt Welded or
Flanged) has sizes up to 36 loaded in PIPE_PVLV. If the selection for
size range is above Valve Rating and End Preps, all available sizes will
be listed for ASNI B16.10 valves regardless of Rating or End Prep.

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.

To use catalogs and user input as a component type


C

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

Data Only guideline group by selecting Size 1 Maximum.


Sizes to 2 are no longer valid.
4 Select 1.25.
5 Resynchronize the lever guideline and review the results in Design Series.
The 1.5 and 2 Freds Ball valves can be selected in the Component
Placement dialog box because these sizes have been synchronized to
the valve spec table (PIPE_PVLV_SPEC). However, because there are
no matching operator data records for these sizes, the OK button is
grayed out and the valve cannot be placed. 0.5 thru 1.25 valves can
be placed because there are valve and operator guidelines synchronized
for these size ranges.
6 Unsynchronize the lever guideline from the Valves Operators Catalog Data
Only guideline group.

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

Using the View Component Criteria tool as described in the previous


exercise, look at the component criteria for each of the Valves Operators
component types. Notice the difference between the source tables for
Operator Type and Size 1 Minimum / Maximum criteria.
C
.I.
B

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

(PIPE_PVLV_SPEC table). Values from Operator, Size 1 Minimum, and Size


1 Maximum are selected from the operator catalogs (PIPE_PVOP table).

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

PlantSpace Design Series Reference Guide for Administrators delivered with


your software.
10 Switch to Spec Mode, synchronize the guideline, and test the results in a
.I.

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.

Key Points in This Section


[student page 7-163]

Paraphrase the key points.

The key points to remember in this section are:

PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate

11/24/03 7-199
Working with Branch Tables

Component types can have five types of criteria:


-- Catalog table field
-- Database table field
-- Database table lookup
-- JSpace expression
-- Text input
The specification criteria (displayed only in the list pane) are the data
(dimensions or values) required for a particular guideline.

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

[student page 7-163]

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

Beginning with a Task on Paper

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

Working with branch tables involves the following operations:


Creating a branch table for a spec
Selecting displayed pipe diameters for a branch table
Creating a new branch type set
Adding guidelines to the branch table and synchronizing them

Creating a Branch Table for a Spec


[student page 7-164]

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

To create a new branch table


1 Display the spec view and select spec CB31 (which you created in an earlier
lesson).
2 Right-click CB31 and select Branch Table > Show.
The Branch Table dialog box for the selected spec is displayed.

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 Options dialog box is displayed.


C
.I.
B

2 Click the Displayed Pipe Diameters tab.

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

The selected pipe diameters are displayed.


C
.I.
B

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

Creating a New Branch Type Set


[student page 7-167]

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

The Create New Branch Types Set dialog box is displayed.

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

7 Select the color red and click OK.


The color is displayed in the Create New Branch Types Set dialog box.
8 Click OK to accept the changes.
The selection set is displayed in red in the graph.
9 Using Branch Table A on page A-308, add branch type sets for:
Stub-ins by typing Stub-in as the label name, selecting Unreinforced
Branch for the active component type, and selecting the color yellow.
Weldolet by typing WOL as the label name, selecting Weldolet for the
active component type, and selecting the color green.

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

11 Click OK and close the Branch Table dialog box.

Continue to the next exercise to add guidelines.


C

Adding Guidelines to the Branch Table and Synchronizing


.I.

[student page 7-169]

Your next task is to add guidelines for the new Branch Table. You will add four
B

guidelines. They must then be synchronized with the PlantSpace database.

To add guidelines to the branch table and synchronize them


1 With CB31 selected in the tree pane, right-click Branch Table and select
Create New Guideline.

2 Accept the default name and click OK.

PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate

11/24/03 7-206
Working with Branch Tables

3 Select GL 1: CB31 Branch Table in the tree pane.


4 Fill in the values shown in the Data field for each criterion.

g
l tin
su
Start at the top and work your way down. This a hierarchical system. The
on

selection for each criterion depends on the previous criteria above.


5 Right-click Branch Table again in the tree pane and select Create New
Guideline again.
C

6 Accept the default name for guideline 2 and click OK.


7 Select GL 2: CB31 Branch Table in the tree pane.
.I.
B

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

shown in the Data field for each criterion.


C
.I.
B

Continue to the next exercise to synchronize the new guidelines.

PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate

11/24/03 7-209
Key Points in This Section

To synchronize the new Branch Table guidelines


1 Select Branch Table in the tree pane to display the five new guidelines in
the list pane.

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

in the tree pane and select Synchronize Guideline Group.


3 At the confirmation message displayed, click Yes to All.
.I.

The synchronized guidelines are displayed with check marks.


B

Key Points in This Section


[student page 7-173]

Paraphrase the key points.

The key points to remember in this section are:


Branch tables specify which branch types are valid for a particular combination
of main pipe diameters and branch pipe diameters.
Spec Maker enables you to define a branch table for each spec.

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.

This section contains no Lab.

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

Time Needed to Cover Chapter: 45 minutes

g
Chapter Objectives
[student page 8-175]

State the objectives.


l tin
su
The objectives of this chapter are to:
Set up an ODBC data source for an Access database
on

Define report fields using JSpace expressions

For this chapter, you will be using:


C

Training files for the students:


--elbows.jsm
.I.

--procurement.mdb (for use in Microsoft Office 2000)


--valves.jsm
B

Training files for the instructor:


--elbows.dgn
--elbows.jsm
--PCI.dbf
--procurement.mdb (for use in Microsoft Office 2000)
--stock_code.txt -----> Important: This file is provided in case students do not have Microsoft
Office 2000 loaded. They can import this text file into the version of Microsoft Access that
they are using. They need to call the database file procurement.mdb. The table should be
called STOCK_CODE. The columns should be called SIZE_1, STANDARD, STOCK_CODE,
and COST.
--valves.dgn

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

Processing Report Data on Specific Areas of a Model


.I.

Demo by drawing a pipe and showing an area.


B

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.

The Object Reporter re-evaluates the CLIP_LENGTH property to represent the


length of an object that is inside the selected area(s). The clipped length is
calculated only for objects that:
Have two snap points.

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.

Customizing Object Reporter


l
su
Create a Report Listing Valves and Their Cost
on

[student page 8-176]

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.

To create this report you will do the following:


B

Create an ODBC data source that points to the procurement database


Define a report in Object Reporter

Create ODBC Data Source for a Procurement Database

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.

To set up the procurement database and ODBC data source


1 Create a directory called procurement (for example, D:\procurement) and
place the procurement.mdb file there.
2 Create an ODBC data source called Procurement that points to the
Microsoft Access database called procurement.mdb.

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.

Defining a Report in Object Reporter

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:

VALVE TYPE VALVE SIZE VALVE STANDARD COST JSM FILE


su
To define the valve price list report
1 On the Windows Start > Programs menu, locate the PlantSpace Design
on

Series V8 program group and select the Object Reporter icon.


If you have two or more PCF files in the location pointed to by the
MicroStation configuration variable, _USTN_PROJECT, the Select Project
C

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

group at the top of the dialog box.


The Define Report Filter dialog box is displayed.
C
.I.
B

4 Type the report name, Valve_Price_List.


5 At the File Name Base field, type the acronym VPL.
This name becomes part of the full default report file name (as defined at
the bottom of the Object Reporter window).
6 Type the following JSpace expression in the text box:

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")

The expression must be a valid JSpace expression that evaluates to


TRUE for the objects that you want to include in the report.
7 Click OK.
The new report is listed in the Reports list box. If you select it, the fields of the
report are displayed in the fields list box.

The instructors file, VPL.dbf, contains the finished report.

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.

To define the fields of the Valve_Price_List report


on

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

Field name VALVE TYPE and the JSpace expression,


VLV_TYPE
.I.

Field name VALVE SIZE and the JSpace expression,


SIZE_1
B

Field name VALVE STD and the JSpace expression,


STNDRD

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

The Define Report Field dialog box is displayed.

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

SQL statement to test:


.I.

Select COST from STOCK_CODE where SIZE_1 = 4 and STANDARD = 'ANSI' the result
should be 10.25
B

5 Click OK after you add the expression.

JSM File Names

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.

To add the JSM FILE field

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

Key Points in This Chapter


[student page 8-181]

Paraphrase the key points.

The key points to remember in this chapter are:


The Object Reporter creates reports in dBASE format that you can customize by
defining fields and filters.

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

Define JSpace expressions to obtain values for report fields


Access properties of related objects within a JSpace expression

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.

The call-outs should not include insulation values.

Example: If we have a pipe with the following information:

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

The call-out should be STH-L012-CB31-2.5".

The following example is a report:

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

l WELD, 150# CLASS


su
V_GLOB VALVE, GLOBE, BUTT STH-L005-CB31-12" C:\dgn\file2.dgn
WELD, 150# CLASS
on

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

The instructors file, PCI.dbf, contains the finished report.

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.

When students are finished, ask if they have questions or comments.

PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate

11/24/03 8-223
Lab Solution

Break Time: End of Day 3

Lab Solution
[student page 8-183]

If you need some help, here are the steps to follow.

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.

To define the fields of the Pipe Component Info report


C

1 In the Define Report Field dialog box, type the following field names with their
JSpace expressions and click OK after each expression:
.I.

Field name COMPONENT and the JSpace expression, NAME


Field name DESCRIPT and the JSpace expression, COMP_DESC
B

Field name LINE ID and the JSpace expression, SYSTEM+"-L"+


FORMAT_INTEGER("03", LINENO) +"-"+SPEC+"-"+SIZE_1 + "\""
Field name DGN FILE and the JSpace expression,
MAIN\MEMBER_OF\FILE_NAME
2 Click the DONE button.

To test the report definition


1 In the PlantSpace Object Reporter dialog box, add the JSpace model files valves.jsm
and elbows.jsm.
2 Select the Pipe Component Info report, make sure the Use Default File Name(s) option is
selected, and click the Write Report(s) button.

PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate

11/24/03 8-224
Lab Solution

3 Open the file Bentley\Home\East_River\reports\CI.dbf in Microsoft Excel and


confirm that all the elbow components list elbows.dgn for the DGN File and all
valves list valves.dgn for the DGN File.

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

Time Needed to Cover Chapter: 4-5 hours


C

Chapter Objectives
.I.

[student page 9-185]


B

State the objectives.

The objectives of this chapter are to:


Select output settings
Analyze the isometric drawing creation process
Customize the ISOGEN materials list

PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate

11/24/03 9-227
Introduction

Customize the output to identify shop fabricated items

For this chapter, you will be using:

Training files for the students:


--09_AText.pdf
--09_pipe.dgn
--09_pipe.jsm
--09_shopfab.jsm
--09_specbreaks.jsm
--East_River_iso_format.dgn

ng
--fab_attribute.txt
--final.pos
--Isogen.fls
--IsogenPatchV81.zip

lti
--pipe_iso.pcf
--PS_ISO_USER.LIB
--style2.mld
su
--style2.OPL

Training files for the instructor:


--09_iso_creation_flow.ppt
on

--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.

Bentley PlantSpace AutoISOGEN is an application that runs as an interface to


Personal ISOGEN, the third party software by Alias, Limited. Isometric drawings are
created first by using the interface to produce neutral files called piping component

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.

PlantSpace AutoISOGEN Project Installation

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.

PlantSpace AutoISOGEN Project Structure

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

version, see "Migrating ISOGEN Interface Projects from V7 to V8.1" in Chapter 1 of


the Bentley PlantSpace AutoISOGEN Guide.
C

Isometric Drawing Creation in PlantSpace AutoISOGEN

To understand how to customize PlantSpace AutoISOGEN, it is helpful to


.I.

understand first how this application works. Your instructor will explain the
following diagram.
B

Explain the following diagram.

PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate

11/24/03 9-229
Introduction

ng
lti
su
on
C
.I.

Mapping Design Series Data


B

[student page 9-187]

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

The psisokey.dat file (in ...\Projects\East_River\Pisogen\config) explicitly maps all


Design Series piping components to valid PlantSpace AutoISOGEN component
classes and valid ISOGEN SKEYs (Shape Keys). The mapping is defined in the
psisokey.dat file through the use of seven columns of information. The first five
columns uniquely identify a specific type of component. The last two columns
identify the PlantSpace AutoISOGEN component class and a valid ISOGEN SKEY.
You can edit this file to customize your results.

PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate

11/24/03 9-230
Selecting Output Settings

Psisoend.dat File

The psisoend.dat file (in ...\Projects\East_River\Pisogen\config) maps Design


Series end preparation values to one of the valid ISOGEN end connection values.
The valid PlantSpace AutoISOGEN end connection values are:

BW for butt weld SW for socket weld


CP for compression LN for liner/nut
FL for flanged MP for male part
SC for screwed LC for liner (clamped)

g
PL for plain end LR for reducing liner/nut

tin
Ps_iso.lib Class Library

The ps_iso.lib class library (in ...\Projects\East_River\Pisogen\config) maps Design


Series pipe attributes to the PlantSpace AutoISOGEN pipe components. The

l
ps_iso.lib file enables you to configure the way components are called out on the
su
isometric drawing.

See the chapter Configuring PlantSpace AutoISOGEN in the Bentley PlantSpace


on

AutoISOGEN Guide for more information.


C

Selecting Output Settings


.I.

[student page 9-187]

The Isometric Drawing Settings dialog box identifies the location of system files and
B

the PlantSpace AutoISOGEN reference files.

To select output settings


1 From the Windows Start > Programs menu, choose Bentley PlantSpace
AutoISOGEN v8.1 > AutoISOGEN.
If you have two or more PCF files in the location pointed to by the
MicroStation configuration variable, _USTN_PROJECT, the Select Project

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.

The Bentley PlantSpace AutoISOGEN window is displayed. The East_River

ng
project and isometric style (in square brackets) are displayed. The style is
explained in step 3.

lti
su
on
C
.I.
B

2 Click the Isometric Drawing Settings button.


The Isometric Drawing Settings dialog box is displayed.

PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate

11/24/03 9-232
Selecting Output Settings

3 Configure the fields by using the following table:

Field or Button Description

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

use to format the isometric drawing.


Note: This field cannot be edited. Refer to the Alias
documentation on configuring the *.fls file.
Edit Opens a text editor to edit the FLS file
C

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.

Note: Refer to the Alias documentation on this setting.


Bore size in inches If selected, the system uses the Imperial nominal bore sizes. If
not selected, the system uses the sizes in the model, be they
B

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.

Break Time: 5 to 10 minutes

PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate

11/24/03 9-233
Creating a Sample Isometric Drawing

Creating a Sample Isometric Drawing


[student page 9-190]

To create a sample isometric drawing


1 From the Windows Start > Programs menu, choose Bentley PlantSpace
AutoISOGEN v8.1 > AutoISOGEN.
2 Select the East_River project and click OK.
3 Use the file 09_pipe.jsm as input to PlantSpace AutoISOGEN, and type

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.

the PCF was obtained.


B

Basic header information (one block per file)

Pipeline identifier and related header information

PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate

11/24/03 9-234
Analyzing the Isometric Drawing Creation Process

Pipeline components and connection information

g
l tin
Material item codes and descriptions (one block per file)
su
on

Analyzing the Isometric Drawing Creation Process


C

[student page 9-191]


.I.

To understand how ISOGEN creates the isometric drawing, we will look at the
details in the process.
B

To analyze the isometric drawing creation process


1 From the ...\Bentley\Home\East_River\dgn directory, open tmp_pcf.jsm
and 09_pipe.jsm in the JSpace Class Editor.

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.

2 In the Object Browser - TMP_PCF.jsm dialog box, double-click the first


ISO_ELBOW object.
The Relationships and Properties - ISO_ELBOW dialog box is displayed.

PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate

11/24/03 9-235
Analyzing the Isometric Drawing Creation Process

3 In a text editor such as Wordpad, open the file


...\East_River\Pisogen\Inputs\pipe_iso.pcf.
The lines in the pipe_iso.pcf file below the first ELBOW component
exactly correspond to the property values in the ISO_ELBOW object
shown as follows:

Line from pipe_iso.pcf ISO_ELBOW Property

END-POINT -286.6938 626.2029 0.0000 6 BW ISO_END_POINT_1


CENTRE-POINT -277.6938 626.2029 0.0000 ISO_CENTRE_POINT

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

source after the Input Property List value is:


GET_ISO_END_POINT( \ISO_OF\SNAP_POINTS[1], NOM_SIZE1,
\ISO_OF\EPREP1)
C

6 In the GET_ISO_END_POINT function (shown in this step from the Bentley


PlantSpace AutoISOGEN Guide), see the declaration and note that the
arguments passed to this function in our example are as follows:
.I.

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

For example, the value for \ISO_OF\EPREP1 is BW.


8 Edit the ISO_ELBOW class in ps_iso.lib and double-click the
ISO_ITEM_CODE property.
C

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.

9 In the GET_ISO_ITEM_CODE function (shown in this step from the Bentley


PlantSpace AutoISOGEN Guide), see the declaration and note that the
arguments passed to this function in our example are as follows:
B

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

After evaluating the expression on the first ISO_ELBOW object in


tmp_pcf.jsm, you can see that the value source evaluates to the lines in the
PCF file as follows:
.I.

ITEM-CODE PELB
DESCRIPTION ELBOW, 90 DEG., LONG RAD., BUTT WELD ASTM-A234,
B

Grade WPB, Schedule 40

10 Open the file ...\East_River\Pisogen\Final-Basic\Drawings\pipe_iso.dgn in


MicroStation and see that the material list items are the same as seen in the
PCF file.

Break Time: 5 to 10 minutes

Customizing the ISOGEN Materials List


PlantSpace AutoISOGEN supports three different styles of Material Lists or Bills of
Materials (BOM):

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

To create a material list with Style 2


1 Create a material definition file called style2.mld in the East_River\custom
directory.
2 Update style2.mld to define column headings for the BOM by adding the
following lines:
STYLE2-COLUMN-HEADINGS
'BLANK'
PART QTY SIZE COMPONENT COMPONENT
NO. (INS) DESCRIPTION ITEM CODE

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

4 Edit the file East_River\Pisogen\Final-Basic\Isogen.fls as follows:


Update the MATERIAL-LIST-DEFINITION value to specify style2.mld as
our new material definition file in your East_River\custom directory.
C

Update the DRAWING-FRAME value to point to the file


East_River_iso_format.dgn.
5 Copy the file East_River\Pisogen\Final-Basic\final.opl to the
.I.

East_River\custom directory and rename it style2.opl.


6 Using the ISOGEN Options Editor, open style2.opl and change the material
B

list type to Style 2 Material List.


7 Set the layout options for Style 2 and Material Lists group to:
Standard sectionalized type with group headings and component sub-group headings
8 Save the changes and exit the Options Editor.
9 Edit the file East_River\Pisogen\Final-Basic\Isogen.fls and update the
OPTION-SWITCHES-LONG value to specify ...\East_River\custom\style2.opl as
our new options file.
10 Run another iso using the file 09_pipe.jsm and confirm that the output drawing
includes the BOM format that we just defined.

PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate

11/24/03 9-240
Customizing ISOGEN Output to Identify Shop Items

Customizing ISOGEN Output to Identify Shop Items


[student page 9-196]

Remind students to follow along.

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

in Design Series. For this exercise, we will use shop fabrication.

To update the ATTRDEFN table


C

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.

Creating and Updating User Class Libraries

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.

To create a user class library for the ps_iso.lib class library


C

1 Open JSpace Class Editor.


2 From the menu bar, choose File > New and type the new class library name,
ps_iso_user.lib.
.I.

3 Save the file to the ...\East_River\custom directory.

To update your class libraries


B

The value determined for any property that begins with ISO_ is output to the PCF file for the
particular component.

1 In the ...\East_River\Pisogen\config directory, open ps_iso.lib in the JSpace


Class Editor.
Both files must be open.
2 In ps_iso_user.lib, create a new class called PIPE_FAB and add the
following two properties:
ISO_SHOP_FAB and add two fixed sources as follows:
.ISO_SHOP_FAB

PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate

11/24/03 9-242
Customizing ISOGEN Output to Identify Shop Items

ISO_FABRICATION_ITEM_IF ( \ISO_OF\FAB == "S" )

ISO_FIELD_FAB and add two fixed sources as follows:


.ISO_FIELD_FAB
ISO_ERECTION_ITEM_IF (\ISO_OF\FAB == "F" )

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.

The instructors file, ps_iso_user.lib, contains the updated class library.


B

Testing the Configuration for the Shop Items


[student page 9-198]

You are now ready for all commodities to be placed in separate BOMs on the
isometrics. We will test this process.

To test the configuration for the shop items


1 Run an iso by using 09_shopfab.dgn.
2 Open the isometric drawing created in MicroStation and confirm that the
bolts are listed as Erection Materials, and that all other items are listed as
Fabrication Materials in the BOM (Bill of Materials).

PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate

11/24/03 9-243
Key Points in This Chapter

3 Open 09_shopfab.dgn in Design Series.


4 Edit the label of one pipe and change the value of the FAB attribute from S
to F.
5 Create a new JSM file and run another iso.
6 Confirm that the pipe that you edited is included as an Erection item on the
BOM section of the iso.

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

should create a user class library to customize output.


You can customize settings such as the iso type, output drawing type, bore size
in imperial or metric measurements, and inclusion or exclusion of nozzles.
.I.
B

Break Time: Lunch

Lab: Displaying Specification Breaks on Iso's


[student page 9-198]

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

When students are finished, ask if they have questions or comments.

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]

If you need some help, here are the steps to follow.

To display specification breaks on isos


1 In the Jspace Class Editor, open ps_iso.lib and ps_iso_user.lib from the
East_River project directory structure.
2 In ps_iso_user.lib, create a new class called ISO_BASE_USER.

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)

5 In ps_iso.lib, make the class ISO_BASE_USER in ps_iso_user.lib a parent of


su
ISO_BASE.
6 Save both libraries.
7 Run an iso using the file 09_specbreak.jsm and confirm that the created iso
on

contains several spec breaks.


8 To have the spec breaks contain the text "SPEC" instead of "MATL", edit the
file \custom\Pisogen\FINAL\final.alt and add the following line.
C

-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

Time Needed to Cover Chapter: 2-3 hours

g
Chapter Objectives
[student page 10-201]

State the objectives.


l tin
su
The objectives of this chapter are to:
Set up a customized conversion in the JSpace Class Editor using a class library
on

Run the Label Convert utility to add new attribute values and modify existing
attribute values
Check the output results
C

For this chapter, you will be using:


.I.

Training files for the students:


--LineList.mdb
B

--no_insul_pipe.dgn
--v80sample.dgn
--v80rimref.dat

Training files for the instructor:


--lblcvt_add_insul.lib
--LineList.mdb
--lblcvt_80to81.lib
--no_insul_pipe.dgn

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

Defaults to the JSpace class library defined by the configuration variable


LBLCVT_LIB
Extracts the existing attribute values from the components by using a label-
C

position export file (also known as a rimref.dat file)


Applies an optional mapping of both names and values using a JSpace class
library
.I.

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

Converting Component Labels


Warning: It is most important that the rimref.dat file be generated from the existing attribute
definition, and that the Label Convert utility be run in a project that has the new attribute
definitions in its database.

Use the GUI to point out things as you explain.

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.

Break Time: 5 to 10 minutes

Setup Guidelines Before Running the Label Convert Utility

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 change the type of component, such as changing PIPE_PBR3 to


PIPE_PBRN (or a spool to a nipple), you would use the JSpace Class Editor to
edit the particular class by adding a fixed source to the BUD_TYPE.

Remind students to follow along on their keyboards.

Assigning Values to New Attributes


[student page 10-203]

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.

To set up a class so that a value is assigned to a new attribute

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

IIF(.SPEC == "CS150", "CB31", .SPEC)

.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

8 Save and close lblcvt_80to81.lib.

To investigate a sample design file

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.

To run LABELCVT to assign a value to a new attribute

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.

You can use the Remove button to edit the list.


4 Click the Done button.
The Label Convert dialog box is redisplayed with the selected files in the 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.

Break Time: 5 to 10 minutes

PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate

11/24/03 10-254
Key Points in This Chapter

Key Points in This Chapter


[student page 10-207]

The key points to remember in this chapter are:


To convert components from a previous version of Design Series to a newer
version, you must run LABELCVT on each of the design files.
To add or modify attribute values to existing components, you must run
LABELCVT on each of the design files.

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

Lab: Using Label Convert to Update Insulation Values


[student page 10-207]
C

State that students have 30 minutes to complete the Lab. Point out that if they need help,
.I.

they can refer to the Lab Solution that follows.


B

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

When students are finished, ask if they have questions or comments.


C

Break Time: End of Day 4


.I.
B

Lab Solution
[student page 10-208]

If you need some help, here are the steps to follow.

To update insulation values


1 Define an ODBC data source named LineList that points to the LineList.mdb file in
your training folder.
2 In the Class Editor, create a new class library called lblcvt_add_insul.lib in your
East_River\custom folder.
3 Add a new class named LBLCVT_PIPE.

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

Conversion Rule Library.


9 Open the no_insul_pipe.dgn converted file from the \new folder and confirm that all
insulation types and thicknesses have values that agree with the values in the LineList
.I.

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.

Time Needed to Cover Chapter: 1 -1 hours

g
Chapter Objectives
[student page 11-211]
l tin
su

State the objectives.


on

The objectives of this chapter are to:


Define the annotation types available in the Annotation utility
C

Explain how class libraries are used to define annotation text


Edit an annotation class library to customize the output
.I.

For this chapter, you will be using:


B

Training files for the students:


--annotation_test.dgn

Training files for the instructor:


--annotation_example.dgn
--annotation_test.dgn
--annotation_types.dat
--completed_annotation_test.dgn

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

The annotation types available to users can be configured by updating a table in


the project database. The content of the notation (the amount and type of
information displayed) can be defined by updating a class library.

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.

Understanding the Configuration of the Annotation Utility

The DESCRIPTION column in the ANNOTATION_TYPES table defines the options


to be displayed in the drop-down list box.

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.

Example 1: A Pipe (BUD_TYPE = PIPE_PIPE)

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.

Show the ANNOTATION propertys value source in the ANNOT_PIPE class.


B

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.

Configuring the Content


Configuration involves the following tasks:

PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate

11/24/03 11-262
Configuring the Content

Configuring the content in your project-specific annotation class library


Configuring the content in the ANNOTATION_TYPES table

Configuring the Content in Your Annotation Class Library


[student page 11-213]

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)

A sample annotation class library, annotatione.lib (imperial) or annotationm.lib (SI

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

BUD_TYPE of the component to be annotated.

This dialog box shows the properties of the ANNOT_PIPE_PIPE class.


C
.I.
B

To evaluate properties, the system can use:


The attribute values from the Input Property List. So .SPEC means the value of
the attribute named SPEC.
JSpace expressions and functions, including the values of other properties and
database queries

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

Remind students to follow along.


.I.

To define a project annotation class library


B

1 Copy the delivered sample annotatione.lib to


...\East_River\custom\East_River_annotation.lib.
2 Open projvars_user.cfg in your ...\East_River\custom directory.
3 Add the DS_ANNOTATION_DEFINITIONS configuration variable to
specify the new class library, as follows:
%undef DS_ANNOTATION_DEFINITIONS
DS_ANNOTATION_DEFINITIONS =
$(DS_USR_CFG_DIR)\East_River_annotation.lib

PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate

11/24/03 11-264
Configuring the Content

Configuring the ANNOTATION_TYPES table


[student page 11-215]

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

2 Edit the data between DATA_BLOCK_BEGIN and DATA_BLOCK_END to


delete the last three rows of data because our project will not be using
Expanded Sys Name or System Size callouts.

Remind students that:


--Each row becomes an option in the drop-down list box of the Type field in the Annotation

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.

Key Points in This Chapter

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

options displayed in the Type field in the Annotation dialog box.


The PREFIX and PROPERTY columns in the ANNOTATION_TYPES table are
used to identify the class and property to be used to obtain the annotation text.
C

Lab: Editing an Annotation Class Library


.I.

[student page 11-217]


B

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

1 Add a property to the ANNOT_PIPE_PIPE class called


INSULATION_EXPRESSION.
2 Follow either direction:
If the insulation code is "NA", set the value of this property to blank ("").
If the insulation code is not "NA", set the value to contain the insulation
code, a slash, and the insulation thickness, and enclose this entry in
parentheses ( ). For example "(CP15/1.5)" as shown in Example 2
above.
3 Update the value source for the ANNOTATION property to output the actual
SYSTEM value and include the INSULATION_EXPRESSION.
4 Place pipe with no insulation.

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.

Break Time: 5 to 10 minutes

Lab Solution: Editing an Annotation Class Library

ng
[student page 11-218]

If you need some help, here are the steps to follow.

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

.SYSTEM+"-L"+ FORMAT_INTEGER("03", .LINENO) +"-"+.SPEC+"-


"+TO_FRAC(.SIZE_1,8) + "\"" +INSULATION_EXPRESSION

or
.I.

.SYSTEM+"-L"+ PADTEXT(.LINENO,"0",3,"L") +"-"+.SPEC+"-


"+TO_FRAC(.SIZE_1,8) + "\"" +INSULATION_EXPRESSION
B

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

Challenge Lab: Calling Out Workpoint Elevations


[student page 11-219]

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"

The ELEVATION property in the ANNOT_PIPE_PIPE class shows a sample elevation


C

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

4 Localize properties that are currently being inherited from the


ANNOT_PIPE_PIPE class.
Warning: Do not localize properties that are inherited from the ANNOT class.

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

Challenge Lab Solution


[student page 11-221]

If you need some help, here are the steps to follow.


1 Open East_River_annotation.lib.
2 Add a new class called ANNOT_PIPE_PELB.
3 Edit the ANNOT_PIPE_PELB class and select Parents from the drop-down
list box at the top.

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

"WP EL."+NEWLINE + TO_FIF(ZCOORD/12.0)

The ZCOORD property is assigned a value by the SET_ZCOORD value source of


C

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.

8 Save the class library.


9 Test your updates by annotating elbows in the file annotation_test.dgn.
Make sure that you set the Type to Elevation in the Annotation dialog box.
10 Annotate one of the elbows in the file and confirm that the value is
displayed in feet and inches similar to the following:
WP EL.
49'-2 9/16"

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

Time Needed to Cover Chapter: 1 hour

g
Chapter Objectives
[student page 12-223]

State the objectives.


l tin
su
The objectives of this chapter are to:
Load the master volume definition file into the database
on

Build storage tables for MCS


Append existing components into MCS
Configure access control at the commodity and component levels
C

For this chapter, you will be using:


.I.

Training files for the students:


--East_River.vol
B

--equip_model.dgn
--pipe_model.dgn

Training files for the instructor:


--East_River.vol
--equip_model.dgn
--MCS_storage.ppt
--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.

How MCS Uses Your Project Database

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

for applications that associate components to maintain the associations between


components within a model. You can extract the components by entering the name
of the design file. File-based storage is used for Bentley Structural and HVAC for
.I.

TriForma.

Warning: Where MicroStation V8 DGN files can contain multiple models, DGN files for
B

use in MCS can contain only one model.

A designer using a laptop computer can:


Check out a file from the project database
Go to the job site and model components
Return to the office and connect to the project database
Check in the updated information

File-based storage also:


Stores all design information in a central database
Automatically creates a MicroStation design file when components are checked
out of the database

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

area, individual system, or line number).

A designer using a laptop computer can:


C

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.

Check in the updated information


B

Component-based storage also:


Enables you to check in and check out components from project areas. You can
work with a single component or a complete project including all disciplines.
Handles large, multi-discipline projects where tight control is essential
Stores all design information in a central database
Automatically creates a MicroStation design file when components are checked
out of the database
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

PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate

11/24/03 12-275
Key Points in This Section

Comparison of the Two Modes of Storage


[student page 12-225]

The following diagram visually compares the processes involved in file-based


storage and component-based storage.

Modes of Storage in MCS


File-Based Storage Component-Based Storage

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

MCS Check-out MCS Check-in MCS Check-out MCS check-in


su
and Append

DGNs DGNs
Components Components
on

DGNs Created Temporary DGN DGNs Created Temporary DGN


or Modified or Modified
C

Local User Local User


.I.

Key Points in This Section


B

[student page 12-226]

Paraphrase the key points.

The key points to remember in this section are:


You can store and extract data from your project database in one of two modes:
file-based storage and component-based storage.
Bentley Structural and HVAC for TriForma use file-based storage. In file-based
storage, MCS stores the DGN file. File-based storage mode is required for
applications that associate components to maintain the associations between
components within a model.

PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate

11/24/03 12-276
Defining Volumes

Design Series uses component-based storage. In component-based storage,


MCS stores the components. Component-based storage mode is allowed for
applications where all the components are independent of one another,
allowing for the creation of a model with any arbitrary set of components.

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

[student page 12-226]

Two types of volume definition files are supported:


Master volume definition file
C

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.

Because the master volume definition file should be generated only


once, you should add areas to the master volume definition file before
B

modeling components in those areas.

The master volume definition file defines the default areas used by MCS.

Discipline volume definition files


The discipline volume definition files define specific work areas that the
designers frequently access during the project life cycle. These files are not
loaded into the database. Designers can create these discipline volume
definition files and keep them for their own personal use or share them
with other designers.

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.

Tasks Involved in Working with the Master Volume


Definition File

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

Area boundaries must not overlap.


All area names must be unique.
C

All areas together should form a rectangular cube without any holes.
For example, the volumes shown are properly defined.
.I.
B

Whereas, the volumes shown are not properly defined.

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.

Loading the Master Volume Definition File into the


Database
[student page 12-228]

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.

To load the master volume definition file into the 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

The Database Setup window is displayed.


C
.I.
B

3 In the Load group, click the Volume File button.

PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate

11/24/03 12-279
Defining Volumes

The Load Volume Definitions dialog box is displayed.

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.

Building MCS Storage Tables


C

[student page 12-229]

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.

To build MCS storage tables


1 In the Database Setup window, click the Build Storage Tables button.
If the build is successful, the following message is displayed.

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

Key Points in This Section


[student page 12-230]

Paraphrase the key points.

The key points to remember in this section are:


TriForma enables you to define and contain rectangular areas of a project

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

loaded into the database.


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
C

using the Database Setup tool.


You must build the MCS storage tables before using MCS by using the Database
Setup tool.
.I.
B

Appending Design Files to Move from File-Based Storage to


Component-Based Storage
[student page 12-230]

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.

Enabling Users to Perform the Append Operation

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

Guidelines for the Append Operation


[student page 12-231]
C

Be aware of the following guidelines:


To append a file from a particular application, you do not need to have that
application running. However, you cannot edit the file.
.I.

In the Append operation, you can include components from multiple


disciplines in a single design file.
B

To append a design file


1 From the MicroStation menu bar, choose MCS > Append.
The MCS Design File dialog box is displayed. The default file name
displayed is the name of the current design file, as shown in this example.

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.

The key points to remember in this section are:


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
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.

Using the MCS Administrator Database Tool


[student page 12-233]

The MCS Administrator Database Tool program is used to perform administrator or


management tasks. The program is a browser-based tool that consists of an HTML
page, which can 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

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.

Viewing Components Checked Out by Users

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.

To view components checked out by users

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

2 To log in, type or select options for the following fields:

Field Description

Data Source East_River


Database Access
User ID proj
Password none

3 To view checked out information, click the CheckoutInfo button.

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.

Warning: Use caution because this operation cannot be undone.


This will clear all the checked out information associated with the selected
B

CHECKOUT_ID. (Internally it clears the corresponding row from the


CHECKOUT table and clears the CHECKOUT_ID column from all the BUD
tables).

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

Key Points in This Section


[student page 12-235]

Paraphrase the key points.

The key points to remember in this section are:


The MCS Administrator Database Tool program is used to perform administrator

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.

Break Time: 5 to 10 minutes


on
C

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

Access control tables


Access control attributes
Access control configuration variables

Access Control Tables


[student page 12-236]

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

Access Control Attributes

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

component is created, it gets the default value 2003, which can be


configured. For component-based commodities, you can modify this value
in the attrdefn.dat file. For TriForma file-based commodities, you can
.I.

modify this value in the StatusControl.cfg file.


B

Access Control Configuration Variables

A sample configuration for all the necessary configuration variables is delivered


ready to use in the StatusControl.cfg file in the ...Program\TriForma\config\appl
directory.

If you modify configuration variables, it is strongly suggested that you add


comment lines to document their purpose for future reference.

PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate

11/24/03 12-288
Access Control

How Access Control Works


[student page 12-237]

Let us consider user PIPE1_DESIGNER as an example to show how access control


works. User PIPE1_DESIGNER is defined in the USERS table. In the USERS table,
we see that the user PIPE1_DESIGNER belongs to group PIPE and has the role of
DESIGNER.
USERS Table

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

Access Control at the Commodity Level

In the GROUP_USAGE table and GROUP_CODE table, we see the corresponding


C

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

Access Control at the Component Level


[student page 12-238]

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

How Access Control Works in MCS Operations


.I.

Check-In, Append, and Update Database Operations


B

[student page 12-238]

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]

Users can check out only those components:


That belong to them

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

And, that have valid check-out statuses, as previously explained.


C

For example, user PIPE1_DESIGNER can check out only those components
that have IN_STUDY or IN_PRELIMINARY statuses.
.I.

Configuring Access Control


B

[student page 12-240]

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.

To configure access control at the commodity level


1 Copy the file users.dat from the East_River\dbload\data folder to the
East_River\dbload\data\project directory.
2 Edit users.dat in the \project directory and change the value for the
DEFAULT group as follows:
"DEFAULT", "ZPHIVCTSOEBFR"

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"

Warning: The user_id value is case sensitive.


7

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

9 Check out piping from AREA1.


10 Turn off the display of the piping reference file to confirm that all piping is
in your active design file.
C

11 Check in your file and exit Microstation.

To activate the access controls


.I.

[student page 12-241]

In the delivered project configuration, users by default have access to all


B

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.

To confirm that access control at the component level is working


1 Restart Design Series and check out piping from AREA1.
2 Turn off the display of the piping reference file.
All the piping components disappear because they are in the reference
file. This result happens because you are not the original designer for
these components. Specifically, the value of the ORIG_DES attribute for

ng
all of the piping components is different from your Windows username.
3 Check in the file.

To override access control based on the ORIG_DES attribute

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

2 Save users.dat and load it into the database.


3 Check out piping in AREA1 and confirm that you now have some piping
components in your primary file.
.I.

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

4 Check in the file.

To configure access control based on the D_STATUS attribute

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"

2 Save users.dat and load it into the database.


3 Do another check-out for piping in AREA1 and confirm that you now have
all piping components in your primary file.

PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate

11/24/03 12-294
Key Points in This Section

Key Points in This Section


[student page 12-243]

Paraphrase the key points.

The key points to remember in this section are:


MCS enables project administrators to enforce access controls to check

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.

In the delivered project configuration, users by default have access to all


on

commodities and all components. You need to activate the access controls by
configuring this program.
C

This chapter contains no lab.


.I.

Break Time: 5 to 10 minutes


B

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

Time Needed to Cover Chapter: 1 hour

g
Chapter Objectives
[student page 13-245]

State the objectives.


l tin
su
The objectives of this chapter are to:
Edit the report_criteria.dat file
on

Edit the report_types.dat file


Edit the report_arguments.dat file
C

For this chapter, you will be using:

Training files for the students:


.I.

--po.xls
--sample.bmp
--sample.txt
B

Training files for the instructor:


--po.xls
--sample.bmp
--sample.txt

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.

The EXE_REPORT_CRITERIA table, EXE_REPORT_TYPES table, and


EXE_REPORT_ARGS table are used to control the functionality of this command.

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]

The EXE_REPORT_CRITERIA table is defined in the report_criteria.dat file in the


{network drive}\Projects\dbload\data\pipe directory.
on

Display the table.


C

The columns of the table are described as follows:


.I.

Column Name Description

EXE_TYPE Text string to be displayed in the Access External Data dialog box
B

ORDER_BY Defines the order of items within each EXE_TYPE


BUD_TYPE Defines the type or types of components that can be processed. An
asterisk (*) can be used to specify all BUD_ TYPES.
CRITERIA JSpace expression evaluated against each selected component. If the result
is TRUE, the component will be processed.
REPORT_ID Name of the report (used to relate to the EXE_REPORT_TYPES table)

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.

Display the table.

g
The columns of the table are described as follows:

tin
Column Name Description

REPORT_ID Name of the report


EXE_NAME

l Command used to execute the desired program


su
ARG_LIST Name used to define the argument list items (used to relate
to the EXE_REPORT_ARGS table)
DATA_SOURCE_NAME Optional ODBC data source name
on

Arguments are appended to the command string based on values queried from the
EXE_REPORT_ARGS table.
C

EXE_REPORT_ARGS Table
.I.

The EXE_REPORT_ARGS table is defined in the report_arguments.dat file in the


{network drive}\Projects\dbload\data\pipe directory.
B

Display the table.

The columns of the table are described as follows:

Column Name Description

ARG_LIST Argument list name


ORDER_BY Defines the order of the arguments
DESCRIPTION Description of the argument
EXPRESSION JSpace expression to evaluate. The result of the expression is
passed as the argument value.

PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate

11/24/03 13-299
Setting Up Access to External Data

Setting Up Access to External Data


[student page 13-247]

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"

3 Save and close the file.


Open the report_types.dat file in the same directory to edit the

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

6 Save and close the file.


7 Open the report_arguments.dat file in the same directory to edit the
EXE_REPORT_ARGS table.
C

8 Between the lines, DATA_BLOCK_BEGIN and DATA_BLOCK_END, add the


following new rows of data:
"EXCEL_ARGS", 1, "C", "/C"
.I.

"EXCEL_ARGS", 2, "START", "START"


"EXCEL_ARGS", 3, "GETENV(PS_USER) + dgn\po.xls"
B

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

Key Points in This Chapter


[student page 13-248]

Paraphrase the key points.

The key points to remember in this chapter are:


Design Series enables users to access data from third-party applications.

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

Break Time: Lunch.


C

After lunch, review the course. The afternoon is set aside as a workshop to enable students
.I.

to work on solutions to software issues that affect their business needs.


B

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

Code Description Level Color

AI Instrument Air 20 1
C

CLP Low Pressure Condensate 2 2


CHP High Pressure Condensate 20 3
DR Drain 20 4
.I.

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

RNA Nitric Acid 20 13


RSA Sulfuric Acid 20 14
RSS Sodium Silicate 20 15
STH High Pressure Steam 20 16
STL Low Pressure Steam 20 17
VT Vent 20 18

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

12/8000 Imperial (feet and inches) files


.I.
B

PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate

11/24/03 A-304
Material Classification

Material Classification

Basic Material of Construction

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

Threaded (01 - 10)


Socket end (11 - 30)
Plain End (31 - 50)
Flanged (51 - 60)
Grooved (71 - 80)

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.

Piping Material Specification


B

SPEC CB31

CLASS 150# - CARBON STEEL

Item or
Pipe Size Description
Commodity

Pipe to 2 Schedule 80, Seamless Carbon Steel, ASTM A106, Grade B


2 to 12 Schedule 40, Seamless Carbon Steel, ASTM A106, Grade B
Elbows to 2 ANSI B16.11 Class 3000 Forged Carbon Steel, ASTM A105,
(45 and 90 degree) Socket Weld
2 to 12 ANSI B16.9 Seamless ASTM A234, Grade WPB, Butt Weld,
long radius, same Schedule as Pipe

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

Unions to 2 Bonney Forge, Class 3000 Forged Carbon Steel, Socket


Weld, ASTM A105, Steel/Steel Seats
Reducers 2 to 12 ANSI B16.9 Seamless ASTM A106, Grade B, Butt Weld,
Same Schedule as Pipe
Caps to 2 ANSI B16.11 Class 3000 Forged Carbon Steel, ASTM A106,
Socket Weld
2 to 12 ANSI B16.9 Seamless ASTM A106, Grade WPB, Butt Weld,

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

to 2 Freds Piping Supply, 800# Threaded Ball Valve, ASTM


A105
.I.

2 to 12 ANSI B16.10 150# Butt Weld Gate Valve, ASTM A216,


Grade WCB
2 to 12 ANSI B16.10 150# Flanged Gate Valve, Raised Face, ASTM
B

A216, Grade WCB


2 to 12 ANSI B16.10 150# Butt Weld Globe Valve, ASTM A216,
Grade WCB
Valve Operators to 12 All gate and globe valves will be handwheel operated.
to 2 Ball valves will be lever operated.

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

ARG A String that is the name of a class


on

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.

query returns multiple columns, only the first column is used.

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:

ODBC SQL Type JSpace Data Type

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

ODBC SQL Type JSpace Data Type

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

Access database, user name and password are optional.

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

FORMAT_SPEC A String that specifies the format of the output String


NUMBER A number that can be converted to an integer

ng
Description

The FORMAT_INTEGER function converts an integer into a String using the


supplied format string. The format string is of the form "[flag]width". The optional

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

FORMAT_INTEGER returns a String that is the integer in the specified format.

Example
C

FORMAT_INTEGER( "-3", 10 ) returns the String "10 "


FORMAT_INTEGER( "03", 10 ) returns the String "010"
FORMAT_INTEGER( "3", 10 ) returns the String " 10"
.I.
B

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

TEST The Boolean value of TRUE or FALSE


TRUE_VALUE A JSpace value
FALSE_VALUE A JSpace value

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

The following function call returns the value 1:


IIF( A > 5, 1, 0 )
C

When A is 6

The following function call returns the value 5:


.I.

IIF( A > 5, " '10/2 ", " '20/2 ")


When A is 6
B

MIN
Declaration
MIN( ARG1 [, ARG2, ARG3, ..., ARGn ] )

Parameters

ARG A Double or a Long

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

The following function call returns the value 5:

ng
MIN( 5, 7, 10 )

lti
PADTEXT
Declaration
su
PADTEXT( SOURCE_STRING, PAD_CHARACTER, TARGET_LENGTH, PAD_JUSTIFICATION )

Parameters
on

SOURCE_STRING A String to be padded


PAD_CHARACTER A padding Character
TARGET_LENGTH The length of the padded String
C

PAD_JUSTIFICATION The padding justification of "L" = left or "R" = right


.I.

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.

The source String is not modified by the function.

Returns

The PADTEXT function returns a padded text String of a specified length.

Example

The following function call returns the String "***abc":


PADTEXT( "abc", "*", 6, "L" )

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

STRING A String from which values are to be extracted

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

into values of a specified type. The value is assigned to a property in the


argument list. Format specifications are of the form: %[*][width]type
The format control String is read from left to right. Characters outside the
format specifications are expected to match the sequence of Characters in the
C

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

FORMAT An input field is defined as all Characters up to the first white-space


(continued) Character, or up to the first Character that cannot be converted according
to the format specification, or until the field width (if specified) is reached.
Each field of the format specification is a single Character or a number
signifying a particular format option. The "type" Character, which appears
after the last optional format field, determines whether the input field is
interpreted as a Character, String, or a number.
An asterisk (*) following the percent sign suppresses assignment of the
next input field, which is interpreted as a field of the specified type. The
field is scanned but not stored.
"width" is a positive integer controlling the maximum number of

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

associated argument is interpreted as a Character, String, or number. Valid


"type" Characters are "c", "s", "f", and "i", for Character, String, FPoint, and
integer, respectively.
PROPERTY A String that is the name of a property of the Active Object to which a
C

value extracted from the String is assigned

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

SSCAN returns the first value extracted from the String.

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

LINE = SSCAN( "L-101-AA-HBD-3", "L-%s-%s-%s-%i", "LINE", "SERVICE",


"SPEC", "SIZE" )

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

TO_FIF returns a String that is in the form 1'-1".

Example
C

The following function call returns the String "1'-1" ":


TO_FIF( 13.5 )
.I.

TO_FRAC
B

Declaration
TO_FRAC( NUMBER, BASE )

Parameters

NUMBER A Double that can be converted to a fractional String


BASE A Long that becomes the denominator of the fraction. For example, 4
is the base for quarters and 16 for sixteenths.

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

This following function call returns the String "3 5/8":


TO_FRAC( 3.625, 8 )

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

The following function call returns the text String "ABC":


TOUPPER( "abc" )

PlantSpace Design Series Admin. Copyright 2003 Bentley Systems, Incorporated Do Not Duplicate

11/24/03 B-318
Appendix C: Tips

General Help

Testing New Rule Files or Changes to Existing Ones

Set configuration variable PS_RULES to a set of directories, each separated by a semi-colon


(;), that AMS will search for rule files. This is helpful for testing new rule files or changes to
existing rule files without having to load the rule using Database Setup and re-connect to
AMS inside of MicroStation.

The directories specified must end in a back slash (\).

Checking the Desired Weight of Connect Points

Set configuration variable DS_CONNECT_POINT_WEIGHT to the numeric value for the


desired weight of the connect points created by the rule file.

Keeping an Attribute Unique to Every Component

Set configuration variable DS_NONMATCHING_ATTRIBUTES to the set of attribute


names, each separated by a semi-colon (;), that you never want matched from one component
to another. This is useful if you have an attribute that you want to keep unique to every single
component.

Adding a New Standard to Design Series Piping

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

Adding Bolt Data

Database Table DAT File That Creates Table Notes

BOLTS Bolts.dat 5

Adding Flange Data

Database Table DAT fIle That Creates Table Notes

PIPE_PFLG Pflg.dat 2,7

g
PIPE_PGKT Pgkt.dat 2

tin
Adding Pipe Diameter Data

Database Table DAT File That Creates Table Notes

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

Adding Manufacture and Material Data

Database Table DAT File That Creates Table Notes


.I.

MANUFACTURERS Manufac.dat
B

MATERIAL_DATA Material.dat

Adding Valve Data

Database Table DAT File That Creates Table Notes

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

Adding a Standard Description

Database Table DAT File That Creates Table Notes

STANDARD_DESC Glossary.dat

Adding Nozzle Data

Database Table DAT File That Creates Table Notes

PIPE_PNOZ_ENDS Pnoz.dat 1

ng
Adding End Preparation Data

lti
End Preparation Database Table DAT File That Creates Table Notes

Socket Weld PIPE_PEND Pend.dat 3


su
Bell PIPE_PEND Pend.dat 3
Female Thread PIPE_PEND Pend.dat 3
Male Thread PIPE_PEND Pend.dat 3
on

Flange PIPE_PEND Pend.dat 3,6


Press fit PIPE_PEND Pend.dat 3
C

Plain PIPE_PEND Pend.dat 3


Beveled PIPE_PEND Pend.dat 3
Grooved PIPE_PEND Pend.dat 3
.I.

Compression PIPE_PEND Pend.dat 3


Ferrule PIPE_PEND Pend.dat 3
B

Adding Other Component Catalog Data

Component type Database Table DAT File That Creates Table Notes

Bellows PIPE_BLLW Bllw.dat 1


Clamp PIPE_CLMP Clmp.dat
Ferrale PIPE_FERR Ferr.dat
Flexible pipe PIPE_FLEX Flex.dat
O-ring PIPE_ORNG Orng.dat
Adapter PIPE_PADP Padp.dat

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

Branches PIPE_PBRN Pbrn.dat 1


Bushing PIPE_PBUS Pbus.dat
Caps PIPE_PCAP Pcap.dat
Couplings PIPE_PCPL Pcpl.dat
Elbows PIPE_PELB Pelb.dat 1
Eccentric reducers PIPE_PERD Perd.dat 1

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

Spool PIPE_PSPL Pspl.dat 1


Strainer PIPE_PSTR Pstr.dat 1
C

Eccentric swage PIPE_PSWE Pswe.dat 1


Concentric Reducer PIPE_PSWG Pswg.dat 1
Tap PIPE_PTAP Ptap.dat
.I.

Trap PIPE_PTRP Ptrp.dat 1


B

Union PIPE_PUNI Puni.dat


Return Bend PIPE_RBND rbnd.dat
Site Glass PIPE_SIGL Sigl.dat 1
Stub end of PIPE_STUBLEN Stublen.dat

Using a User Function to Call Out the Radius of a Bend

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

function, refer to the section GET_ISO_BEND_RADIUS in the PlantSpace Design Series


Reference Guide for Administrators.

To call out the bend radius on an isometric drawing


1 In the ps_iso_user.lib class library, create a class called USER_ISO_BEND.
2 Create property called BEND.
3 Add an inference rule to determine the bend radius of the elbow.
The following is an example of the rule.
IF \ISO_OF\B_RADIUS == "LD"

ng
THEN BEND = "1.5D"
ELSEIF \ISO_OF\B_RADIUS == "A"
THEN BEND = "U/D"

lti
ELSE BEND= \ISO_OF\B_RADIUS

This rule looks for two distinct cases:


su
If the attribute B_RADIUS is defined as LD in the elbow label, then BEND will
be assigned the value 1.5D.
If the attribute B_RADIUS is defined as A in the elbow label, then BEND will
on

be assigned the value U/D for user defined.


If BEND is not equal to either LD or A, then BEND will be assigned the value
of the attribute B_RADIUS from the elbow label.
C

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

5 Add the following fixed sources:


The first fixed source looks at the Input Property List.
BEND_RADIUS = .BEND_RADIUS

The second fixed source uses the GET_ISO_BEND_RADIUS function to


output the bend radius to the PCF file.
BEND_RADIUS = GET_ISO_BEND_RADIUS (BEND)

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

Determine Overlay INPUT_METHOD for an Attribute

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

Checking that Configuration Variables Are Set Properly

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

The default location is ...\Bentley\Program\MicroStation\varList.txt. This file can help you


see that the configuration variables are set properly.

Adding Diagnostic Information to the Log File During Label Conversion

Set configuration variable LBLCVT_DIAGNOSTICS to any value to include additional


information in the log file when you run the Label Convert utility.

Examining the Properties Set by a Class Library During Label Conversion

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

Finding a Failed Query and the Cause


on

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.

Components Not Properly Checking In/Out in MCS


B

Set configuration variable MODLCTRLDEBUG to 1 to write log file $PS_TEMP/


runmcs.log. This file contains diagnostic messages for MCS operations. This can help you
determine why components are not checking in or out properly.

Create a Log File of Queries to an ODBC Database To Debug Applications

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.

Query Fails in Design Series

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

Symbols Converting to the current version of the software 249


_USTN_PROJECT 22, 27 Creating a Summary of Label Utilization 107
Displaying 103
Mapping of Component Attributes Compared to Label
A Positions 106
Component-Based Storage 275
Access Control Conditional Selection in SQL 51
Configuring 292 Converting Component Labels 249
Description 287 Criteria
Administrator Database Tool 284 Creating a Criterion 194
ams.lib 167, 214 Description 179
ams_user.lib 167 Types 192
ams_user_lib 214
Annotation
Configuring the content in Your Annotation Class D
Library 263
annotation_types.dat 265 D_STATUS configuration variable 288
Append Operation Database Setup Tool
Guidelines 282 Using to Build MCS Storage Tables 280
Appending Design Files to Move from File-Based Storage Database Table Field 193
to Component-Based Storage 281 Database Table Lookup 193
ATTRCDEF Table 94 Database Tool, see MCS Administrator Database Tool
ATTRDEFN Table 65, 94, 97, 280 DB_BUILD configuration variable 288
Attribute Definition Tables 65 Design Series, overview of software 3
Description of 92 DISTINCT Keyword in SQL 49
How Design Series uses them 94 DS_ANNOTATION_DEFINITIONS configuration
Layers of 93 variable 263, 264
Attribute Definitions, explaining 91 DS_USER_CFG_DIR 32

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 mapping of component attributes compared to To use built-in functions 162


label positions 106 To use catalogs and user input as a component type 197
To create a material list with Style 2 240 To verify inheritance 153
To create a new branch table 202 To verify the effect of adding the parent by creating an
.I.

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

To create a sample isometric drawing 234 F


To create a summary of label utilization 108 File-Based Storage 274
To create a table 45 FLS files 233
To create a user class library for the PS_ISO.LIB class
library 242
To customize the display of tool boxes 33 H
To define a project annotation class library 264 Hierarchical Relationships, levels used to define 98
To define the ODBC data source 24
To define the report fields 218
To define the valve price list report 216 I
To define values for the new criterion 195
To delete the table 46 IF-THEN-ELSE 156
To display a component label 104 Inference rule 156
To edit guideline values in vertical format 185 Inference Source Property 155
To edit the text file 76 Inheritance 130
To edit the text file defining the valve dimensions 82 INPUT_METHOD Query 101
To edit the text file that defines manufacturers 81 Instance in object-oriented envrionment 127
To insert data 45 Instancing Objects 150
To install the Project setup type 19 ISOGEN
To instance an object 150 Adding an Attribute to Identify Shop Fabrication 241

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

To create new guidelines 190


To define a new report and filter 224 Plot files in ISOGEN 229
To define guideline values 191 Primary Key Constraint 47
To define the fields of the Pipe Component Info projdefe.rul file 70
report 224 Project specification file
To display specification breaks on isos 246 Description of 178
C

To edit the INSULAT attribute so as not to display it in Structure of 176


the label 120 Project variables file 24
To include a description to be displayed in the attributes PROJECT_CONFIG table 69, 71
dialog box 122 projvars.cfg file 24
.I.

To modify the existing INSULAT attribute 119 Property source 143


To test the report definition 224 Property, definition of 138
To update insulation values 256 PS_ISO.LIB Class Library in ISOGEN 231
ps_user.rul 33
B

Label Position Files, creating 102


Labs PSDesign.s71 177
Adding a New Standard with Catalog Data 84 PSISOEND.DAT File in ISOGEN 231
Creating a Component Information Report 222 PSISOKEY.DAT file in ISOGEN 230
Define Guidelines for Other Component Types 189
Defining Guidelines for Other Component Types 189
Displaying Specification Breaks on Isos 244 R
Editing an Annotation Class Library 266 Records, finding and selecting 40
Updating Insulation Attributes 116 Relational databases 127
Using JSpace Expressions to Format a Pipeline Relational Operators in SQL 52
Callout 163 Report Configuration
Using Label Convert to Update Insulation Values 255 Defining a report in Object Reporter 216
Using SQL to Select Data 55 Processing Report Data on Specific Areas of a
LBLCVT, how the utility converts a cell 249 Model 214
Logical Operators 157 Report, defining in Object Reporter 216
report_e.dat file 217
report_m.dat file 217
M rimref.dat 102
Master volume definition file rimref.dat file 106, 108
Comparing master and discipline files 277 Rows

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

You might also like