Вы находитесь на странице: 1из 312

PlantSpace

Design Series
2004 Edition

Reference Guide for


Administrators
DAA020930-1/0004
PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Trademarks
AccuDraw, Bentley, the "B" Bentley logo, Interference Manager, JSpace, MDL, MicroStation,
MicroStation/J, MicroStation Schematics, MicroStation SE, PlantSpace, ProjectWise,
SELECTserver, SmartLine, and TriForma are registered trademarks; AutoISOGEN, Bentley
Navigator, Bentley Publisher, IsoExtractor, Model Streaming, and ProjectWise Integration Server
are trademarks; Bentley SELECT, ProjectWise, and SELECT Stream are registered service marks
of Bentley Systems, Incorporated or Bentley Software, Inc.

AutoPLANT is a registered trademark of Rebis. Rebis is a wholly owned subsidiary of Bentley


Systems, Incorporated.

SupportModeler is a trademark of Pelican Forge Software Corporation.

Intergraph is a registered trademark and PDS is a trademark of Intergraph Corporation.

ISOGEN is a registered trademark of Alias Limited, United Kingdom.

AutoCAD is a registered trademark of Autodesk, Inc.

Microsoft, Windows, and Windows NT are registered trademarks of the Microsoft Corporation
in the United States and/or other countries.

Adobe, Acrobat, and the Acrobat logo are registered trademarks of Adobe Systems Incorporated.

Netscape and Netscape Navigator are registered trademarks of Netscape Communications


Corporation in the United States and other countries. Netscapes logos and Netscape product and
service names are also trademarks of Netscape Communications Corporation, which may be
registered in other countries.

Oracle is a registered trademark of Oracle Corporation.

Primavera Project Planner and P3 are registered trademarks of Primavera Systems, Inc.

Victaulic is a registered trademark and Vic-Press 304 is a trademark of Victaulic Company of


America.

RealityWave and the RealityWave logo are registered trademarks and VizStream is a trademark of
RealityWave Inc.

Other brands and product names are used for identification purposes and are trademarks of their
respective owners.

Copyrights
Information in this manual is subject to change without notice and does not represent a
commitment on the part of Bentley Systems, Incorporated. The software in this document is

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators i
furnished under a license agreement or a non-disclosure agreement. It is against the law to copy
the software on any medium except as specifically allowed in the license or non-disclosure
agreement. No part of this manual may be reproduced or transmitted in any form or by any
means, electronic or mechanical, including photocopying or recording, for any purpose without
the written permission of Bentley Systems, Incorporated. If this manual is being received
electronically, you may print one copy for each licensed user, to whom the manual relates, for
informational, non-commercial purposes, provided that any copy of this document (or any
portion thereof) contains this copyright notice.

Copyright 1991-2004, Bentley Systems, Incorporated. All rights reserved. Including software, file
formats, and audiovisual displays; may only be used pursuant to applicable software license
agreement; contains confidential and proprietary information of Bentley Systems, Incorporated
and/or third parties which is protected by copyright and trade secret law and may not be
provided or otherwise made available without proper authorization. Published in the United
States of America.

Documentation Copyright 2004.

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

IGDS file formats Copyright 1981-1988 Intergraph Corporation. Used with permission.

Intergraph raster file formats Copyright 1993 Intergraph Corporation. Used with permission.

PIC001 Practice Copyright 2002 Process Industry Practices. Used with permission.

VizStream Platform Copyright 2001-2003 RealityWave Inc. Used with permission.

ISOGEN Copyright 1991-2003 Alias Limited. Used with permission.

ii PlantSpace Design Series Reference Guide for Administrators April 23, 2004
About This Reference Guide

About This Reference Guide


The PlantSpace Design Reference Guide for Administrators provides the
information necessary to set up the system tools that are required to allow the user
to access and model with the necessary information to do the engineering and
design of process plants.

Who This Book Is For


This book is for users who perform any of the following roles:

Oracle, Microsoft Access, or Microsoft SQL Server database


administrator
System engineer
PlantSpace system administrator

How This Book Is Organized


Chapter 1: Text Files for Setting Up the Design Series
Is a reference for the text files used in this program
Chapter 2: Database Schema
Is a reference for various tables used in your project database
Chapter 3: Piping Components
Is a reference of figures showing the plan and isometric orientations with their local
axes
Chapter 4: Configuration Data for Piping
Is a reference of the layout of all current pipe database tables
Chapter 5: Standard Built-In Functions
Is a reference of the standard user functions available in parametric modeling
Chapter 6: Parametric Modeling Primitives
Is a reference of the syntax for the PRIM functions that can be used in expert rules
Chapter 7: Flowcharting a Component Using Parametric Rule Files
Is a reference of the parametric rules that drive PlantSpace Piping, Cable Tray, and
Conduit

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators iii
About This Reference Guide

How to Use This Book


This is a quick reference for additional information that you may want or need as an
administrator. As such, refer to any of the chapters in any order as needed to
supplement the PlantSpace Design Series Administrator Guide.

Style Conventions
The following conventions explain the style of the text in this Reference Guide.

Style
Use in Text
Convention
ALL CAPITAL Names of acronyms and terms in object-oriented
LETTERS programming such as classes, properties, and methods
Letter Text that you type in a field, messages displayed online,
Gothic and programming code or syntax
Bold Names of commands, menus, buttons, and items that you
select
Italic Variables such as a filename, terms defined in text, and
names of books as references
Important information that the user must know (for
example, to avoid losing data)
Information of note that is useful to know

Related Documentation
The following related publications provide supporting information.
JSpace Concepts and Technical Reference Help
This online help provides a comprehensive overview of the JSpace object-oriented
environment. It also provides technical information about fundamental aspects of
JSpace that are employed in JSpace-based applications.
JSpace Class Editor User Help
This online help provides information on using the Class Editor and the technical
details about object classes, properties, methods, relationships, and inference rules.
JSpace MicroStation Connection User Guide
This Guide provides information on using the JSpace MicroStation Connection to
extract CAD model data and create JSpace object model files.

iv PlantSpace Design Series Reference Guide for Administrators May 19, 2004
About This Reference Guide

PlantSpace Design Series Setup Guide


This Guide provides the information you need to install and set up any PlantSpace
Design Series product. It includes information on license registration and
environment variables.
PlantSpace Design Series Administrator Guide
This Guide provides the technical information to set up your data source, configure
the system, and manage your project.

This Reference is to be used together with this Administrator Guide.

Online Documentation
User documentation is provided in online help on the Help menu of the
MicroStation menu bar. Administrator and tutorial (QuickStart Guide)
documentation is provided in PDF (Portable Document Format) files.
PDF Files
PDF files are platform independent. You can browse, search, and print them,
regardless of your operating system, by using the supplied Acrobat Reader utility
from Adobe Systems, Incorporated. PDF files of the documentation are displayed
on the Help menu on the MicroStation menu bar or in the
...\Bentley\Documentation directory created after the software is installed.

For more information on using the Acrobat Reader to browse, search, and print
PDF files, see the Help menu in the Acrobat Reader program.

Customer Support
Please contact your local authorized Bentley Value-Added Reseller (VAR) for
support. To find out the name and contact information for a Bentley VAR near you,
please call Bentley Systems, Incorporated at:

(800) BENTLEY or (610) 458-5000

For requests to obtain license keys, contact Bentley Systems, Incorporated:

Americas headquarters, Fax (610) 458-1060


European headquarters, Fax +31 23 556 0565
Asia-Pacific headquarters, Fax +61 3 9699 8677

For more information about the Bentley family of software products:

E-mail: family@bentley.com

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators v
About This Reference Guide

For support, problems, and questions regarding Bentley software:

E-mail: support@bentley.com

For more information about Bentley Systems, Incorporated, please visit our Internet
web site at:

http://www.bentley.com

vi PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Table of Contents

About This Reference Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iii

1. Text Files for Setting Up the Design Series

Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-1

Common Text File Features. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-1


Keyword/Value Pairs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-1
Comment Character . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-1
Escape Character. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-1
Line Continuation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2
Run-Time Keyword Evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-2

Text Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3


SETUP.INI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3
SETUP.CFG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3
PERSONAL.INI. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-3
INSTALL.SCR and REMOVE.SCR . . . . . . . . . . . . . . . . . . . . . . . . . 1-3
FILES.DAT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-4
FILES.SQL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1-4

2. Design Series Modeling Tables

Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-1

Quick Lookup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-2

Attribute Definition Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-3


Using Different Sets of Attributes for the
Same Component. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-4
Layers of the Attribute Definition Tables . . . . . . . . . . . . . . . . . 2-4
ATTRDEFN Table. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-5
Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-6
ATTRCDEF Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-6

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators vii
Table of Contents

Using the ATTRCDEF Table with the


ATTRDEFN Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-7
Controlling Options Available in the Placement
Mode Field Through the ATTRCDEF Table . . . . . . . . . . 2-7
ATTR_XXn and ATTRC_XXnTables . . . . . . . . . . . . . . . . . . . . . . . 2-8
ATTRC_XXn Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-8
Using the ATTR_XXn Tables with the
ATTRDEFN Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-9
Example of the REIHE Attribute . . . . . . . . . . . . . . . . . . . . . . . 2-9

Catalog Tables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-9


Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-10

Classes Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-10


Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-11

Configuration Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-12


User Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-12
PIPE_SYMB Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-12
PROJECT_CONFIG Table. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-14
PROJECT_VOLUMES Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-15

Description Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-15


Common Example of Usage. . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-16
Description Table Format . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-16
Default Component Descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-18
Automatic Expansion of Description Names . . . . . . . . . . . . . . . . . . 2-19
Example 1: Pipe Elbow Component (Class PIPE_PELB) . . . . 2-19
Example 2: Pipe Branch Component (Class PIPE_PBRN) . . . 2-19
Description Table Controlling Imperial and SI (Metric) Units. . . . . 2-20

Expert Rules Table . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-21


Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-21

Specification Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-22


Example . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-22

Tables Relating to the Attribute Standards and Codes . . . . . . . . . . . . . . . 2-22


MANUFACTURERS Table. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2-23

3. Diagrams of Parameterized Components

Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-1

viii PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Table of Contents

Dimensions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-1
Quick Lookup of Individual Components. . . . . . . . . . . . . . . . . . . . . 3-1

Drawings of Raceway Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-6

Drawings of Piping Components. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-7


Inline Pipe Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-8
Pipe Branches . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-13
Pipe Closures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-15
Pipe Elbows and Bends . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-15
Pipe Flanges and Clamps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-17
Pipe Reducers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-22
Pipe Taps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-23
Pipe Valves and Operators . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3-24

4. Configuration Data for Your Project Database Tables

Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-1
Quick Lookup by Database Table Name. . . . . . . . . . . . . . . . . . . . . . 4-1

Standards Delivered with Design Series . . . . . . . . . . . . . . . . . . . . . . . . . . 4-5

Layout of Pipe Database Tables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-6

Layout of Electrical Database Tables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4-33

5. Parametric Modeling Functions

Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-1
Explanation of Syntax . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-1
Types of Tokens . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-1
Array Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-3
Syntax Conventions Used in Function Statements . . . . . . . . . . 5-4
Argument Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-5
Examples of Syntax Summaries . . . . . . . . . . . . . . . . . . . . . . . . . 5-7

Introduction to Geometric Principles . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-13


Rotation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-13
Euler Angles. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-14
Matrixes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-14
Example 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-15
Example 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-15

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators ix
Table of Contents

Example 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-16
Example 4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-18
Direction Cosines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-18
Offset. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-20

Sample Rule File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-21

Quick Lookup by Function Name. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-26


Former Function Names . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-29

Functions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-30
ABS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-30
ABS_POINT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-30
ACOS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-31
ADOPT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-32
ASIN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-32
ATAN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-33
ATTRIBUTE_INFO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-33
BUD. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-36
BUILD_LABEL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-41
CELL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-44
CELL_DETAILS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-47
CHANGE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-53
CHAR_TO_INT (formerly CHAR$INT). . . . . . . . . . . . . . . . . . . . . 5-55
CHAR_TO_REAL (formerly CHAR$REAL) . . . . . . . . . . . . . . . . . 5-56
CLEAR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-57
COLLECT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-58
CONTROL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-59
COS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-63
DELETE_COMP. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-63
ENDSURF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-64
EVALUATE (formerly PARAM$VALU). . . . . . . . . . . . . . . . . . . . . 5-64
EXTRACT_VALUE (formerly LABEL$VALU) . . . . . . . . . . . . . . . 5-65
EXTRACT_VALUE2 (formerly LABEL$VALU2) . . . . . . . . . . . . . 5-66
INHERIT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-67
INSERT_LABEL (formerly TEXT_LAB) . . . . . . . . . . . . . . . . . . . . 5-68
LEAD_CHARS (formerly LEAD$CHARS). . . . . . . . . . . . . . . . . . . 5-70
LOAD_VALUE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-70
LOCAL_POINT (formerly LOCAL_PT). . . . . . . . . . . . . . . . . . . . . 5-72
LOG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-72
LOG_FILE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-73
MATRIX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-76
MAX (formerly MAX$VALU). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-82
MESSAGE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-82

x PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Table of Contents

MIN (formerly MIN$VALU) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-86


MOVE_COORD (formerly ASSEMBL) . . . . . . . . . . . . . . . . . . . . . 5-87
NUM_TO_CHAR (formerly ENCODE$VALU) . . . . . . . . . . . . . . 5-88
PARSE_LABEL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-89
PICK_POINT. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-91
PRIM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-92
QUERY . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-95
RELOCATE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-97
REPLACE_LABEL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-98
RETURN. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-99
SDNF_DATA. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-100
SELECT_CELL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-103
SIN. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-106
SQRT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-106
STR_EDIT (formerly STREDT) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-107
STR_FIND (formerly STRNUM) . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-108
STR_LENGTH (formerly STRG$SIZE) . . . . . . . . . . . . . . . . . . . . . 5-110
STR_MATCH (formerly STRING$MATCH) . . . . . . . . . . . . . . . . . 5-110
STR_MID0 (formerly EXTRACT) . . . . . . . . . . . . . . . . . . . . . . . . . . 5-111
STR_MID1 (formerly STRING$EXT) . . . . . . . . . . . . . . . . . . . . . . . 5-112
STR_REPLACE (formerly STRING$REPLACE). . . . . . . . . . . . . . 5-113
STRIP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-114
SUB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-114
SURFACE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-116
TAN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-118
TIME . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-119
TO_CHAR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-120
UNITS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-122
UOR_LOCAL_POINT (formerly UOR_LOCAL_PT). . . . . . . . . . 5-124
USER_INPUT (formerly PROMPT_VAL) . . . . . . . . . . . . . . . . . . . 5-125
VECTOR. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5-128

6. Parametric Modeling Primitives

Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-1
Quick Lookup by Name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-1

Primitives. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-3
ARC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-3
CIRCLE. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-3
CIRCELB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-4
CIRCLELL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-5
CONE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-6

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators xi
Table of Contents

CUBE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-7
CYLL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-7
DUCT_ECC_RED. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-8
DUCT_RED . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-9
DUCT_SEG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-10
ECONE. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-11
ECYLL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-12
ELBOW. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-12
ELLIPSE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-15
EPYRAM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-15
ETRCONE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-16
HEMISPH. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-17
LINE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-18
LINESTRING . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-19
PIPE_ECC_RED . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-20
PIPE_ELB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-21
PIPE_HUB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-24
PIPE_RED . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-24
PIPE_SEG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-25
POINT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-26
POLYCP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-26
PYRAM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-28
RECTANGLE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-28
RECTELL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-29
RIGHT_PRYSM. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-30
SEMI_PRYSM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-31
SHAPE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-32
SQTORND . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-33
TRCONE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6-34

7. Flowcharting a Component Using Parametric Rule Files

Understanding Rule Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-1


What Is a Rule File? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-1
What Is a Design Series Component? . . . . . . . . . . . . . . . . . . . . . . . . 7-1
How Is a Design Series Component Created?. . . . . . . . . . . . . . . . . . 7-2
How Is a Design Series Component Placed?. . . . . . . . . . . . . . . . . . . 7-2
What Types of Parametric Rules Are Used? . . . . . . . . . . . . . . . . . . . 7-4
Upper Level Rule. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-4
Second Level Rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-4
Sub Rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-5
What Does a Rule File Contain? . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-5
Variables. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-5

xii PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Table of Contents

Flags . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-5
Steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-6
How Does the System Execute a Rule File? . . . . . . . . . . . . . . . . . . . 7-6
How Do You Step Through a Rule? . . . . . . . . . . . . . . . . . . . . . . . . . 7-7

Flowcharting the Upper Level Rule CAP . . . . . . . . . . . . . . . . . . . . . . . . . 7-9

Flowcharting the Sub Rule GET_OD. . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-13

Flowcharting the Second Level Rule CAP_END . . . . . . . . . . . . . . . . . . . 7-16

Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7-20

Index

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators xiii
xiv PlantSpace Design Series Reference Guide for Administrators May 2004
1 Text Files for Setting Up the Design
Series

Introduction
This chapter explains how the system uses the text files referred to in the chapter
Configuring Your Project in the PlantSpace Design Series Administrator Guide. The Database
Setup Tool uses a number of text files to initialize and control program operation.
These files, unless otherwise noted in the text file descriptions, use various common
features.

Common Text File Features

Keyword/Value Pairs
Several of the text files employ the typical Windows style keyword = value format
for assigning a meaning (for example, value) to a program parameter (for example,
keyword). Related keyword/value pairs may be grouped using a bracketed name (for
example, [Group 1]).

Comment Character
A semi-colon (;) or an exclamation point (!) can be used to comment out a line or a
portion of a line. All text following the comment character is ignored.

Escape Character
A literal semi-colon (;) or an exclamation point (!) can be used within a line by
immediately preceding it with the escape character which is a back-slash (\).
Consider the examples shown.
x = y ; comment portion

April 23, 2004 PlantSpace Design Series Reference Guide for Administrators 1-1
1 Text Files for Setting Up the Design Series
Common Text File Features

x = z \; comment portion

In the first example, the keyword x has a value of y because the semi-colon
serves as a comment character, and so the comment portion is removed when the
file is parsed. However, in the second example, x has a value of z ; comment
portion because the escape character was used to create a literal semi-colon within
the value.

Line Continuation
A long line may be broken into multiple lines using the line continuation character,
which is a back-slash (\). Any comments or white spaces after the continuation
character are replaced by a single space and the line is concatenated with the
following line. Consider the example shown.
x = y \; comment portion
z \; comment portion

In this example, the keyword x has a value of y z ; comment portion because


the back-slash in the first line serves as a line continuation character. Thus, the
portion after the comment character (i.e., the semi-colon) is removed, and the
remaining portion of the line is joined with the following line.

Run-Time Keyword Evaluation


A special feature provided by the setup program allows the value for a particular
keyword to be dependent on the run-time value of one or more other keywords.

To use this feature, define the value of any required static text and one or more other
keywords enclosed by brackets and forward slashes (i.e., {//<keyword>//}). When
this keyword is used within the setup program, any embedded keywords in the value
are translated at that time.

The translated keywords, which themselves may be dependent on other keywords,


take on the most current value for that keyword (such as using input within a dialog
box). Consider the example shown.
DRIVE = s
DATA = {// DRIVE //} : / data /
DETAILS = details/
DETAIL_PATH = {// DATA //} {// DETAILS //}

1-2 PlantSpace Design Series Reference Guide for Administrators April 23, 2004
Text Files for Setting Up the Design Series
Text Files

Here the static translation of the DETAIL_PATH keyword is s:/data/details/. However,


if the setup program assigned a new value to the DRIVE keyword because of user
input in a dialog box, the run-time translation of DETAIL_PATH would reflect that
change.

Text Files

SETUP.INI
This file provides values to the Database Setup for a number of database-
independent program parameters. It also provides default values for many of the
Install dialog box fields. Values are stored in this file in keyword = value format. This
file is typically read by the program from the current working directory or from the
directory where the Database Setup program was loaded

SETUP.CFG
This file provides values to the Database Setup for a number of database-specific
program parameters. Values are stored in this file in keyword = value format.

PERSONAL.INI
Upon exiting the Database Setup, you can save the current parameters in a personal
configuration file if any of the parameters were changed from their initial values
during program execution.

When you save the file, you must remember to enter the extension for your
configuration file because the Database Setup tool does not add the extension.

You may assign any name to this new file; however, it is recommended that the INI
file be named setup.ini and stored in your usual working directory for the program. In
this case, the Database Setup will automatically load this file with its latest values.

Another alternative for user support personnel who must maintain multiple data
sources is to save the file with a name indicative of the database, such as
ORA_PROJ.INI or ACC_PROJ.INI. In this manner, the program will prompt the
user when the configuration file is required. The user can then select the proper file
for the database to be maintained.

INSTALL.SCR and REMOVE.SCR


These script files are used during database installation or re-installation to define the
steps required to create the database. Remove.scr lists the steps to remove, or clear

April 23, 2004 PlantSpace Design Series Reference Guide for Administrators 1-3
1 Text Files for Setting Up the Design Series
Text Files

out, an existing database for re-installation. Install.scr lists the steps to install the
database.

Both script files are typically specific to a particular database and so are located in
the database vendor specific directory. However, the Database Setup program by
default searches both the database vendor specific directory and the generic setup
directory for these files.

This allows a particular database to use a specific set of these files while other
databases might use the generic set or individual script file.

FILES.DAT
Files with the *.dat extension are database table creation and/or loading files.

These files do not use keyword/value pairs and do not support the escape character
or run-time keyword evaluation features described above. They are generic to all
databases and so are usually located in the generic setup directory.

FILES.SQL
Files with the *.sql extension are SQL command files used for setting privileges or
modifying settings within the database during installation. Any valid SQL command
for the database in question may be used. For this reason, they may be specific to a
particular database, but may also be generic to the extent that the SQL commands
are generic ODBC. Thus, they may be found in the generic setup directory as well as
the database vendor specific directory.

1-4 PlantSpace Design Series Reference Guide for Administrators April 23, 2004
2 Design Series Modeling Tables

Introduction
This is a reference for the Design Series modeling tables in your project database
mentioned in the chapter Configuring Your Project in the PlantSpace Design Series
Administrator Guide.

Be sure that you familiar with the MCS tables, the other set of tables that
(together with the Design Series modeling tables) make up your project
database. The MCS tables listed below are explained in the chapter Setting Up
and Maintaining Your Project Database in the Model Control System (MCS) Guide on
the TriForma Help menu or in the ...\Bentley\Documentation\TriForma
directory.

MCS storage tables


<product>_BUD Tables
DEL_<product>_BUD Tables
MCS management tables
BUD_CATALOG table
BUD_TABLE_ACCESS table
CHECKOUT table
CHECKOUT_HISTORY table
DBSETUP_INFO table
DEL_BUD_CATALOG table
HISTORY table
LEVEL_MAP table

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 2-1
2 Design Series Modeling Tables
Quick Lookup

LEVEL_MAP_ACCESS table
MODULES table
PROBLEM_LOG table
PROJECT_CONFIG table
PROJECT_VOLUMES table
SITE_CONFIG table
STAND_ATTR table
MCS sequence tables (or sequences in Oracle)
BUD_ID_SEQ table or BUD_ID sequence
CHECKOUT_ID_SEQ table or CHECKOUT_ID sequence
LEVEL_ID_SEQ table or LEVEL_ID sequence
MCS_LOCK_SEQ table or MCS_LOCK_SEQ sequence
PRBM_ID_SEQ table or PRBM_ID sequence

Quick Lookup
The Design Series Modeling tables are arranged in alphabetical order as follows:

Table Name Page


Attribute Definition Tables 2-3
ATTRDEFN Table 2-5
ATTRCDEF Table 2-6
ATTR_XXn Tables 2-8
ATTRC_XXn Tables 2-8
Catalog Tables 2-9
Classes Table 2-10
Configuration Tables 2-12
User Tables (USER, GROUP_CODE, 2-12
GROUP_USAGE)
PIPE_SYMB Table 2-12
PROJECT_CONFIG Table 2-14
PROJECT_VOLUMES Table 2-15

2-2 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Design Series Modeling Tables
Attribute Definition Tables

Table Name Page


Description Tables 2-15
Expert Rules Table 2-21
Specification Tables 2-21
Tables Relating to the Attribute Standards and Codes 2-22
MANUFACTURERS Table 2-23

Attribute Definition Tables


Attributes in PlantSpace refer to intelligence associated with graphics, not
MicroStation attributes like color or weight.

The attribute definition tables define the attributes associated with each component.
Within MicroStation, the attributes of a Design Series component are stored in a
text element. This text element is commonly referred to as the component label.

These tables are referenced to create, edit, read, and parse the component attributes.
When 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.

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.

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 2-3
2 Design Series Modeling Tables
Attribute Definition Tables

Using Different Sets of Attributes for the Same Component

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:

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

2-4 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Design Series Modeling Tables
ATTRDEFN Table

industry standard. The following diagram shows a simple breakdown of these


attribute definition tables.

The following sections describe each attribute definition table in more detail.

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

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 2-5
2 Design Series Modeling Tables
Attribute Definition Tables

Example

The Pipe product adds records with a LEVEL_1 name of PIPE.

Column Name Comment


LEVEL_1 Component Classification
LEVEL_2 Component Classification
LEVEL_3 Component Classification
LEVEL_4 Component Classification
LEVEL_5 Component Classification
ATTR_NAME Attribute Name
UNITS Inch, MM, Degrees, etc.
CASE U, L, N
ATTR_TYPE Char, Integer, Real
LBL_POS Label Position
COL_WIDTH Width in BUD table
LBL_WIDTH Not currently used
DEC_PLACES Digits after decimal point
DESCRIPTION Prompt for the user interface
BOX_ORDER User interface box number
DEFAULT_VALUE Default value
INPUT_METHOD Keyin, Query, Values, etc.
OVERRIDE_ALLOWED Can the user override a value? (Y/N)
VALID_MASK Validation mask
GRAPHICS_PAR Is attribute graphics-related?
WRITE_PRIVILEGE Not currently used
READ_PRIVILEGE Not currently used
APP_FLAGS Application-dependent
BUD_FLAGS Reserved for user

ATTRCDEF Table
The ATTRCDEF table (Layer 1 attribute definition table) is used only when the
user selects the catalog-driven option from within Design Series. Because the

2-6 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Design Series Modeling Tables
ATTRCDEF Table

ATTRCDEF table is a Layer 1 attribute definition table, it overlays the ATTRDEFN


table so that only certain columns of the ATTRDEFN table are used.

Using the ATTRCDEF Table with the ATTRDEFN Table

As you recall, if a user selects the Specifications option in the Placement Mode field
from within Design Series, the ATTRDEFN table is used. However, if the user
selects the Catalogs option, the ATTRCDEF table overlays the ATTRDEFN table.

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 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 BEMCR 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 Specifications option in the
Placement Mode field of the Place Component dialog box, the user must select a
specification before placing the elbow. If the user selects the Catalogs option, a
specification is not required before placing the elbow.

Controlling Options Available in the Placement Mode Field Through


the ATTRCDEF Table

You can control whether to make specifications or catalogs available to users in the
Placement Mode field of 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 the project database by using the SQL
script file, Delete_attrcdef.sql. This file is in your

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 2-7
2 Design Series Modeling Tables
Attribute Definition Tables

...\{ProjectName}\dbload\{Access or Oracle or Sqlsrvr} directory. This


action causes the Catalogs option to be 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.

ATTR_XXn and ATTRC_XXnTables


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.

The value of OVERLAY_SUFFIX in the STANDARD_DESC table equals


XXn of each ATTR_XXn table. STANDARD_DESC is a description table
covered in the section Description Tables on page 2-15.

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.

ATTRC_XXn Tables

The ATTRC_XXn tables are used together with the ATTRCDEF table. Because
each ATTRC_XXn table is a Layer 2 attribute definition table, it overlays the
ATTRCDEF table so that only certain columns of the ATTRCDEF table are used.

2-8 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Design Series Modeling Tables
Catalog Tables

Using the ATTR_XXn Tables with the ATTRDEFN Table

The Layer 2 attribute definition tables enable a user to configure the Design Series
label for that standard. The standards attribute definition (ATTR_XXn) tables
overlay the ATTRDEFN table. To access any of these tables, the user simply selects
the standard from the attributes dialog box. If the selected standard corresponds to
a standards attribute definition table, the attributes dialog box displays the attributes
that are specific to that standard.

Design Series uses the standard attribute definition tables ATTRC_XXn with
the ATTRCDEF table in the same manner as described in the previous
sections.

Example of the REIHE Attribute

The European Data Set standard has an attribute called REIHE, which is specific
only to the European Data Set standard. Therefore, when the user is placing pipe
components in Design Series, the user should see only the REIHE attribute when
using the European Data Set standard. REIHE should not be displayed with any
other standard.

Refer to the section Editing the Text Files Containing Attribute Definitions on page
2-12 in the chapter "Configuring Your Project" in the PlantSpace Design Series
Administrator Guide. The REIHE attribute is added to all pipe components in the
ATTRDEFN table that are required to display the attribute. However, they will be
commented out by setting the APP_FLAGS to BEMCR. The REIHE attribute is
added to the same pipe components in the ATTR_EDS table. However, the
application flags will not be set (that is, APP_FLAGS is empty).

When the user places a pipe component in Design Series and selects European Data
Set as the standard, the ATTR_EDS table overlays the ATTRDEFN table and the
APP_FLAGS is empty, resulting in the display of the REIHE attribute.

Catalog Tables
The catalog tables contain dimensional data for all of the components. Each table
contains data for a logical grouping of components of a certain product. For
example, the table PIPE_PBRN contains dimensional data for piping branches, and
the table PIPE_PELB contains dimensional data for piping elbows.

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 2-9
2 Design Series Modeling Tables
Classes Table

Example

In pltspace.mdb are sample catalog tables such as the following.

Classes Table
The CLASSES table defines all BUDs (Basic Unit of Design) and their associated
attributes, namely: rule name, table name, and corresponding database and
component type. The CLASSES table (in the classes.dat and pip_cls.dat files) either
defines or controls the following:

Defines the hierarchy of components. The LEVEL_1 through


LEVEL_5 columns are used to define hierarchical relationships of
the components. For example, a piping elbow has
LEVEL_1=''PIPE'' and LEVEL_2=''PELB''.
Controls the building of components. The component hierarchy is
used to identify the parametric rules used to build the component.
The name of the parametric rule is stored in the BUD_RULES
column. (BUD is the acronym for Basic Unit of Design.) The
BUD_TYPE column uniquely identifies each type of component.

2-10 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Design Series Modeling Tables
Classes Table

Defines the colors used by the Model Control System (MCS). Three
columns in the CLASSES table called BUD_COLOR,
CHECKOUT_COLOR, and LOCKED_COLOR are used when
components are checked into or out of the project database.

Column Name Description


BUD_COLOR Assigned to components when they are
checked into or appended to the database
LOCKED_COLOR Assigned to components that have been
locked for exclusive update (for example,
components that are in the primary file after
they were checked out)
CHECKOUT_COLOR Assigned to components that are not locked
(for example, components that are in a
reference file after they were checked out)

The piping components, as delivered, have the setting -1 for these


three values, which disables the color assignment capability.
Enables you to display the class (component type) name or the
common name in the title bar of the attributes dialog box.

Example

The Pipe product adds records with a LEVEL_1 name of PIPE.

Column Name Comment Example


LEVEL_1 Component Classification PIPE
LEVEL_2 Component Classification PVLG
LEVEL_3 Component Classification RED
LEVEL_4 Component Classification
LEVEL_5 Component Classification
BUD_TYPE Component Type Identification PIPE_PVLG
BUD_TABLE Component Storage Table PIPE_BUD
BUD_RULES Parametric Definition VALVE
DATABASE For compatibility PIPE
COMPTYPE For compatibility PVLG
BUD_COLOR Component Default Color 3

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 2-11
2 Design Series Modeling Tables
Configuration Tables

Column Name Comment Example


CHECKOUT_COLOR MCS Check-out Color 5
LOCKED_COLOR MCS Locked Component Color 7
DESCRIPTION Component name generic valve

Configuration Tables
Configuration tables are created from *.dat files that pertain to the configuration of
the project database. These are project-specific tables that control user check-in/
check-out, and assign project volumes, project working units, site identification, and
pipe component symbology. The following tables are involved in configuration.

User Tables
Three user tables are provided as follows:

USERS table
Stores the names of users who can access the Design Series
database. The USERS table controls the products that users are
allowed to check out and check in based on the group ID assigned
to them from the GROUP_USAGE table.
GROUP_CODE Table
The GROUP_CODE table assigns a code letter to each Design
Series product. This code letter is used by the GROUP_USAGE
table.
GROUP_USAGE Table
The GROUP_USAGE table enables you as the Design Series
administrator to create group names and assign group codes from
the GROUP_CODE table to those names. The group usage names
are then assigned to the users in the USERS table.

PIPE_SYMB Table
The PIPE_SYMB table stores the pipe line system or service names and assigns a
line weight, color, line style, and level to each system or service. This table is
accessed every time a user places a pipe component in a 3D model, and works as
follows:

2-12 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Design Series Modeling Tables
PIPE_SYMB Table

If the system in the component label matches a system in the


PIPE_SYMB table, that component is assigned the line weight,
color, line style, and level for that pipe line system.
If the system does not match any of the systems in the
PIPE_SYMB table, the pipe line is placed with the default color red.

The PIPE_SYMB table is in the Symbolgy.dat file (spelled this way to keep the file
name to eight characters), in your ...\{ProjectName} \dbload\data\pipe directory.
The table contains the default color symbology delivered with the software.
However, you can customize the colors designated for each system by editing this
file.

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 2-13
2 Design Series Modeling Tables
Configuration Tables

To customize the symbology, see Example: Setting Symbology by System on page


2-36 in the chapter "Configuring Your Project" in the PlantSpace Design Series
Administrator Guide.

PROJECT_CONFIG Table
The PROJECT_CONFIG table identifies the properties for the system units and
site ID of your project. This table is set from either the imperial or SI (metric) file:

Prjcfg_e.dat in your ...\{ProjectName}\dbload\data\core\english


directory

2-14 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Design Series Modeling Tables
PROJECT_VOLUMES Table

Prjcfg_m.dat in your ...\{ProjectName}\dbload\data\core\metric


directory

The system units and working units defined in the PROJECT_CONFIG table
must match the system units and working units defined in the following files:

Prjcfg_e.dat file and ds_seede.dgn for imperial


Prjcfg_m.dat and ds_seedm.dgn for SI

PROJECT_VOLUMES Table
The PROJECT_VOLUMES table contains a list of project specific areas defined by
the master volume definition file. Users can define their own discipline volume
definition files containing areas to be specified during a Model Control System
(MCS) operation.

Description Tables
The Description tables define the codes and descriptions for the common attributes
of the most frequently used component types. The Description tables affect the
Value column of the attributes dialog box. Description tables also enable you to
store an abbreviation but display a long description to users, or the reverse.

In the following example, by editing the Description table containing the value for
the End Preparation attribute, users will see either the full name BUTT WELD or
the abbreviation BW (or if not an abbreviation, the actual value in the label).

Full Name

Abbreviation

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 2-15
2 Design Series Modeling Tables
Description Tables

This configuration is useful in this example because if your company uses lengthy
full names and you need to conserve space in the Value field, you can set up
abbreviations.

Common Example of Usage

Most piping components have an attribute EPREP_1 that stores the type of end
preparation for the component. You can enter the following coded values for
EPREP_1:

BW for BUTT WELD


FL for FLANGED
SW for SOCKET WELD

When the system converts the 3D model components into JSpace objects, the
coded values automatically expand into their full descriptions and are stored in the
COMP_DESC property of the object.

Description Table Format


Each description table has two columns (or fields) named Code and Description,
and optionally contains other columns. The names of the database tables are defined
in the ATTR_DESC table in your project database. (You can view this table in the
delivered sample database, pltspace.mdb.) For example, EPREP1 in the first column

2-16 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Design Series Modeling Tables
Description Table Format

is the attribute or property name. CONN_DESC is the database table name. The
next two columns are the Code and Description.

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 2-17
2 Design Series Modeling Tables
Description Tables

The definition and data values for all description tables are in the glossary.dat file,
which is in your ...\{ProjectName} \dbload\data directory.

Default Component Descriptions


The ams_user.lib and ams.lib class libraries expand default descriptions for some of
the more commonly used piping classes. Examples of classes with expanded
descriptions are:

Class Name Component Type


PIPE_PBRN_USER Branch
PIPE_PCAP_USER Cap
PIPE_PCRD_USER Concentric Reducer
PIPE_PELB_USER Elbow
PIPE_PERD_USER Eccentric Reducer
PIPE_PFLG_USER Flange
PIPE_PGKT_USER Gasket
PIPE_PSWE_USER Eccentric Swage

2-18 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Design Series Modeling Tables
Automatic Expansion of Description Names

Class Name Component Type


PIPE_PSWG_USER Swage
PIPE_PVLG_USER Generic Valve
PIPE_PVLV_USER Standard Valve

Automatic Expansion of Description Names


Design Series uses the Description tables to expand coded values (in the attribute
label) to their full descriptive names during placement and editing. The automatic
expansion process consists of:

Description tables in the project database that provide the


descriptions for the coded values
ams.lib and ams_user.lib, the delivered Design Series class libraries
Several JSpace expressions that provide sources of values for
properties and are defined by using the JSpace Class Editor
The DB_QUERY built-in function that performs the lookup in the
database tables
A system configuration variable that must be set to the ODBC data
source for the database

Example 1: Pipe Elbow Component (Class PIPE_PELB)

The pipe elbow component has the following property values:

BUD_TYPE = "PIPE_PELB"
B_ANGLE = 90
B_RADIUS = "L"
CONN_1 = "BW"

These coded values translate into the expanded component description:


COMP_DESC = "ELBOW, 90 DEG., LONG RAD., BUTT WELD"

Example 2: Pipe Branch Component (Class PIPE_PBRN)

The PIPE_BRANCH component has the following property values:

BUD_TYPE = "PIPE_PBRN"

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 2-19
BR_TYPE = "ITE"
CONN_1 = "SD"

These coded values translate into the expanded component description:


COMP_DESC = "INSTRUMENT TEE, SOLDERED"

Description Table Controlling Imperial and SI (Metric) Units


When you display fields with dimensions, you can display the values in imperial or SI
units. By clicking the Display Nominal As button in the attributes dialog box, you
can switch back and forth between imperial and SI values.

The values shown, for example for Size 1 and Size 2, are controlled by the
Psnomdsc.txt file in the ...\Bentley\Program\DesignSeries\default directory.
During the installation of Design Series when you select the SI (metric) or Imperial
radio button, the system copies either the SI contents in Psnomdscm.txt or the
imperial contents in Psnomdsce.txt to the Psnomdsc.txt file. This file tells the
system where to find the appropriate table in the project database to display the SI
or imperial value in the Value column of the attributes dialog box.

For example for the attribute SIZE_1, the system is instructed to go to the
PIPE_DIAMETER table in the project database to get the SI value from the

2-20 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Design Series Modeling Tables
Expert Rules Table

column METRIC_ND that corresponds to the imperial value in the column


SIZE_1.

Expert Rules Table


The EXPERT_RULES table contains all the expert system rules, which are the
parametric definitions used to create parametric components.

Some parametric components are placed by using JSpace class definitions,


instead of rules.

The CLASSES table specifies the parametric rule used to build each component.
Modeling rules have an application name PSDS. Rules are selected based on the
following:

The rule name (RULE_NAME)


The rule name is taken from the BUD_RULES column of the
CLASSES table for the particular BUD_TYPE.
The two search codes (SUBCODE and SUBCODE2)
The product (PRODUCT)
The product name is taken from the LEVEL_1 column of the
CLASSES table.
The application (APPLICATION)

Example

The Pipe product adds records with a PRODUCT name of PIPE.

Column Name Comment


RULE_NAME Name of the rule
SUBCODE1 Classification
SUBCODE2 Classification
SEQ_NUM Sequence used for processing the
rules
RULE_TXT Rule expressions
PRODUCT Name of the product
APPLICATION Name of the application

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 2-21
2 Design Series Modeling Tables
Specification Tables

Specification Tables
Piping specifications are contained in *_SPEC tables, where * is the name of the
catalog table. You can populate these tables by using the Specification Maker
program, and you should make all changes to the data contained in these tables by
using Specification Maker.

Example

In pltspace.mdb are sample *_SPEC tables such as the following table.

Tables Relating to the Attribute Standards and Codes


These tables provide links between the standards and codes to prevent the need for
multiple copies of data.

At this time, only one table is provided.

2-22 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Design Series Modeling Tables
MANUFACTURERS Table

MANUFACTURERS Table
This table maps a manufacturer standard name to a generic standard name (for
example, that piping uses for an end preparation).

Column Name Comment Example


MANUFACTURER Specific standard TUBE
STNDRD Generic standard ANSI

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 2-23
2-24 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
3 Diagrams of Parameterized
Components

Introduction
This chapter displays diagrams of the parameters for raceway and piping
components. The information on the piping components expands on the piping
components described in the chapter Configuring Your Project on page 2-1 in the
PlantSpace Design Series Administrator Guide.

Dimensions
The following diagrams show connect point locations and critical dimensional
parameters excluding those that you would look up in common tables such as pipe
outside diameters (PIPE_DIAMETER) and valve operator data (PIPE_PVOP and
PIPE_PVLT).

The dimensions are in the table name listed below the name of the drawing.
For more information on the tables, see the chapter Configuration Data for Your
Project Database Tables on page 4-1.

Quick Lookup of Individual Components


For quick lookup, the components are arranged by:

Raceway components
Piping components

Because the piping components section is large, they are grouped in


alphabetical order by tool box name to make it easy to locate them. Exception:
pipe end preparations are not a tool box. They apply to all the pipe
components.

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 3-1
3 Diagrams of Parameterized Components
Introduction

Component Type Table Name Page


Raceway Components
Condulet Coupling CNDT_CNDLSP 3-6
Condulet Elbow CNDT_CNDLLP 3-6
Condulet Tee CNDT_CNDLTP 3-6
Coupling CNDT_CND_CPLG 3-6
Inline Pipe Components
Adapter PIPE_PADP 3-8
Basket Strainer PIPE_PSTR 3-9
Bellows PIPE_BLLW 3-10
Coupling PIPE_PCPL 3-10
Flow Meters: PIPE_FMTR
Vertical Type - Rotameter 3-11
Horizontal Type - Water Meter 3-11
Horizontal Type - Rotary Piston Meter 3-12
Inline Strainer PIPE_PSTR 3-9
Lateral Y Strainer PIPE_PSTR 3-9
Nipple PIPE_PNPL 3-10
Spool PIPE_PSPL 3-10
Tee Strainer PIPE_PSTR 3-9
Trap PIPE_PTRP 3-8
Union PIPE_PUNI 3-10
User-defined Inline Component [none] 3-8
Pipe Branches
Combination Wye PIPE_PBRN 3-14
Couplet PIPE_PBRN 3-14
Cross PIPE_PBRN 3-13
Double Wye PIPE_PBRN 3-14
Elbolet PIPE_PBRN 3-14
End_olet PIPE-PBRN 3-14
Flange-olet PIPE_PBRN 3-14
Half Coupling PIPE_PBRN 3-14

3-2 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Diagrams of Parameterized Components
Quick Lookup of Individual Components

Component Type Table Name Page


Instrument Tee PIPE_PBRN 3-14
Lateral PIPE_PBRN 3-13
Laterolet PIPE_PBRN 3-14
Nipolet PIPE_PBRN 3-14
Reinforced Branch PIPE_PBRN 3-14
Sockolet PIPE_PBRN 3-14
Sweepolet PIPE_PBRN 3-14
Tee PIPE_PBRN 3-13
Tee Wye PIPE_PBRN 3-14
Thredolet PIPE_PBRN 3-14
True Wye PIPE_PBRN 3-13
Unreinforced Branch PIPE_PBRN 3-14
Weldolet PIPE_PBRN 3-14
Pipe Closures
Cap PIPE_CAP 3-15
Plug PIPE_PPLG 3-15
Pipe Elbows and Bends
Buttweld Bend PIPE_PBND 3-15
Elbow PIPE_PELB 3-15
Point-of-Use Bend PIPE_POUB 3-16
Point-of-Use Straight PIPE_POUS 3-16
Return Bend PIPE_RBND 3-16
S-Bend PIPE_PSBN 3-16
Pipe Flanges and Clamps
AWWA Hub, Threaded, Slip-on PIPE_PFLG 3-20
AWWA Ring PIPE_PFLG 3-20
Blind PIPE_PFLG 3-20
Clamp PIPE_CLMP 3-21
Ferrule PIPE_FERR 3-21
Gasket PIPE_PGKT 3-17
Lap-Joint (Stub-End) PIPE_STUBLEN 3-19
Lap-Joint (Flange) PIPE_PFLG

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 3-3
3 Diagrams of Parameterized Components
Introduction

Component Type Table Name Page


O-Ring PIPE_ORNG 3-21
Orifice Plate PIPE_POPL 3-17
Orifice Slip-On PIPE_PFLG 3-18
Orifice Threaded PIPE_PFLG 3-18
Orifice Welding Neck PIPE_PFLG 3-18
Ring Spacer PIPE_PFLG 3-17
Single Blind PIPE_PFLG 3-17
Slip-On PIPE_PFLG 3-20
Socket Weld PIPE_PFLG 3-20
Spectacle Blind PIPE_PFLG 3-18
Threaded PIPE_PFLG 3-20
Victaulic PIPE_PFLG 3-20
Weld Neck PIPE_PFLG 3-20
Pipe Reducers
Bushing PIPE_PBUS 3-22
Insert PIPE_PINS 3-22
Reducer PIPE_PRED 3-22
Swage PIPE_PSWG 3-22
Pipe Taps
Instrument Tap PIPE_INST 3-23
Pressure Tap PIPE_PTAP 3-23
Tangential Tap PIPE_TTAP 3-23
Pipe Valves and Operators
3 Way Valve PIPE_PVLV 3-24
4 Way Valve PIPE_PVLV 3-24
Angle Valve PIPE_PVLV 3-24
Ball Valve PIPE_PVLV 3-25
Bleeder Trip Valve PIPE_PVLV 3-26
Butterfly Valve PIPE_PVLV 3-25
Check Valve PIPE_PVLV 3-24
Control Valve PIPE_PVLV 3-25
Diaphragm Valve PIPE_PVLV 3-25

3-4 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Diagrams of Parameterized Components
Quick Lookup of Individual Components

Component Type Table Name Page


Gate Valve PIPE_PVLV 3-25
Globe Valve PIPE_PVLV 3-25
Knife Valve PIPE_PVLV 3-25
Needle Valve PIPE_PVLV 3-25
Plug Valve PIPE_PVLV 3-25
Pressure Seal Gate Valve PIPE_PVLV 3-25
Pressure Seal Globe PIPE_PVLV 3-25
Pressure Seal Pinch Valve PIPE_PVLV 3-25
Relief Valve PIPE_PVLV 3-25
Chain Operator PIPE_PVOP 3-27
Cylinder Operator PIPE_PVOP 3-27
Diaphragm Operator PIPE_PVOP 3-27
Gearbox Operator PIPE_PVOP 3-27
Gear Operator PIPE_PVOP 3-28
Handwheel Operator PIPE_PVOP 3-29
Lever Operator PIPE_PVOP 3-30
Motor Operator PIPE_PVOP 3-30
Motor/L120_10 Operator PIPE_PVLT 3-30
End Preparations for All Pipe Components
Bell PIPE_PEND 3-31
Beveled PIPE_PEND 3-32
Compression PIPE_PEND 3-32
Female Thread PIPE_PEND 3-31
Ferrule PIPE_PEND 3-32
Flanged PIPE_PEND 3-31
Grooved PIPE_PEND 3-32
Male Thread PIPE_PEND 3-31
Plain PIPE_PEND 3-32
Press Fit PIPE_PEND 3-31
Socket Weld PIPE_PEND 3-31

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 3-5
3 Diagrams of Parameterized Components
Drawings of Raceway Components

Drawings of Raceway Components

Coupling Condulet Coupling

(table CNDT_CND_CPLG) (table CNDT_CNDLSP)

Condulet Elbow Condulet Tee

(table CNDT_CNDLLP) (table CNDT_CNDLTP)

3-6 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Diagrams of Parameterized Components
Drawings of Piping Components

Drawings of Piping Components


The drawings of piping components are arranged in alphabetical order as follows:

Inline pipe components


Pipe branches
Pipe closures
Pipe elbows and bends
Pipe flanges and clamps
Pipe reducers
Pipe symbols
Pipe taps
Pipe valves

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 3-7
3 Diagrams of Parameterized Components
Drawings of Piping Components

Inline Pipe Components

Trap Adapter

(table PIPE_PTRP) (table PIPE_PADP)

User-defined Inline Component

(no table)

3-8 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Diagrams of Parameterized Components
Inline Pipe Components

(Inline Pipe Components continued)

Basket Strainer

(table PIPE_PSTR)

Inline Strainer

(table PIPE_PSTR)

Lateral Y Strainer Tee Strainer

(table PIPE_PSTR) (table PIPE_PSTR)

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 3-9
3 Diagrams of Parameterized Components
Drawings of Piping Components

(Inline Pipe Components continued)

Nipple
(table PIPE_PNPL) Union
(table PIPE_PUNI)

Coupling

(table PIPE_PCPL)
Bellows
(table PIPE_BLLW)

Spool
(table PIPE_PSPL)

3-10 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Diagrams of Parameterized Components
Inline Pipe Components

(Inline Pipe Components continued)

Flow Meter
Vertical Type: Rotameter

(table PIPE_FMTR)

Flow Meter
Horizontal Type: Water Meter

(table PIPE_FMTR)

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 3-11
3 Diagrams of Parameterized Components
Drawings of Piping Components

(Inline Pipe Components continued)

Flow Meter
Horizontal Type: Rotary Piston Meter

(table PIPE_FMTR)

3-12 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Diagrams of Parameterized Components
Pipe Branches

Pipe Branches

Tees, including Reducing


Crosses, including Reducing
(table PIPE_PBRN)
(table PIPE_PBRN)

Laterals True Wyes

(table PIPE_PBRN) (table PIPE_PBRN)

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 3-13
3 Diagrams of Parameterized Components
Drawings of Piping Components

(Pipe Branches continued)

Tee Wyes
Double Wyes
(table PIPE_PBRN) (table PIPE_PBRN)

A or B: Olets, Saddles, and Outlets. The length can be


either P3 or P5. For whatever value you use for one
specification, the other value should be zero.
Note: Both P3 and P5 can be zero (for example, in
the Reinforced Branch and Unreinforced Branch).
C. Olets, including Laterolets

Combination Wyes (table PIPE_PBRN)

(table PIPE_PBRN)

3-14 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Diagrams of Parameterized Components
Pipe Closures

Pipe Closures

Cap

Plug (table PIPE_PCAP)


(table PIPE_PPLG)

Pipe Elbows and Bends

Elbow (standard elbow including pipe


bend, reducing elbow, trimmed elbow,
street elbow, and mitered elbow) Buttweld Bend

(table PIPE_PBND)
(table PIPE_PELB)

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 3-15
3 Diagrams of Parameterized Components
Drawings of Piping Components

(Pipe Elbows and Bends continued)

Return Bend
Point-of-Use Straight
(table PIPE_RBND)
(table PIPE_POUS)

S-Bend
(table PIPE_PSBN)

Point-of-Use Bend

(table PIPE_POUB)

3-16 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Diagrams of Parameterized Components
Pipe Flanges and Clamps

Pipe Flanges and Clamps

Detail at Point A

Gasket Orifice Plate


(table PIPE_PGKT) (table PIPE_POPL)

Single Blind
Ring Spacer

(table PIPE_PFLG) (table PIPE_PFLG)

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 3-17
3 Diagrams of Parameterized Components
Drawings of Piping Components

(Pipe Flanges and Clamps continued)

Spectacle Blind

(table PIPE_PFLG)

Single Blind, Spectacle Blind, Ring Spacer

(table PIPE_PFLG)
P3 - (minus) 1/16 "
if P5 = 0

Orifice Threaded, Orifice Slip-On Orifice Welding Neck


(table PIPE_PFLG) (table PIPE_PFLG)

3-18 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Diagrams of Parameterized Components
Pipe Flanges and Clamps

(Pipe Flanges and Clamps continued)

Stub-End Flange

(table PIPE_STUBLEN) (table PIPE_PFLG)

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 3-19
3 Diagrams of Parameterized Components
Drawings of Piping Components

(Pipe Flanges and Clamps continued)

Weld Neck

(table PIPE_PFLG)
Blind, Victaulic, AWWA Ring

(table PIPE_PFLG)

P3 - (minus) 1/16 " P3 - (minus) 1/16 "


if P5 = 0 if P5 = 0

Socket Weld, Threaded, Slip-On AWWA Hub, Threaded, Slip-On


(table PIPE_PFLG) (table PIPE_PFLG)

3-20 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Diagrams of Parameterized Components
Pipe Flanges and Clamps

(Pipe Flanges and Clamps continued)

Ferrule O-Ring

(table PIPE_FERR) (table PIPE_ORNG)

Clamp

(table PIPE_CLMP)

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 3-21
3 Diagrams of Parameterized Components
Drawings of Piping Components

Pipe Reducers

Swage
(table PIPE_PSWG)

Reducer
(table PIPE_PRED)

Insert Bushing

(table PIPE_PINS) (table PIPE_PBUS)

3-22 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Diagrams of Parameterized Components
Pipe Taps

Pipe Taps

Instrument Tap Pressure Tap


Note: Pressure Tap (Ships Axis) is
(table PIPE_INST) included.

(table PIPE_PTAP)

Tangential Tap

(table PIPE_TTAP)

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 3-23
3 Diagrams of Parameterized Components
Drawings of Piping Components

Pipe Valves and Operators

3 Way Valve 4 Way Valve


(table PIPE_PVLV) (table PIPE_PVLV)

Angle Valve
Check Valve
(table PIPE_PVLV)
(table PIPE_PVLV)

3-24 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Diagrams of Parameterized Components
Pipe Valves and Operators

(Pipe Valves and Operators continued)

Valve Showing Conditioning, Diaphragm,


Gate, Globe, Knife, Needle, Pressure Seal
Gate, Pinch, and Pressure Seal Globe
Valve Showing Ball, Butterfly,
(table PIPE_PVLV) Control, and Plug

(table PIPE_PVLV)

Relief Valve

(table PIPE_PVLV)

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 3-25
3 Diagrams of Parameterized Components
Drawings of Piping Components

(Pipe Valves and Operators continued)

Bleeder Trip Valve (front view)

(table PIPE_PVLV)

Bleeder Trip Valve (side view)

(table PIPE_PVLV)

3-26 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Diagrams of Parameterized Components
Pipe Valves and Operators

(Pipe Valves and Operators continued)

Cylinder Operator

(table PIPE_PVOP)
Chain Operator

(table PIPE_PVOP)

Diaphragm Operator Gearbox Operator

(table PIPE_PVOP) (table PIPE_PVOP)

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 3-27
3 Diagrams of Parameterized Components
Drawings of Piping Components

(Pipe Valves and Operators continued)

Gear Operator

(table PIPE_PVOP)

3-28 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Diagrams of Parameterized Components
Pipe Valves and Operators

(Pipe Valves and Operators continued)

Handwheel Operator

(table PIPE_PVOP)

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 3-29
3 Diagrams of Parameterized Components
Drawings of Piping Components

(Pipe Valves and Operators continued)

Lever Operator

Motor Operator (table PIPE_PVOP)


(table PIPE_PVOP)

Motor/L120_10 Operator
including MSMB, MSMB3, ML120_20,
ML120_40, ML120_80, ML120_190

(table PIPE_PVLT)

3-30 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Diagrams of Parameterized Components
Pipe Valves and Operators

End Preparations for All Pipe Components

Socket Weld Bell


(table PIPE_PEND) (table PIPE_PEND)

Female Thread Male Thread


(table PIPE_PEND) (table PIPE_PEND)

Flanged Press Fit


(table PIPE_PEND) (table PIPE_PEND)

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 3-31
3 Diagrams of Parameterized Components
Drawings of Piping Components

(End Preparations continued)

Plain
(table PIPE_PEND)

Grooved

(table PIPE_PEND)

Beveled

(table PIPE_PEND)

Ferrule
(table PIPE_PEND)

Compression

(table PIPE_PEND)

3-32 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
4 Configuration Data for Your Project
Database Tables

Introduction
This chapter expands on the chapter Configuring Your Project in the PlantSpace Design
Series Administrator Guide. This chapter describes the format of the pipe and electrical
database tables.

The component names are arranged in alphabetical order. However, you can
also search by the database table name in the following quick lookup section.

Quick Lookup by Database Table Name


For quick lookup, the database table names are arranged in alphabetical order
as follows. You can search on the data load file name through the Index at the
end of this Reference Guide.

Database Table Name Page


AVLV_BODY 4-32
AVLV_BODY_NONE 4-32
AVLV_MANIFOLD 4-32
AVLV_PARS 4-32
AVLV_STANDARD 4-32
BOLT_STANDARDS 4-7
CNDT_BEND_TYPE 4-33
CNDT_CND_CPLG 4-35
CNDT_CND_DIA 4-34
CNDT_CND_ELS 4-34
CNDT_CNDLLP 4-34

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 4-1
4 Configuration Data for Your Project Database Tables
Introduction

Database Table Name Page


CNDT_CNDLSP 4-34
CNDT_CNDLTP 4-35
CNDT_CODE 4-34
CNDT_SYMB 4-27
DIAMETER_TABLES 4-21
DWV_DIAMETER 4-21
EQUIV_NOM_LENGTH 4-19
EQUIV_NOM_SIZE 4-19
EQUIV_THICK 4-19
FRP_DIAMETER 4-21
GASKET_THICKNESS 4-15
HDPE_DIAMETER 4-21
IRON_DIAMETER 4-21
MANUFACTURERS 4-9
NOM_DIAMETER 4-21
PELB_NUMSEG 4-8
PID_MAP 4-19
PIPE_BLLW 4-6
PIPE_CLMP 4-8
PIPE_DIAMETER 4-21
PIPE_DRAIN 4-33
PIPE_END_RATING 4-10
PIPE_FERR 4-11
PIPE_FLANGE_ENDS 4-12
PIPE_FLEX 4-12
PIPE_FMTR 4-15
PIPE_FWLD 4-11
PIPE_IL_BEND 4-16
PIPE_IL_CONN 4-16
PIPE_IL_CREATE 4-17
PIPE_IL_GASKET 4-16
PIPE_IL_RADIUS 4-17
PIPE_IL_VALS 4-17
PIPE_INST 4-16

4-2 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Configuration Data for Your Project Database Tables
Quick Lookup by Database Table Name

Database Table Name Page


PIPE_NO_SCHEDULE 4-9
PIPE_NOT_FLANGE 4-10
PIPE_OFFSETS 4-25
PIPE_OPER 4-33
PIPE_ORNG 4-19
PIPE_PADP 4-6
PIPE_PBRN 4-7
PIPE_PBUS 4-7
PIPE_PCAP 4-20
PIPE_PCPL 4-8
PIPE_PELB 4-9
PIPE_PEND 4-9
PIPE_PERD 4-24
PIPE_PFLG 4-12
PIPE_PGKT 4-15
PIPE_PINS 4-16
PIPE_PIPE 4-20
PIPE_PNOZ_ENDS 4-11
PIPE_PNPL 4-18
PIPE_POPL 4-19
PIPE_POUB 4-23
PIPE_POUS 4-23
PIPE_PPLG 4-22
PIPE_PRED 4-24
PIPE_PROP 4-22
PIPE_PSBN 4-25
PIPE_PSPL 4-26
PIPE_PSTR 4-26
PIPE_PSWE 4-27
PIPE_PSWG 4-26
PIPE_PTAP 4-23
PIPE_PTRP 4-28
PIPE_PUNI 4-29
PIPE_PVLG 4-33

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 4-3
4 Configuration Data for Your Project Database Tables
Introduction

Database Table Name Page


PIPE_PVLT 4-18
PIPE_PVLV 4-31
PIPE_PVOP 4-30
PIPE_RBND 4-24
PIPE_SIGL 4-25
PIPE_STUBLEN 4-17
PIPE_SYMB 4-27
PIPE_THREADS 4-19
PIPE_TTAP 4-28
PLASTIC_DIAMETER 4-21
PVC_DIAMETER 4-21
PVC_PARTNUM 4-20
PVC_PEND 4-10
TRAY_SYMB 4-27
STRESS_MATERIAL 4-22
STRESS_INSUL_MATERIAL 4-22
TRAY_TCODE 4-35
WALLTHK 4-33

4-4 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Configuration Data for Your Project Database Tables
Standards Delivered with Design Series

Standards Delivered with Design Series


Design Series delivers a large set of data files based on the industry standards in each
commodity. They are installed in your ...\{ProjectName}\dbload\data directory. The
following example shows some of the data (DAT) files in piping for the ANSI
standard.

For example, the ANSI industry standard B16.1 maps to the B16_1 subdirectory in
pipe. B16_1 contains various component types that meet this standard. The file

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 4-5
4 Configuration Data for Your Project Database Tables
Layout of Pipe Database Tables

naming convention begins with an abbreviated name for the component type and
ends in the number or name relating to the standard.

Layout of Pipe Database Tables


The section headings for component or data are arranged alphabetically. Within
each section, the first column lists each table name and the name of the file used to
load the data. The next two columns list the column names of the pipe database
table and their description or comments.

Pipe Database Table and Database Table


Description and Comments
Data Load File Column Name
Adapters
PIPE_PADP EPREP1 End connection 1
PADP.DAT SCH_RAT1 Schedule/rating of end connection 1
SIZE_1 Nominal diameter 1 (in inches)
SIZE_2 Nominal diameter 2 (in inches)
STNDRD Standard or manufacturer name
CODE Standard or manufacturer number
STYLE Adapter style number
EPREP2 End connection 2
SCH_RAT2 Schedule/rating of end connection 2
P1_PAR Adapter end to end
P2_PAR Center to thread
P3_PAR Adapter take out dimension
P4_PAR Adapter outside diameter
PAR_UNITS Units for columns with names ending
with _PAR
Bellows
PIPE_BLLW EPREP1 End connection 1
BLLW.DAT SCH_RAT1 Schedule/rating of end connection 1
EPREP2 End connection 2
SCH_RAT2 Schedule/rating of end connection 2
SIZE_1 Nominal diameter 1 (in inches)
SIZE_2 Nominal diameter 2 (in inches)
STNDRD Standard or manufacturer name
CODE Standard or manufacturer number
ARCHES Number of convolutions
P1_PAR Number of folds in accordion length
P2_PAR Number of folds in accordion diameter
PAR_UNITS Units for columns with names ending
with _PAR

4-6 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Configuration Data for Your Project Database Tables
Layout of Pipe Database Tables

Pipe Database Table and Database Table


Data Load File Column Name Description and Comments

Bolts
BOLT_STANDARDS STNDRD Standard or manufacturer name
BOLTS.DAT CODE Standard or manufacturer number
DIAMETER Bolt diameter
LENGTH Bolt length
TYPE Bolt type (MACH or STUD)
UNITS Units (IN or MM)
Branches
PIPE_PBRN BR_TYPE Branch type
PBRN.DAT EPREP1 End connection 1
SCH_RAT1 Schedule/rating of end connection 1
EPREP2 End connection 2
SCH_RAT2 Schedule/rating of end connection 2
EPREP3 End connection 3
SCH_RAT3 Schedule/rating of end connection 3
SIZE_1 Nominal diameter 1 (in inches)
SIZE_2 Nominal diameter 2 (in inches)
SIZE_3 Nominal diameter 3 (in inches)
STNDRD Standard or manufacturer name
CODE Standard or manufacturer number
FACE Flange facing
REIHE Wall thickness option
P1_PAR (See Chapter 3 in this Guide)
P2_PAR (See Chapter 3 in this Guide)
P3_PAR (See Chapter 3 in this Guide)
P4_PAR (See Chapter 3 in this Guide)
P5_PAR (See Chapter 3 in this Guide)
P6_PAR (See Chapter 3 in this Guide)
PAR_UNITS Units for columns with names ending
with _PAR
Bushings
PIPE_PBUS EPREP1 End connection 1
PBUS.DAT SCH_RAT1 Schedule/rating of end connection 1
EPREP2 End connection 2
SCH_RAT2 Schedule/rating of end connection 2
SIZE_1 Nominal diameter 1 (in inches)
SIZE_2 Nominal diameter 2 (in inches)
STNDRD Standard or manufacturer name
CODE Standard or manufacturer number
STYLE Head or body style
P1_PAR Bushing length
P2_PAR Thread length
P3_PAR Head diameter
PAR_UNITS Units for columns with names ending
with _PAR

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 4-7
4 Configuration Data for Your Project Database Tables
Layout of Pipe Database Tables

Pipe Database Table and Database Table


Data Load File Column Name Description and Comments

Clamps
PIPE_CLMP EPREP1 End connection 1
CLMP.DAT SCH_RAT1 Schedule/rating of end connection 1
EPREP2 End connection 2
SCH_RAT2 Schedule/rating of end connection 2
SIZE_1 Nominal diameter (in inches)
STNDRD Standard or manufacturer name
CODE Standard or manufacturer number
CLMPTYPE Type of clamp
P1_PAR Clamp diameter
P2_PAR Clamp width
P3_PAR Bolt width/height
P4_PAR Bolt length
P5_PAR Wing-nut height
PAR_UNITS Units for columns with names ending
with _PAR
Couplings
PIPE_PCPL EPREP1 End connection 1
PCPL.DAT SCH_RAT1 Schedule/rating of end connection 1
EPREP2 End connection 2
SCH_RAT2 Schedule/rating of end connection 2
SIZE_1 Nominal diameter 1 (in inches)
SIZE_2 Nominal diameter 2 (in inches)
STNDRD Standard or manufacturer name
CODE Standard or manufacturer number
FACE Flanged face of the component
STYLE Style number
P1_PAR Coupling length
PAR_UNITS Units for columns with names ending
with _PAR
Elbows (Mitered)
PELB_NUMSEG SIZE_1 Nominal diameter 1 (in inches)
NUM_SEG.DAT SIZE_2 Nominal diameter 2 (in inches)
ANGLE Bend angle
RADIUS Elbow radius
NUM_SEG Number of segments
P1_PAR Center to run end
P2_PAR Center to reducing end
P3_PAR Bend radius, 0=calculate
PAR_UNITS Units for columns with names ending in
_PAR

4-8 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Configuration Data for Your Project Database Tables
Layout of Pipe Database Tables

Pipe Database Table and Database Table


Data Load File Column Name Description and Comments

Elbows (Standard, Reducing, and Street)


PIPE_PELB EPREP1 End connection 1
PELB.DAT SCH_RAT1 Schedule/rating of end connection 1
EPREP2 End connection 2
SCH_RAT2 Schedule/rating of end connection 2
SIZE_1 Nominal diameter 1 (in inches)
SIZE_2 Nominal diameter 2 (in inches)
STNDRD Standard or manufacturer name
CODE Standard or manufacturer number
FACE Facing
ANGLE Bend angle
RADIUS Elbow radius
REIHE Wall thickness option
P1_PAR Center to run end
P2_PAR Center to second or reducing end
P3_PAR Bend_radius (if not 0)
PAR_UNITS Units for columns with names ending
with _PAR
GEOMTYPE N = normal elbow
R = reducing elbow
S = street elbow
End Connections or End Preparations
PIPE_PEND EPREP1 End connection 1
PEND.DAT SCH_RAT1 Schedule/rating of end connection 1
SIZE_1 Nominal diameter (in inches)
STNDRD Standard or manufacturer name
CODE Standard or manufacturer number
STYLE Style number
P1_PAR Flange or band diameter
P2_PAR Flange thickness
P3_PAR Band width, band length, thread length
or socket depth
PAR_UNITS Units for columns with names ending
with _PAR
End Preparations (Manufacturer with Standard) used to map a manufacturer to use a
standard's set of end-prep data
MANUFACTURERS MANUFACTURER Manufacturer or vendor name
MANUFAC.DAT STNDRD Standard or manufacturer name
End Preparations (No Schedule) used to query a schedule for end-preps that do not use
schedule
PIPE_NO_SCHEDULE EPREP1 End connection
NO_SCHED.DAT SCHEDULE Used to set the schedule to #

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 4-9
4 Configuration Data for Your Project Database Tables
Layout of Pipe Database Tables

Pipe Database Table and Database Table


Data Load File Column Name Description and Comments

End Preparations (Not Flanged) used to query attributes for end-preps that are not flanged
PIPE_NOT_FLANGE EPREP1 End preparation value (that is not
PNFL.DAT STNDRD flanged)
CODE Used to set the flange standard to #
SERIES Used to set the flange code to #
TYPE Used to set the flange series to #
RATING Used to set the flange type to #
Used to set the flange rating to 0 (or
FACE other value)
REIHE Used to set the flange face to #
Used to set the flange REIHE to #
End Preparations (PVC Fittings)
PVC_PEND PART_NUM Part number for PVC fitting
PVC_PEND.DAT EPREP1 End connection 1
EPREP2 End connection 2
EPREP3 End connection 3
SIZE_1 Nominal diameter 1 (in inches)
SIZE_2 Nominal diameter 2 (in inches)
SIZE_3 Nominal diameter 3 (in inches)
P1_PAR Outer diameter of flange or band for end
connection 1
P2_PAR Width of flange or band for end
P3_PAR connection 1
P4_PAR Inset of connect point for end
connection 1
P5_PAR Outer diameter of flange or band for end
P6_PAR connection 2
P7_PAR Width of flange or band for end
connection 2
P8_PAR Inset of connect point for end
P9_PAR connection 2
PAR_UNITS Outer diameter of flange or band for end
connection 3
Width of flange or band for end
connection 3
Inset of connect point for end
connection 3
Units for columns with names ending in
_PAR
End Preparations (Rating Only) used to provide sch_rat to place end-preps for components
that have only rating
PIPE_END_RATING STNDRD Standard or manufacturer name
END_RATG.DAT CODE Standard or manufacturer number
RATING Pressure rating
END_RATING Schedule-rating for end-prep placement

4-10 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Configuration Data for Your Project Database Tables
Layout of Pipe Database Tables

Pipe Database Table and Database Table


Data Load File Column Name Description and Comments

End Preparations (Valve Code) used to query another code to use for getting end preparation
data
PIPE_VALVE_CODES VLV_CODE Code on valve
VLV_CODE.DAT EPREP1 end connection
RATING Fitting rating (maximum)
END_CODE Code to use for end-prep data
Equipment PNOZ Data (BW, SW, and SC)
PIPE_PNOZ_ENDS EPREP1 Nozzle connection code
PNOZ.DAT SIZE_1 Nominal diameter (in inches)
STNDRD Standard or manufacturer name
CODE Standard or manufacturer number
SERIES Flange series
TYPE Flange type
RATING Pressure rating
FACE Flange facing
REIHE Wall thickness option
Ferrules
PIPE_FERR EPREP1 End connection 1
FERR.DAT SCH_RAT1 Schedule/rating of end connection 1
EPREP2 End connection 2
SCH_RAT2 Schedule/rating of end connection 2
SIZE_1 Nominal diameter (in inches)
STNDRD Standard or manufacturer name
CODE Standard or manufacturer number
FERRTYPE Type of ferrule
P1_PAR Length of ferrule
PAR_UNITS Units for columns with names ending
with _PAR
Field Welds, Reserved Area for
PIPE_FWLD SIZE_1 Nominal diameter (in inches)
FWLD.DAT P1_PAR Radius of reserved area
P2_PAR Length of reserved area
PAR_UNITS Units for columns with names ending
with _PAR

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 4-11
4 Configuration Data for Your Project Database Tables
Layout of Pipe Database Tables

Pipe Database Table and Database Table


Data Load File Column Name Description and Comments

Flanges
PIPE_PFLG SIZE_1 Nominal diameter 1 (in inches)
PFLG.DAT SIZE_2 Nominal diameter 2 (in inches)
STNDRD Standard or manufacturer name
CODE Standard or manufacturer number
SERIES Flange series
TYPE Flange type
RATING Pressure rating
FACE Flange facing
GKT_TYPE Required gasket type
REIHE Wall thickness option
EPREP1 End connection (always FL)
P1_PAR Flange diameter
P2_PAR Flange thickness
P3_PAR Flange length
P4_PAR Hub diameter
P5_PAR Start hub diameter or inset depth
PAR_UNITS Units for columns with names ending
with _PAR
BOLT_NUM Number of bolts required
BOLTD_PAR Diameter of bolts required
BOLTL_PAR Length of bolts required
BOLT_TYP Type of bolt (machine or stud)
Flanges (with End Preparations) used for end preps allowed for the non-bolted side of a flange
(end 1) by flange type
PIPE_FLANGE_ENDS FL_TYPE Flange type
FLG_ENDS.DAT EPREP1 End connection
Flexible Hoses
PIPE_FLEX SIZE_1 Nominal diameter (in inches)
FLEX.DAT STNDRD Standard or manufacturer name
CODE Standard or manufacturer number
LENGTH Standard length
P1_PAR Outer diameter
PAR_UNITS Units for columns with names ending
with _PAR

4-12 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Configuration Data for Your Project Database Tables
Layout of Pipe Database Tables

Pipe Database Table and Database Table


Data Load File Column Name Description and Comments

Flow Meters: Horizontal Type - Rotary Piston Meter


PIPE_FMTR SIZE_1 Pipe size 1
FLWMTR.DAT SIZE_2 Pipe size 2
STNDRD Fitting specification
FM_TYPE Flow meter type: HFTR (Horizontal
Flow Meter)
PATTERN Flow meter pattern: RZ
EPREP1 (Ringkolbenzahler)
SCH_RAT1 End prep type
EPREP2 Schedule rating
SCH_RAT2 End prep type
CODE Schedule rating
FL_FACE Specification number
REIHE Flow meter facing
P1_PAR Wall thickness option
P2_PAR Total length
P3_PAR not used
P4_PAR not used
P5_PAR not used
P6_PAR Operator diameter
P7_PAR Total operator length
PAR_UNITS Body middle to operator face
Units for parameters

Assumptions:
1. The operator diameter of small size is
taken as 0.75 times the diameter of P5.
2. The thickness of operator (X) cover is
taken 0.125 times the operator diameter.
For example, X = 0.125*P5

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 4-13
4 Configuration Data for Your Project Database Tables
Layout of Pipe Database Tables

Pipe Database Table and Database Table


Data Load File Column Name Description and Comments

Flow Meters: Horizontal Type - Water Meter


PIPE_FMTR SIZE_1 Pipe size 1
FLWMTR.DAT SIZE_2 Pipe size 2
STNDRD Fitting specification
FM_TYPE Flow meter type: HFTR (Horizontal
Flow Meter)
PATTERN Flow meter pattern: WZ (Wasserzahler)
EPREP1 End prep type
SCH_RAT1 Schedule rating
EPREP2 End prep type
SCH_RAT2 Schedule rating
CODE Specification number
FL_FACE Flow meter facing
REIHE Wall thickness option
P1_PAR Total length
P2_PAR Body diameter /2
P3_PAR X = (Assumption 2)
P4_PAR Body end diameter
P5_PAR Operator diameter
P6_PAR Operator length
P7_PAR not used
PAR_UNITS Units for parameters

Assumptions:
1. The operator diameter of small size is
taken as 0.8 times the diameter of P5.
2. The length X of the middle body is
calculated on the basis of the endprep
length and P1.

4-14 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Configuration Data for Your Project Database Tables
Layout of Pipe Database Tables

Pipe Database Table and Database Table


Data Load File Column Name Description and Comments

Flow Meters: Vertical Type - Rotameter


PIPE_FMTR SIZE_1 Pipe size 1
FLWMTR.DAT SIZE_2 Pipe size 2
STNDRD Fitting specification
FM_TYPE Flow meter type: VFTR (Vertical Flow
PATTERN Meter)
EPREP1 Flow meter pattern: RM (Rotameter)
SCH_RAT1 End prep type
EPREP2 Schedule rating
SCH_RAT2 End prep type
CODE Schedule rating
FL_FACE Specification number
REIHE Flow meter facing
P1_PAR Wall thickness option
P2_PAR Total length
P3_PAR Diameter of tube
P4_PAR Length of tube
P5_PAR Endprep diameter
P6_PAR not used
P7_PAR not used
PAR_UNITS not used
Units for parameters

Assumptions:
The length of the lower cone is of the
length of the middle tube, and the upper
cone is the remaining of the length of
the tube.
Gaskets
PIPE_PGKT STNDRD Standard or manufacturer name
PGKT.DAT CODE Standard or manufacturer number
SIZE_1 Nominal diameter (in inches)
RATING Pressure rating
TYPE Gasket form or type
MAT_NAME Operator
P1_PAR Ring gasket outside diameter
PAR_UNITS Units for columns with names ending
with _PAR
Gasket Thicknesses
GASKET_THICKNESS STNDRD Standard or manufacturer name
PGKT_THK.DAT CODE Standard or manufacturer number
THICKNESS_IN Gasket thickness in inches
THICKNESS_MM Gasket thickness in millimeters

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 4-15
4 Configuration Data for Your Project Database Tables
Layout of Pipe Database Tables

Pipe Database Table and Database Table


Data Load File Column Name Description and Comments

Inserts (Reducing)
PIPE_PINS EPREP1 End connection 1
PINS.DAT SCH_RAT1 Schedule/rating of end connection 1
EPREP2 End connection 2
SCH_RAT2 Schedule/rating of end connection 2
SIZE_1 Nominal diameter 1 (in inches)
SIZE_2 Nominal diameter 2 (in inches)
STNDRD Standard or manufacturer name
CODE Standard or manufacturer number
INS_TYPE Insert type
P1_PAR Insert a length
P2_PAR Insert b length
P3_PAR Diameter: type 1 and 2
P4_PAR Diameter: type 1 only
PAR_UNITS Units for columns with names ending
with _PAR
Instrument Taps
PIPE_INST EPREP1 End connection
INST.DAT SIZE_1 Tapped component size
SIZE_2 Tap diameter
P1_PAR Length of tap
P2_PAR Tap outer diameter
PAR_UNITS Units for columns with names ending
with _PAR
Intelligent Line String (Connection Codes)
PIPE_IL_CONN CORNER Corner code
LPILCONN.DAT EPREP1 End connection
Intelligent Line String (Corners) used to query a flange face for corner types that do not use
flanges
PIPE_IL_BEND CORNER Corner type (elbow, bend, and so on)
LPILBEND.DAT FACE Flange face value (#)
Intelligent Line String (Gasket Thickness)
PIPE_IL_GASKET EPREP1 End connection
LPILGASK.DAT THICKNESS Gasket thickness
THICK_MM Thickness in millimeters

4-16 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Configuration Data for Your Project Database Tables
Layout of Pipe Database Tables

Pipe Database Table and Database Table


Data Load File Column Name Description and Comments

Intelligent Line String (Pipe Data for Creating ILs)


PIPE_IL_CREATE SIZE_1 Nominal diameter (in inches)
LPILCREA.DAT MIN_LEN Minimum segment length in inches
MAX_ZDIM Half the outside diameter in inches
B_C_SCALE Outside diameter in inches
MIN_GAP Minimum gap in inches
MIN_GAPM Minimum gap in millimeters
Intelligent Line String (Property Values)
PIPE_IL_VALS PROPERTY Name of property
IL_VALS.DAT PROP_VAL Value of property
Intelligent Line String (Radius Codes)
PIPE_IL_RADIUS CORNER Corner code
LPILRAD.DAT B_RADIUS Bend radius code
Lapjoint Stubs
PIPE_STUBLEN SIZE_1 Nominal diameter (in inches)
STUBLEN.DAT SCHED Schedule
STNDRD Standard or manufacturer name
CODE Standard or manufacturer number
RATING Pressure rating
QDIM_PAR Q dimension
RDIM_PAR R dimension
TDIM_PAR T dimension
PAR_UNITS Units for columns with names ending
with _PAR

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 4-17
4 Configuration Data for Your Project Database Tables
Layout of Pipe Database Tables

Pipe Database Table and Database Table


Data Load File Column Name Description and Comments

Limitorque Operators
PIPE_PVLT OP_TYPE Operator type
PVLT.DAT P1_PAR Handwheel diameter
P2_PAR Center of stem to center of handwheel
P3_PAR Face of housing to outer handwheel
P4_PAR limits
P5_PAR Back of housing to outer motor limits
P6_PAR Motor diameter
Center of stem to limit switch
P7_PAR compartment back
Center of stem to limit switch
P8_PAR compartment front
P9_PAR Limit switch compartment height
P10_PAR Center of stem to limit switch
P11_PAR compartment
P12_PAR Limit switch compartment length
P13_PAR Housing height
P14_PAR Center of stem to center of motor
P15_PAR Bottom of housing to center of motor
P16_PAR Center of stem to front of housing
PAR_UNITS Center of stem to side of housing
Bottom of housing to center of
handwheel
Units for columns with names ending
with _PAR
Nipples
PIPE_PNPL NPLTYPE Description of connections
PNPL.DAT EPREP1 End preparation 1
EPREP2 End preparation 2
SIZE_1 Nominal diameter 1 (in inches)
SIZE_2 Nominal diameter 2 (in inches)
STNDRD Standard or manufacturer name
CODE Standard or manufacturer number
REIHE Wall thickness option
NOM_LNTH Length of nipple, include _units
P1_PAR P3 plus the thickness of the hexagon
(See Chapter 3 in this Guide)
P2_PAR Male face-to-hexagon length
(See Chapter 3 in this Guide)
P3_PAR Face-to-face length of hexagon
(See Chapter 3 in this Guide)
PAR_UNITS Units for columns with names ending
with _PAR

4-18 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Configuration Data for Your Project Database Tables
Layout of Pipe Database Tables

Pipe Database Table and Database Table


Data Load File Column Name Description and Comments

Nominal Dimensions for Conduit, Tray, HVAC, and Pipe Insulation Thickness (not pipe
diameter) used to show imperial - SI (metric) equivalents
EQUIV_NOM_SIZE IMP_SIZE Imperial size
EQNOMSIZ.DAT MET_SIZE SI size
Nominal Dimensions for Gasket, Orifice Plate, and O-ring Thicknesses used to show imperial
- SI (metric) equivalents
EQUIV_THICK IMP_SIZE Imperial size
EQNOMSIZ.DAT MET_SIZE SI size
Nominal Lengths
EQUIV_NOM_LENGTH IMP_SIZE Imperial size
EQNOMSIZ.DAT MET_SIZE SI size
Nozzle Codes
PIPE_THREADS EPREP1 Nozzle connect code
THREADS.DAT THREAD Thread type
O-Rings
PIPE_ORNG SIZE_1 Nominal diameter (in inches)
ORNG.DAT STNDRD Standard or manufacturer name
CODE Standard or manufacturer number
MAT_NAME Material name
THICK Nominal thickness
P1_PAR Outside diameter
P2_PAR Actual (compressed) thickness
PAR_UNITS Units for columns with names ending
with _PAR
Orifice Plates
PIPE_POPL SIZE_1 Nominal diameter 1 (in inches)
POPL.DAT SIZE_2 Nominal diameter 2 (in inches)
STNDRD Standard or manufacturer name
CODE Standard or manufacturer number
RATING Pressure rating
THICK Thickness
P&ID Data used in placing a component using the P&ID component as a template
PID_MAP PID Expression for name of P&ID attribute
PIDATTR.DAT Design_Series Name of Design Series attribute
MAP_TABLE Name of table used to map a Design
Series attribute value to a Design Series
description when the P&ID attribute
value is in the form of the description

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 4-19
4 Configuration Data for Your Project Database Tables
Layout of Pipe Database Tables

Pipe Database Table and Database Table


Data Load File Column Name Description and Comments

Pipe
PIPE_PIPE SIZE_1 Nominal diameter (in inches)
PIPE.DAT SCHEDULE Schedule value
STNDRD Standard or manufacturer name
CODE Standard or manufacturer number
MAT_NAME Material name
REIHE REIHE (row) for wall thickness
EPREP1 Used for querying schedule
P1_PAR Unused
P2_PAR Unused
PAR_UNITS Units for columns with names ending in
_PAR
Pipe (PVC Part Numbers) used to find part numbers for PVC fittings
PVC_PARTNUM STNDRD Standard or manufacturer name
PVC_PTNO.DAT SCH_RAT Schedule rating of end-prep1
CODE Standard or manufacturer number
BUD_TYPE Component type
SUB_INFO Component grouping
EPREP1 End connection 1
EPREP2 End connection 2
EPREP3 End connection 3
SIZE_1 Nominal diameter 1 (in inches)
SIZE_2 Nominal diameter 2 (in inches)
SIZE_3 Nominal diameter 3 (in inches)
PART_NUM Part number
Pipe Caps
PIPE_PCAP EPREP1 End connection 1
PCAP.DAT SCH_RAT1 Schedule/rating of end connection 1
SIZE_1 Nominal diameter (in inches)
STNDRD Standard or manufacturer name
CODE Standard or manufacturer number
FACE Flange facing
REIHE Wall thickness option
P1_PAR Cap length
PAR_UNITS Units for columns with names ending
with _PAR

4-20 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Configuration Data for Your Project Database Tables
Layout of Pipe Database Tables

Pipe Database Table and Database Table


Data Load File Column Name Description and Comments

Pipe Diameters used to indicate the table and column used to look up the outside diameter of
pipe
DIAMETER_TABLES STNDRD Standard or manufacturer name
DIATABLE.DAT CODE Standard or manufacturer number
TBL_NAME Name of table with outside diameters
COL_NAME Name of columns with outside diameters

DWV_DIAMETER SIZE_1 Nominal diameter in inches


DWV_DIA.DAT PIPE_OD_PAR Pipe true outside diameter
PAR_UNITS Units for columns with names ending
with _PAR
PLASTIC_DIAMETER [same as [same as DWV_DIAMETER]
WTRP_DIA.DAT DWV_DIAMETER]

IRON_DIAMETER [same as [same as DWV_DIAMETER]


WTRI_DIA.DAT DWV_DIAMETER]

FRP_DIAMETER [same as [same as DWV_DIAMETER]


WTRF_DIA.DAT DWV_DIAMETER]

HDPE_DIAMETER [same as [same as DWV_DIAMETER]


WTRH_DIA.DAT DWV_DIAMETER]
NOM_DIAMETER [same as [same as DWV_DIAMETER]
NOM_OD.DAT DWV_DIAMETER]

PIPE_DIAMETER SIZE_1 Nominal diameter in inches


DIAMETER.DAT METRIC_ND Nominal diameter in millimeters
PIPEDIA_IN Pipe true outside diameter
TUBEDIA_IN Tube true outside diameter
PIPEWALLSTD_IN Standard wall thickness
COM_GRP Commodity group code
PVC_DIAMETER PART_NUM Part number for PVC fitting
PVC_DIA.DAT EPREP1 End connection 1
EPREP2 End connection 2
EPREP3 End connection 3
SIZE_1 Nominal diameter 1 (in inches)
SIZE_2 Nominal diameter 2 (in inches)
SIZE_3 Nominal diameter 3 (in inches)
OD_1 Outer diameter for end connection 1
OD_2 Outer diameter for end connection 2
OD_3 Outer diameter for end connection 3

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 4-21
4 Configuration Data for Your Project Database Tables
Layout of Pipe Database Tables

Pipe Database Table and Database Table


Data Load File Column Name Description and Comments

Pipe Dimensions and Properties for Stress Analysis


PIPE_PROP SIZE_1 Nominal diameter (in inches)
PIPEPROP.DAT OUT_DIA Outer diameter
SCHEDULE Schedule value
WALL_THK Wall thickness option
PLAIN_END Weight (per inch) of plain-end pipe
WATER_IN Weight (per inch) of water inside pipe
STRESS_MATERIAL CAESAR2_MAT_NO Number to identify the pipe material to
CAESAR2.DAT CAESAR II
MATERIAL_NAME Name displayed for user to select
YOUNGS_MODULUS Elastic modulus in PSI (not used)
POISSON_RATIO Ratio of stress to strain (unitless)
DENSITY Density of pipe material in pounds per
cubic inch
APIPE_MAT_CODE Code to identify the pipe material to
AutoPipe
STRESS_INSUL_MATERIAL DESCRIPTION Name of insulation material
INSULATION.DAT DENSITY Density in pounds per cubic foot
APIPE_NAME Name or code to identify the insulation
material to AutoPipe
Plugs
PIPE_PPLG EPREP1 End connection 1
PPLG.DAT SCH_RAT1 Schedule/rating of end connection 1
SIZE_1 Nominal diameter (in inches)
STNDRD Standard or manufacturer name
CODE Standard or manufacturer number
STYLE Plug head style
P1_PAR Plug length
P2_PAR Thread length
P3_PAR Head diameter
PAR_UNITS Units for columns with names ending
with _PAR

4-22 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Configuration Data for Your Project Database Tables
Layout of Pipe Database Tables

Pipe Database Table and Database Table


Data Load File Column Name Description and Comments

Point-of-Use Bends
PIPE_POUB EPREP1 End connection 1
POUB.DAT SCH_RAT1 Schedule/rating of end connection 1
EPREP2 End connection 2
SCH_RAT2 Schedule/rating of end connection 2
SIZE_1 Nominal diameter 1 (in inches)
SIZE_2 Nominal diameter 2 (in inches)
STNDRD Standard or manufacturer name
CODE Standard or manufacturer number
P1_PAR Depth
P2_PAR Bend diameter
P3_PAR Length of branch
PAR_UNITS Units for columns with names ending
with _PAR
Point-of-Use Straights
PIPE_POUS EPREP1 End connection 1
POUS.DAT SCH_RAT1 Schedule/rating of end connection 1
EPREP2 End connection 2
SCH_RAT2 Schedule/rating of end connection 2
SIZE_1 Nominal diameter 1 (in inches)
SIZE_2 Nominal diameter 2 (in inches)
STNDRD Standard or manufacturer name
CODE Standard or manufacturer number
P1_PAR Depth
P2_PAR Bend diameter
P3_PAR Length of branch
PAR_UNITS Units for columns with names ending
with _PAR
Pressure Taps
PIPE_PTAP EPREP1 End connection
PTAP.DAT SIZE_1 Tapped component size
SIZE_2 Tap diameter
STNDRD Standard or manufacturer name
CODE Standard or manufacturer number
FACE Flange facing
P1_PAR Length of tap
P2_PAR Tap outer diameter
PAR_UNITS Units for columns with names ending
with _PAR

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 4-23
4 Configuration Data for Your Project Database Tables
Layout of Pipe Database Tables

Pipe Database Table and Database Table


Data Load File Column Name Description and Comments

Reducers (Concentric)
PIPE_PRED EPREP1 End connection 1
PRED.DAT SCH_RAT1 Schedule/rating of end connection 1
EPREP2 End connection 2
SCH_RAT2 Schedule/rating of end connection 2
SIZE_1 Nominal diameter 1 (in inches)
SIZE_2 Nominal diameter 2 (in inches)
STNDRD Standard or manufacturer name
CODE Standard or manufacturer number
REIHE Wall thickness option
FACE Flange facing
P1_PAR Reducer length
PAR_UNITS Units for columns with names ending
with _PAR
Reducers (Eccentric)
PIPE_PERD EPREP1 End connection 1
PERD.DAT SCH_RAT1 Schedule/rating of end connection 1
EPREP2 End connection 2
SCH_RAT2 Schedule/rating of end connection 2
SIZE_1 Nominal diameter 1 (in inches)
SIZE_2 Nominal diameter 2 (in inches)
STNDRD Standard or manufacturer name
CODE Standard or manufacturer number
REIHE Wall thickness option
FACE Flange facing
P1_PAR Reducer length
PAR_UNITS Units for columns with names ending
with _PAR
Return Bends
PIPE_RBND EPREP1 End connection 1
RBND.DAT SCH_RAT1 Schedule/rating of end connection 1
SIZE_1 Nominal diameter (in inches)
STNDRD Standard or manufacturer name
CODE Standard or manufacturer number
RADIUS Elbow Radius
REIHE Wall thickness option
P1_PAR Depth
P2_PAR Bend diameter
PAR_UNITS Units for columns with names ending
with _PAR

4-24 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Configuration Data for Your Project Database Tables
Layout of Pipe Database Tables

Pipe Database Table and Database Table


Data Load File Column Name Description and Comments

S-Bend Offset Data


PIPE_OFFSETS EPREP1 End preparation
OFFSETS.DAT TYPE Flange type
SIZE_1 Nominal diameter (in inches)
TDIM T dimension
RDIM R dimension
S-Bends
PIPE_PSBN EPREP1 End connection 1
PSBN.DAT SCH_RAT1 Schedule/rating of end connection 1
EPREP2 End connection 2
SCH_RAT2 Schedule/rating of end connection 2
SIZE_1 Nominal diameter 1 (in inches)
SIZE_2 Nominal diameter 2 (in inches)
SETOFF Face-to-face distance measured parallel
to the faces
STNDRD Standard or manufacturer name
CODE Standard or manufacturer number
STYLE S-bend style
ANGLE Bend angle
P1_PAR S-bend length
PAR_UNITS Units for columns with names ending
with _PAR
Sight Glasses
PIPE_SIGL EPREP1 End connection 1
SIGL.DAT SCH_RAT1 Schedule/rating of end connection 1
EPREP2 End connection 2
SCH_RAT2 Schedule/rating of end connection 2
SIZE_1 Nominal diameter 1 (in inches)
SIZE_2 Nominal diameter 2 (in inches)
STNDRD Standard or manufacturer name
CODE Standard or manufacturer number
FACE Flange face
P1_PAR Overall length
P2_PAR Body dimension (size of box)
P3_PAR Diameter of observation port
P4_PAR Face-to-center of observation port
PAR_UNITS Units for columns with names ending
with _PAR

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 4-25
4 Configuration Data for Your Project Database Tables
Layout of Pipe Database Tables

Pipe Database Table and Database Table


Data Load File Column Name Description and Comments

Spools
PIPE_PSPL STNDRD Standard or manufacturer name
PSPL.DAT CODE Standard or manufacturer number
SPLTYPE Spool type
EPREP1 End connection 1
EPREP2 End connection 2
NOM_LNTH Nominal length as #.#_UNITS
Strainers
PIPE_PSTR STR_TYPE Strainer type
PSTR.DAT EPREP1 End connection 1
SCH_RAT1 Schedule/rating of end connection 1
EPREP2 End connection 2
SCH_RAT2 Schedule/rating of end connection 2
SIZE_1 Nominal diameter 1 (in inches)
SIZE_2 Nominal diameter 2 (in inches)
STNDRD Standard or manufacturer name
CODE Standard or manufacturer number
REIHE Wall thickness option
FACE Flange facing
STYLE Strainer type
P1_PAR Center to end
P2_PAR Center to outer end
P3_PAR Center to bottom basket
P4_PAR Basket body diameter
P5_PAR Outlet flange diameter
PAR_UNITS Units for columns with names ending
with _PAR
Swages (Concentric)
PIPE_PSWG SWGTYPE Abbreviation for two end preparations,
PSWG.DAT for example:
BBE = beveled both ends
BLE/PSE = beveled large end/plain
small end
EPREP1 End connection 1
EPREP2 End connection 2
SIZE_1 Nominal diameter 1 (in inches)
SIZE_2 Nominal diameter 2 (in inches)
STNDRD Standard or manufacturer name
CODE Standard or manufacturer number
P1_PAR Swage length
PAR_UNITS Units for columns with names ending
with _PAR

4-26 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Configuration Data for Your Project Database Tables
Layout of Pipe Database Tables

Pipe Database Table and Database Table


Data Load File Column Name Description and Comments

Swages (Eccentric)
PIPE_PSWE SWGTYPE Abbreviation for two end preparations,
PSWE.DAT for example:
BBE = beveled both ends
BLE/PSE = beveled large end/plain
small end
EPREP1 End connection 1
EPREP2 End connection 2
SIZE_1 Nominal diameter 1 (in inches)
SIZE_2 Nominal diameter 2 (in inches)
STNDRD Standard or manufacturer name
CODE Standard or manufacturer number
P1_PAR Swage length
PAR_UNITS Units for columns with names ending
with _PAR
Symbology by System for Pipe
PIPE_SYMB SYS_NAME System name
SYMBOLGY.DAT LVL_NUM Level
COLOR Color
STYLE Line style
WEIGHT Line weight
Symbology by System for Conduit
CNDT_SYMB LVL_NUM Level
CNDT_SYMBOLGY.DAT COLOR Color
STYLE Line style
WEIGHT Line weight
Symbology by System for Tray
TRAY_SYMB LVL_NUM Level
TRAY_SYMBOLGY.DAT COLOR Color
STYLE Line style
WEIGHT Line weight

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 4-27
4 Configuration Data for Your Project Database Tables
Layout of Pipe Database Tables

Pipe Database Table and Database Table


Data Load File Column Name Description and Comments

Tangential Taps
PIPE_TTAP SIZE_1 Tap size 1 (in inches)
TANTAP.DAT STNDRD Tap specification
EPREP1 Tap end prep type
SCH_RAT1 Tap schedule rating
CODE Tap specification number
FL_FACE Tap facing
REIHE Tap row for wall thickness
P1_PAR Tap outer diameter
P2_PAR Tap length
PAR_UNITS Units for parameters

Assumptions:
1. Diameter of tap is taken from the
PIPE_DIAMETER table from size (8-
200 mm).
2. Radius of tapping pipe is calculated
after location of pipe.
3. For BW or # entry in database, there is
graphics in tap geometry.
4. For other endpreps, data is taken from
the PIPE_PEND table using EDS
standard.
Traps
PIPE_PTRP TRP_TYPE Trap type
PTRP.DAT EPREP1 End connection 1
SCH_RAT1 Schedule rating of end-prep1
EPREP2 End connection 2
SCH_RAT2 Schedule rating of end-prep1
SIZE_1 Nominal diameter 1 (in inches)
SIZE_2 Nominal diameter 2 (in inches)
STNDRD Standard or manufacturer name
CODE Standard or manufacturer number
P1_PAR (See Chapter 3 in this Guide)
P2_PAR (See Chapter 3 in this Guide)
P3_PAR (See Chapter 3 in this Guide)
P4_PAR (See Chapter 3 in this Guide)
P5_PAR (See Chapter 3 in this Guide)
PAR_UNITS Units for columns with names ending in
_PAR

4-28 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Configuration Data for Your Project Database Tables
Layout of Pipe Database Tables

Pipe Database Table and Database Table


Data Load File Column Name Description and Comments

Unions
PIPE_PUNI EPREP1 End connection 1
PUNI.DAT SCH_RAT1 Schedule/rating of end connection 1
EPREP2 End connection 2
SCH_RAT2 Schedule/rating of end connection 2
SIZE_1 Nominal diameter 1 (in inches)
SIZE_2 Nominal diameter 2 (in inches)
STNDRD Standard or manufacturer name
CODE Standard or manufacturer number
P1_PAR Union length
P2_PAR Octagon diameter
P3_PAR Small diameter
P4_PAR Socket to socket dimension
P5_PAR Socket or thread length
PAR_UNITS Units for columns with names ending
with _PAR

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 4-29
4 Configuration Data for Your Project Database Tables
Layout of Pipe Database Tables

Pipe Database Table and Database Table


Data Load File Column Name Description and Comments

Valve Operators
PIPE_PVOP EPREP1 End connection 1
PVOP.DAT SCH_RAT1 Schedule/rating of end connection 1
SIZE_1 Nominal diameter (in inches)
TYPE Valve type
STNDRD Standard or manufacturer name
CODE Standard or manufacturer number
OPERATOR Operator type
OP_ANG Operator angle
DATA_FMT Operator data format, used by the
pvophand rule file and indicates what the
value for P1 (operator length) of the
handwheel represents in the following
formats:
data_fmt = 1 indicates the true length
of the operator (work point of valve to
end of valve stem, parallel to angle of
operator)
data_fmt = 2 indicates vertical
operator clearance (work point of
valve to top edge of handwheel)
data_fmt = 3 indicates horizontal
operator clearance (work point of
valve to outside edge of handwheel)
RATING Pressure rating
MAT_NAME Operator
P1_PAR Center to top valve stem length
P2_PAR Handwheel diameter
P3_PAR Length of gear box
P4_PAR Width of gear box
P5_PAR Height of gear box
P6_PAR Distance from box center to outer end of
diagram
P7_PAR Offset
PAR_UNITS Units for columns with names ending
with _PAR

4-30 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Configuration Data for Your Project Database Tables
Layout of Pipe Database Tables

Pipe Database Table and Database Table


Data Load File Column Name Description and Comments

Valves
PIPE_PVLV EPREP1 End connection 1
PVLV.DAT SCH_RAT1 Schedule/rating of end connection 1
EPREP2 End connection 2
SCH_RAT2 Schedule/rating of end connection 2
SIZE_1 Nominal diameter 1 (in inches)
SIZE_2 Nominal diameter 2 (in inches)
STNDRD Standard or manufacturer name
CODE Standard or manufacturer number
REIHE Wall thickness option
VFL_TYPE Flange type for valve
PATTERN Valve pattern
TYPE Valve type
RATING Pressure rating
MAT_NAME Valve material
FACE Flange facing
P1_PAR Entire length or left-to-middle length
P2_PAR Face-to-center length for angle of valve
P3_PAR Body diameter (if not zero)
P4_PAR Length of the outlet for 3-way and 4-way
valves
P5_PAR Length of the second outlet for 4-way
valves
P6_PAR Not currently used.
PAR_UNITS Units for columns with names ending
with _PAR

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 4-31
4 Configuration Data for Your Project Database Tables
Layout of Pipe Database Tables

Pipe Database Table and Database Table


Data Load File Column Name Description and Comments

Valves (Air Controlled)


Types of air-controlled valves with set of bodies
AVLV_STANDARD AV_TYPE Valve type or name
AVLV.DAT BODY_1 Type of first body
BODY_2 Type of second body, if any
BODY_3 Type of third body, if any
Types of bodies for air-controlled valves and information
AVLV_BODY AV_TYPE Valve type or name
AVLV.DAT BODY Type of body
NUMMIDPTS Number of connections if body is not
last in valve (upper port)
NUMBOTPTS Number of connections if body is last in
valve (lower port)
DESCRIPTION Description of body type
Used for querying type of body for air-controlled valves
AVLV_BODY_NONE AV_TYPE Valve type or name
AVLV.DAT BODY Type of body
Dimensional parameters for manifold bodies of air-controlled valves
AVLV_MANIFOLD SIZE_1 Nominal diameter (in inches)
AVLV.DAT H_4_PAR Height of 4 inch operator
LOW_BW_PAR Height of lower port (welded)
F_TO_C_PAR Face-to-center
PAR_UNITS Units for columns with names ending in
_PAR
Dimensional parameters for bodies of air-controlled valves
AVLV_PARS SIZE_1 Nominal diameter (in inches)
AVLV.DAT H_4_PAR Height of 4 inch operator
H_5_PAR Height of 5 inch operator
H_6_PAR Height of 6 inch operator
H_MAN_PAR Height of manual operator
H_CON_PAR Extra height for control top
UPPER_PAR Height of upper port (or body)
LOW_BW_PAR Height of lower port (welded).
Also face-to-center for all ports
LOW_FZ_PAR Height of lower port (I-line)
LOW_FR_PAR Height of lower port (S-line)
LOW_D_PAR Height of double lower port
LOW_OP_PAR Height of lower port with operator stem
PAR_UNITS Units for columns with names ending in
_PAR

4-32 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Configuration Data for Your Project Database Tables
Layout of Electrical Database Tables

Pipe Database Table and Database Table


Data Load File Column Name Description and Comments

Valves (for Operators)


PIPE_OPER TYPE Valve type
OPER.DAT STNDRD Standard or manufacturer name
CODE Standard or manufacturer number
OP_TYPE Operator types
Valves (Generic)
PIPE_PVLG TYPE Valve type
PVLG.DAT EPREP1 End connection
FACE Flange facing
Vents and Drains
PIPE_DRAIN VD Vent, drain, or none
DRAIN.DAT VDSIZE Vent or drain size
Wall Thickness (in EDS) used to find the wall thickness of components that use REIHE
WALLTHK STNDRD Standard or manufacturer name
WALLTHK.DAT SIZE_1 Nominal diameter (in inches)
REIHE Row for wall thickness
SCHEDULE Schedule value
MAT_NAME Component material name
P1_PAR Pipe outside diameter
P2_PAR Wall thickness
PAR_UNITS Units for columns with names ending in
_PAR

Layout of Electrical Database Tables


The section headings for component or data are arranged alphabetically. Within
each section, the first column lists the table names and the name of the file used to
load the data. The next two columns list the column names of the electrical database
table and their description and comments.

Electrical Database Database Table


Table and Data Load File Column Name Descriptions and Comments

Bend Radius for Corners


CNDT_BEND_TYPE CRN_TYPE Corner type (B=bend, E=elbow)
LBEND.TYP.DAT RADIUS Bend radius type

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 4-33
4 Configuration Data for Your Project Database Tables
Layout of Electrical Database Tables

Electrical Database Database Table


Table and Data Load File Column Name Descriptions and Comments

Conduit Code
CNDT_CODE DIAMETER Conduit nominal diameter
CON_CODE.DAT CODE Code value
Conduit Elbows and Bends
CNDT_CND_ELS CND_SIZE Conduit nominal diameter
LCND_ELS.DAT
RADIUS Bend radius type (L = long, S = short, and so
on)
CRNR_RAD_IN Bend radius value of elbow
CND_EXT_IN Length of straight extension on end of elbow
CND_EXT_MM Length of straight extension on end of elbow
Conduits
CNDT_CND_DIA CND_SIZE Conduit nominal diameter
LCND_DIA.DAT
CNDT_DIA_IN Conduit outside diameter
Condulet Couplings or Inline Condulets
CNDT_CNDLSP CND_SIZE Conduit nominal diameter
LCNDLSP.DAT
P1_PAR Overall length of coupling
P2_PAR Overall width of coupling
P3_PAR Overall height of coupling
P4_PAR Outside diameter of connectors
P5_PAR Length of coupling without connectors
P6_PAR Width of access plate
P7_PAR Length of access plate
Condulet Elbows
CNDT_CNDLLP CND_SIZE Conduit nominal diameter
LCNDLLP.DAT P1_PAR Overall length of elbow
P2_PAR Overall height of elbow
P3_PAR Overall width of elbow
P4_PAR Width of elbow without connectors
P5_PAR Length of elbow without connectors
P6_PAR Outside diameter of connectors
PAR_UNITS Units for parameters

4-34 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Configuration Data for Your Project Database Tables
Layout of Electrical Database Tables

Electrical Database Database Table


Table and Data Load File Column Name Descriptions and Comments

Condulet Tees
CNDT_CNDLTP CND_SIZE Conduit nominal diameter
LCNDLTP.DAT P1_PAR Overall length of tee
P2_PAR Overall height of tee
P3_PAR Overall width of tee
P4_PAR Width of tee without connectors
P5_PAR Length of tee without connectors
P6_PAR Outside diameter of connectors
PAR_UNITS Units for parameters
Couplings
CNDT_CND_CPLG CND_SIZE Nominal diameter of conduit that coupling is
LCND_CPL.DAT attached to
CPLG_DIA_IN Coupling outside diameter
CPLG_LEN_IN Coupling overall length
CPLG_THD_IN Length of threads on couplings
CND_TYPE_IN Coupling type
Tray Code
TRAY_TCODE WIDTH Width of tray
TCODE.DAT
DEPTH Depth of tray
CODE Code value

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 4-35
4-36 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
5 Parametric Modeling Functions

Introduction
This chapter expands on the chapter Using the Expert System in Design Series in the
PlantSpace Design Series Administrator Guide and provides the standard built-in
functions for expert system rule files.

To go directly to the list of built-in functions, see Quick Lookup by Function


Name on page 5-26. Several expert system functions have been renamed. The
former names (where noted) currently work, but developers should try to use
the new names. See Former Function Names on page 5-29.

Explanation of Syntax
Each function listing contains a summary consisting of the syntax statement
followed by a table explaining its arguments. The syntax summary contains tokens,
which are representations of all return values, required arguments, and optional
arguments. Each token is explained in the table following the syntax statement. The
token explanation contains the token name, token type, data type, and meaning.

For clarity, multiple mode functions such as VECTOR, may have multiple
syntax entries and token explanations.

Types of Tokens

The four types of tokens are: keyword, variable or value, variable name, and return.

Keyword
Keyword is the simplest token type and is used for arguments that
control the behavior of a function. Keywords must appear exactly as
shown in the syntax summary, including single ( ' ) quotation marks.

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 5-1
5 Parametric Modeling Functions
Introduction

Some keyword tokens require that additional arguments follow.


Tokens of the keyword token type do not have a data type. In some
cases, the syntax summary lists the valid keywords directly. In other
cases, the valid keywords follow in a supplemental table.
Examples are:
'START' is a keyword specific to the CELL function. It does not
require any following arguments.
'MATRIX' is a common keyword used with many functions. As
explained later, 'MATRIX' must be followed by a set of values
defining a matrix, either as a variable containing an array of nine
values or as nine individual values.
Variable or value
Variable or value tokens are used when a function expects a value as
an argument. The value can be written in the function call as a literal
value (for example: 4, 3.14159, "this is a string ") or
as a variable of the specified type (for example: rDiameter,
tWelcomeString). If a variable is used to pass an argument to a
function, the variable's value is determined by inferencing. In a very
few functions, a token can accept only a variable or a value, rather
than a choice of either. In these instances, only the required token
type is listed.
Examples are:
If an ADD function requires two arguments as addends, these
arguments are expressed as two tokens of the value or variable type.
The ADD function can be called as ADD(4, 31.75) or as ADD(4,
rAddend) where rAddend can be evaluated (by inferencing) to some
numeric value.
Variable name
Variable name tokens are used when a function needs to place a
value into a variable at the completion of the function. Variable
name token arguments use the name of the variable of the
appropriate type, surrounded by single ( ' ) quotation marks. For
those familiar with procedural programming languages, this token
type is similar to passing a variable by reference. A variable name
token can represent a list of variable names. These should be
comma-separated and contained within one set of single quotation
marks. See the ADOPT function and INHERIT function for
examples. In these cases, the data type for the token is listed as
'mixed'.
Examples are:

5-2 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Parametric Modeling Functions
Explanation of Syntax

A variant of the previous ADD function example might return the


sum to a third argument. This ADD function might be called as
ADD('rSum', 4, 6).
Return
The return token type represents the value returned by a function.
In all cases, this value can either be used directly or assigned to a
variable for storage and later reference. Many functions return a
simple flag value to indicate success (1) or failure (0). Other
functions return their results through this token.

Array Types

For ease of documentation, Point, Vector, and Matrix are used as three array types in
this chapter. These are actually a simplification used to condense the description of
arguments that need to be passed to a function. Whenever a function requires a
chain of numeric arguments of the same type, these arguments can be passed as the
correct number of individual values or variables of that type, or as a variable
containing an array of values of that type. Although this is possible with any chain of
values, it is most commonly used as the following:

Point = an array of three coordinate values.


Vector = an array of the three direction cosine values for a vector.
Matrix = an array of 9 values.

Point, Vector, and Matrix array type arguments can technically be of either
INTEGER (INT) or REAL data types. However, using an array of integers to hold
one of these data types may lead to inaccuracy because any floating point values
would be truncated during assignment.

You should therefore use all Point, Vector, and Matrix variables as arrays of
real numbers.

When the syntax summary of a function lists an argument with an array type of
Point, Vector, or Matrix, you can call that function using either the correct number
of individual values or the name of an array of that size. In some instances, it may be
most convenient to use both methods within the same function call. The condensed
form of points and matrixes is most useful when the value has been calculated by
another function or when a variable has been created specifically for that point,
vector, or matrix. The long forms of Points, Vectors, and Matrixes are more useful
when a variable does not exist with the correct values or when the values must be
calculated or modified.

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 5-3
5 Parametric Modeling Functions
Introduction

W If you accidentally pass an array larger than the requested size, the
additional values will be read for arguments following the current one.
This is probably not what you intended.

Example:

The VECTOR function performs a number of vector operations such as dot


product, cross product, and length calculation. The length calculating variant takes
two points as arguments and might be called as:
REAL rSnap0[3], rLength;
...
(RULE) THEN rLength = VECTOR( 'LENGTH ', rSnap0, 0, rDiameter,
rHeight / 2)

Syntax Conventions Used in Function Statements

The following table describes the style and syntax used to describe each function
statement:

Syntax Meaning
All capital letters Fixed text such as the function name
Example: EVALUATE
Angle brackets ( < >) Indicate an argument token, as previously explained
Underbar ( __ ) Indicates a default setting or selection
Curly brackets ( { } ) Indicate tokens that represent argument sets. Argument
sets are groups of arguments that commonly occur
together. To simplify documentation these are defined in
the next section of this chapter and are referenced in the
syntax summaries of the functions to follow.
Square brackets ( [ ] ) Indicate an optional argument or set of arguments.
Square brackets can be nested indicating that an optional
argument depends on another optional argument.
Where possible, commas (,) are included within the
square brackets for optional arguments. However, in
cases where all arguments are optional, you may need to
determine the placement of the commas to
appropriately delimit each set of arguments.
Example: <return_flag> = SOME_FUNCTION([ 'KEYWORD ',
<origin_point>,] <end_point>)

5-4 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Parametric Modeling Functions
Explanation of Syntax

Syntax Meaning
Vertical bar ( | ) Indicates an OR condition where one argument or
argument set can be present only if another is not. When
applicable, the default argument will be underlined. If
the option is between one set of arguments and another,
the entire set will be enclosed within an extra set of
square brackets.
Example of the use of the vertical bar (|) with the
rotational argument sets: 'ANGLE' or 'MATRIX'. Only one
of these can be applied to a function. That portion of
the syntax summary would look like the following:
[ 'ANGLE ', <alpha>, <beta>, <gamma>] | [ 'MATRIX
', <rot_matrix>]
Single quotation Used in three ways, two of which were mentioned in the
mark ( ' ) previous description of the keyword and variable name
token types. Single quotation marks can also be used to
specify text literal values. Single quoted text literals will
be converted to uppercase before being passed.
Double quotation mark Specify text literal values. The enclosed text is not
(") converted to uppercase.
Ellipsis (...) Used when a token or set of tokens can be repeated.
These tokens are numbered to indicate which tokens are
considered as a set. The token explanation will refer to
these repeatable sets as <token>*. One example is the
CELL_DETAILS function. This function can take multiple
pairs of keywords and variables to store data into. These
are listed as <detail_key*> and <detail_value*>.
Example: <flag> = CELL_DETAILS(<address> [, 'NO_CONVERT
'], '<detail_key0> ', <detail_value0>, '<detail_key1> ',
<detail_value1>, ...)

Argument Sets

Within the expert system language, there are sets of arguments that recur in the
same pattern across many functions. To simplify and shorten documentation, these
argument sets are described here one time as follows, and then referenced later
where appropriate:

{ROTATION}
Many functions operate in the local space of the rule file and require
a transformation to or from the global space. The

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 5-5
5 Parametric Modeling Functions
Introduction

{ROTATION}argument set is referenced when one of these functions


may optionally require a change of orientation. The syntax of the
{ROTATION}argument set is as follows:

[ 'ANGLE ', <alpha>, <beta>, <gamma>] | [ 'MATRIX ',


<rot_matrix>]

Token Data
Token Type Meaning
Name Type
ANGLE keyword (none) Use the following three angles
as Euler angles to specify a
change in orientation.
alpha variable or REAL Euler angle rotation about the
value Z axis
beta variable or REAL Euler angle rotation about the
value X axis
gamma variable or REAL Euler angle rotation about the
value Z axis
MATRIX keyword (none) Use the following matrix to
specify a change in
orientation.
rot_matrix variable or Matrix Rotation matrix
value

The RELOCATE function optionally allows the {ROTATION}


argument set. However, it also permits an alternative specification
of rotation. This alternative is described in the syntax summary
for RELOCATE.
{POSITION}
Many functions operate in the local space of the rule file and require
a transformation to or from the global space. The {POSITION}
argument set is referenced when one of these functions may
optionally require a translation. The syntax of the {POSITION}
argument set is as follows:

5-6 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Parametric Modeling Functions
Explanation of Syntax

'OFFSET ', <deltaX>, <deltaY>, <deltaZ>

Token
Token Type Data Type Meaning
Name
OFFSET keyword (none) Use the following three
numbers as offset
increments to shift the
origin along the axes as
specified.
deltaX variable or INT or Offset along X axis.
value REAL
deltaY variable or INT or Offset along X axis.
value REAL
deltaZ variable or INT or Offset along X axis.
value REAL

The RELOCATE function optionally allows the {POSITION}


argument set or an alternative, as described during that function's
syntax summary.

Examples of Syntax Summaries

<vector2> = VECTOR('CROSS_PROD', <vector0>, <vector1>,


'<magnitude> ')

Token Name Token Type Data Type Meaning


CROSS_PROD keyword (none) Calculate the cross
product of two following
vectors.
vector0 variable or Vector Direction cosines of
value input vector
vector1 variable or Vector Direction cosines of
value input vector
magnitude variable name REAL Magnitude of output
vector
vector2 return Vector Direction cosines of
output vector

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 5-7
5 Parametric Modeling Functions
Introduction

<angle> = VECTOR( 'DOT_PROD ', <vector0>, <vector1>[, 'DEG '| 'RAD


'])

Token Name Token Type Data Type Meaning


DOT_PROD keyword (none) Calculate the dot product of
two following vectors
vector0 variable or Vector Direction cosines of input
value vector
vector1 variable or Vector Direction cosines of input
value vector
DEG keyword (none) Measure angles in degrees
RAD keyword (none) Measure angles in radians
angle return REAL Angle between input vectors

<vector> = VECTOR( 'CROSS_PROD_3PTS ', <line0_end>, <start>,


<line1_end>, '<magnitude> ')

Token Name Token Type Data Type Meaning


CROSS_PROD_3PTS keyword (none) Calculate cross
product of line0
and line1
line0_end variable or Point End point of line0
value
start variable or Point Start point of both
value input lines
line1_end variable or Point End point of line1
value
magnitude variable name REAL Magnitude of
output vector
vector return Vector Direction cosines
of output vector

5-8 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Parametric Modeling Functions
Explanation of Syntax

<angle> = VECTOR( 'DOT_PROD_3PTS ', <line0_end>, <start>,


<line1_end>[, 'DEG '| 'RAD '])

Token Name Token Type Data Type Meaning


DOT_PROD_3PTS keyword (none) Calculate dot product
of line0 and line1
line0_end variable or Point End point of line0
value
start variable or Point Start point of both
value input lines
line1_end variable or Point End point of line1
value
DEG keyword (none) Measure angles in
degrees
RAD keyword (none) Measure angles in
radians
angle return REAL Angle between input
vectors

<vector> = VECTOR( 'CROSS_PROD_4PTS ', <line0_start>,


<line0_end>, <line1_start>, <line1_end>, <magnitude> ')

Token Name Token Type Data Type Meaning


CROSS_PROD_4PTS keyword (none) Calculate cross
product of line0
and line1
line0_start variable or Point Start point of line0
value
line0_end variable or Point End point of line0
value
line1_start variable or Point Start point of line1
value
line1_end variable or Point End point of line1
value
magnitude variable name REAL Magnitude of
output vector
vector return Vector Direction cosines
of output vector

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 5-9
5 Parametric Modeling Functions
Introduction

<angle> = VECTOR( 'DOT_PROD_4PTS ', <line0_start>,


<line0_end>, <line1_start>, <line1_end>[, 'DEG '| 'RAD '])

Token Name Token Type Data Type Meaning


DOT_PROD_4PTS keyword (none) Calculate dot product
of line0 and line1
line0_start variable or Point Start point of line0
value
line0_end variable or Point End point of line0
value
line1_start variable or Point Start point of line1
value
line1_end variable or Point End point of line1
value
DEG keyword (none) Measure angles in
degrees
RAD keyword (none) Measure angles in
radians
angle return REAL Angle between input
vectors

<vector> = VECTOR( 'DIR_COSINES ', <start>, <end>, '<magnitude>


')

Token Name Token Type Data Type Meaning


DIR_COSINES keyword (none) Calculate the direction
cosines of the vector
between the following
two points
start variable or Point Start point of line
value
end variable or Point End point of line
value
magnitude variable name REAL Magnitude of output
vector
vector return Vector Direction cosines of
output vector

5-10 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Parametric Modeling Functions
Explanation of Syntax

<length> = VECTOR( 'LENGTH ', <start>, <end>, '<vector> ')

Token Name Token Type Data Type Meaning


LENGTH keyword (none) Calculate the distance
between the following
two points
start variable or Point Start point
value
end variable or Point End point
value
vector variable name Vector Direction cosines of
output vector
length return REAL Length of output vector

<projection> = VECTOR( 'PROJECT ', <start>, <end>, <point0>[,


'<flag> '])

Token Name Token Type Data Type Meaning


PROJECT keyword (none) Project <point0> onto
line between <start> and
<end>
start variable or Point Start point of line
value
end variable or Point End point of line
value
point0 variable or Point Point to project onto line
value
flag variable name REAL Projection status:
0 = Projection within line
1 = Projection outside of
start
2 = Projection outside of
end
projection return Point Projected point

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 5-11
5 Parametric Modeling Functions
Introduction

<pt_on_line> = VECTOR( 'PT_ALONG ', <start>, <end>,


<distance>)

Token Name Token Type Data Type Meaning


PT_ALONG keyword (none) Calculate point
coordinates at <distance>
along line from <start> to
<end>
start variable or Point Start point of line
value
end variable or Point End point of line
value
distance variable or REAL Distance along line from
value start point
pt_on_line return Point Point at specified distance
along line from start point

<flag> = VECTOR( 'PLANE_LINE ', <point0>, <point1>, <point2>,


<start>, <end>, '<intersect> ')

Token Name Token Type Data Type Meaning


PLANE_LINE keyword (none) Calculate the intersection
between the plane defined by
following three points and line
from <start> to <end>
point0 variable or Point Point in plane
value
point1 variable or Point Point in plane
value
point2 variable or Point Point in plane
value
start variable or Point Start point of line
value
end variable or Point End point of line
value

5-12 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Parametric Modeling Functions
Introduction to Geometric Principles

Token Name Token Type Data Type Meaning


intersect variable name Point Intersection between line and
plane
flag return REAL Projection status:
0 = Error
1 = Success
2 = Points are colinear
3 = Line and plane are parallel
4 = Line has length zero
5 = Intersection point(s) off
plane

Introduction to Geometric Principles


Each rule file operates in its own local system of coordinates. Its local system can be
changed from the global system of coordinates by rotations and offsets, as follows:

The rotation can be expressed either as a matrix or as Euler angles.


The offset is defined by displacements along the global X, Y and Z
axes.

The primitive can first be rotated and then translated (that is, by using a rotation
keyword before the offset keyword), or translated and then rotated. All actions
occur about the local origin.

A right-hand Cartesian coordinate system is standard. In this system, the Z axis is


defined as the cross product of the X and Y axes. The cross product of two vectors
is a third vector normal to the plane of the first two vectors. The cross product is
found by pointing the thumb in the direction of the first vector and the fingers in
the direction of the second vector. The fingers then bend in the direction of the
third vector, the cross product.

The order of the vectors is important (for example, X by Y does not equal Y by
X).

Rotation
Rotation by Euler angles requires three angles commonly called alpha, beta, and
gamma. These angles represent rotations about the axes in the following order: Z,
X, followed by Z again.

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 5-13
5 Parametric Modeling Functions
Introduction to Geometric Principles

Euler Angles

'ANGLE ', <alpha, beta, gamma>

In a series of rotations, each subsequent rotation is performed according to the


new local orientation of the axes. The directions of rotation follow the right-
hand convention. The angles of rotation cannot be larger than 360 degrees.

For details on the operation of Euler angles, see Examples later in this section.

Matrixes

Rotation by matrix requires either an array variable with nine values or nine
individual values.

To rotate the primitive about the local Z axis, define the matrix as:
cos -sin 0
sin cos 0
0 0 1
where is the angle of rotation.

To rotate the primitive about the local X axis, define the matrix as:
1 0 0
0 cos -sin
0 sin cos
where is the angle of rotation.

To rotate the primitive about the local Y axis, define the matrix as:
cos 0 sin
0 1 0
-sin 0 cos
where is the angle of rotation.

To rotate a primitive about a combination of axes, simply multiply


the individual matrixes together. The function MATRIX( 'MULT
',...) can be used to multiply matrixes.

5-14 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Parametric Modeling Functions
Rotation

See the following examples for details on the usage of matrixes and the MATRIX
function for matrix features available in the Design Series. The MATRIX function
also includes an example of transformation matrixes, which allow for the scaling of
graphics.

Example 1

The following example rotates the graphic 90 degrees about the Z axis.
Euler Angles: (90,0,0)
Matrix:
0 -1 0
1 0 0
0 0 1.

Orientation before Rotation Orientation after Rotation

Example 2

The following example rotates the graphic 90 degrees about the X axis and relocates
the local coordinate system.
Euler Angles: (0,90,0)
Matrix:
1 0 0
0 0 -1
0 1 0

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 5-15
5 Parametric Modeling Functions
Introduction to Geometric Principles

Orientation before Rotation Orientation after Rotation

Example 3

The following example rotates a primitive 90 degrees about the Z axis, 90 degrees
about the X axis, and then 90 degrees about the Z axis again, resulting in a new local
coordinate system.
Euler Angles: (90,90,90)
Matrix:
0 0 1
0 -1 0
1 0 0

The following diagram shows the global coordinate system of the primitive. The
local and the global coordinate systems are the same because no rotations have
taken place.

Primitive before Rotation

5-16 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Parametric Modeling Functions
Rotation

The first rotation of 90 degrees will be executed about the Z axis. After the first
rotation in the following diagram, the local X axis is in the place of the global Y axis
(same as orientation in the first diagram). This orientation is the new local system
for the primitive.

Orientation after First Rotation

The second rotation will be executed about the local X axis. In the following
diagram, the new Y and Z axes reflect the system's rotation about the X axis.

Orientation after Second Rotation

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 5-17
5 Parametric Modeling Functions
Introduction to Geometric Principles

The final rotation will be performed about the new local Z axis (global X axis). The
following diagram shows the final orientation of the primitive and its local
coordinate system after three successive rotations.

Orientation after Third Rotation

Example 4

In the following example, the two different definitions produce the same result,
because both specify rotations about the Z axis. Gamma is useful only if the local
axes have been re-oriented by previous rotation(s) leaving the local Z axis in a new
position.
Euler Angles (90,0,0) or (0,0,90)
Matrix
0 -1 0
1 0 0
0 0 1

Direction Cosines

Direction cosines can be used to quickly decipher or determine matrixes. The


direction cosines reveal the position of the local axes in the higher level system of
coordinates. Specifically, the direction cosines are the cosines of the directions of the
axes, or the vectors that define the axes. The direction cosines for the global system
are (1,0,0), (0,1,0) and (0,0,1), for the X, Y, and Z axes, respectively. In a matrix, the
vectors for the X, Y, and Z axes are in columns from left to right. The global system
matrix is shown as follows:
1 0 0
0 1 0

5-18 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Parametric Modeling Functions
Rotation

0 0 1

To explain further, in the rotation matrix shown as follows:


0 0 1
0 -1 0
1 0 0

The first column is the local X axis orientation vector.


The second column is the local Y axis orientation vector.
The third column is the local Z axis orientation vector.

As shown in the earlier diagram after the third rotation:

The local X axis is aligned with the global Z axis and the direction
cosines are (0,0,1).
The local Y axis is aligned with the negative global Y axis and the
direction cosines are (0,-1,0).
The local Z axis is aligned with the global X axis and its direction
cosines are (1,0,0)

(The global coordinate system is shown in the diagram Primitive before Rotation on
page 5-16.)

Therefore, the orientation of any cell is determined by its matrix. For example, given
the following matrix of direction cosines:
0 0 1
0 1 0
1 0 0

it can be seen from the X vector (0,0,1) that:

The X axis is aligned with the global Z axis.


The Y vector (0,1,0) shows that the Y axis is aligned with the global
Y axis.
The Z vector (1,0,0) reveals that the Z axis is aligned with the global
X axis.

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 5-19
5 Parametric Modeling Functions
Introduction to Geometric Principles

Alternatively, the rotation matrix for a primitive can be established if its desired final
orientation is known. If a primitive is to assume the following orientation:

Orientation Example

Its local X axis vector is (1,0,0).


Its local Y axis vector is (0,0,-1).
Its local Z axis vector is (0,1,0) in terms of the global system.

Therefore:

The local X axis is aligned with the global X axis.


The local Y axis is aligned with the negative direction of the global
Z axis.
The local Z axis is aligned with the global Y axis.

Therefore, its rotation matrix is:


1 0 0
0 0 1
0 -1 0

Offset
The keyword and arguments:
'OFFSET ', <delta x, delta y, delta z>

specify the location of a local origin relative to the global origin in the design space.
These axial offsets are along the global axes.

5-20 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Parametric Modeling Functions
Sample Rule File

The following diagram shows a rectangular prism with dimensions X=1, Y=2 and
Z=3 that has been:

Offset 1 unit in the X direction


Offset 3 units in the Y direction
Offset 1 unit in the Z direction

The primitive origin is now offset from the design space origin, as shown:
PRIM( 'CUBE ', 'OFFSET ', 1,3,1, 1,2,3)

Offset Example

Sample Rule File


This sample rule file is provided to introduce the concept of rule programming in
the Design Series expert system. As detailed in the chapter Using the Expert System in
Design Series in the PlantSpace Design Series Administrator Guide, rules are executed in an
order determined first by step sequence: step[0] followed by step[1], then by
backward chaining inferencing, and finally by order of declaration. To illustrate this
process, each section of this sample rule file is preceded by a comment explaining its
purpose and order of execution. Additionally, each rule is labeled with a letter in the
left margin. These letters will be used to refer to different rules within the
explanatory comments.

BP5000.R is a custom rule file that creates a graphic element representation of a


threaded rod. As shown in the following excerpt, this rule would be invoked from
another rule file using the BUD function. Data required by this rule is passed down
from the calling rule file using the LIST option of the BUD function along with a
list of the variables whose values should be sent. The BP5000 rule uses the
INHERIT function to receive these values and store them in local variables. Since
BP5000 returns a value using the RETURN function, the calling rule file requires a
call to the ADOPT function.

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 5-21
5 Parametric Modeling Functions
Sample Rule File

(RULE) IF flag[2] > 0 THEN step[3] =


BUD( 'HGRPT_BP5000,,,PIPE ', 'LIST ', 0, 0, 0, snap1,
rodDia)
+ ADOPT( 'rodLen ')

The text of BP5000 follows:


! ============================================
! bp5000.r Parametric definition for part 5000 thread rod
both ends
! right hand threads
! ============================================

At the top of the file, the variable names for flags, steps, label, and physical data are
defined by the type and name along with optional descriptions.
!Procedural variables
INT step[2]; ! used to order execution
INT -flag[2]; ! used to order non-step function calls
! note use of 'always confirm ' option, '- ',
to aid
! in debugging. remove this option when
done.
!Local variables
TEXT tLabel ! store the built label here for the cell

!Inherited variables, set using INHERIT to get values from


calling rule
REAL rRodPt1[3], rRodPt2[3], rRodDia;

!Computed variables
REAL rRodLen, rRodMinrRodMatLen, rRodMat[9];

5-22 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Parametric Modeling Functions
Sample Rule File

The three computed variables are to be calculated on demand by inferencing. Rule A


is defined to set these variables as part of its conclusion (the THEN part of a rule).
This can be done in one rule or multiple rules. The calculation rule is not fired until
another rule uses one of these variables. Then the rule is fired and all of the variables
in the rule are set and available for use.

rRodLen is set by VECTOR function to be the distance between


the two points, rRodPt1 and rRodPt2.
rRodMat, the rod placement matrix, is set by the MATRIX
function using the same points.
rRodMinLen is computed to be six times the inherited
rRodDia.

! Compute rod placement parameters


Rule (RULE) THEN rRodLen = vector( 'length ', rRodPt1, rRodPt2)
A
AND rRodMat = matrix( '2_points ', rRodPt1, rRodPt2)
AND rRodMinLen = 6 * rRodDia

This is the first rule fired, the starting point. The expert system begins by checking
to see if step[0] has been assigned a value. It has not, so the inference engine finds a
rule that assigns a value to step[0] in the conclusion. When a rule is found (Rule B),
the inference engine checks if the premise can be satisfied before it runs the rule.
Since our Rule B has no premise, it is automatically TRUE and executes, setting a
value for step[0]. This value is the sum of the return values from the MESSAGE
function that wrote "CREATING ROD PART 5000" in the status field of the
MicroStation message screen and of the INHERIT function that passed data in
from the rule that called this one.
! Get inherited parameters
Rule (RULE) THEN step[0] = MESSAGE( 'ST ', 'creating rod part 5000 ')
B
+ INHERIT( 'rRodPt1, rRodPt2, rRodDia ')

Although the next rule defined in the file is for flag[0], it is not run immediately.
When the expert system has set step[0], it tries to set a value for step[1]. The
first rule to assign a value for step[1] is Rule D. Rule D uses flag[0] in it's
premise so the expert system looks for a rule to assign a value to flag[0], thus
finding and running Rule C.

This rule builds a label using the BUILD_LABEL function with a BUD_TYPE of
'HGRPT_BP5000'. The prompt_off keyword indicates that the user will not be
requested to input data into the label. The data is forced into the label by using pairs
of attribute names and their corresponding values, as a result of using the

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 5-23
5 Parametric Modeling Functions
Sample Rule File

force_att keyword. For example, cat_num is set to the value BP5000 and
part_id is set to a character representation of the number contained in
rRodDia.
! Create label for part cell
Rule
(RULE) THEN flag[0] = BUILD_LABEL( 'hgrpt_bp5000 ', 'tLabel ',
C
'prompt_off ', 'force_att ', 'cat_num ', 'bp5000 ',
'part_id ',

TO_CHAR( '%.3lf ', rRodDia), 'part_typ ', '%null% ')

This rule is an error check to confirm that the label was built. If the Rule C call to
BUILD_LABEL succeeded, flag[0] will have a value of 1 or more. If the label
building failed, this rule would detect this condition and write two messages:

ERROR CREATING ROD PART 5000 in the message field


CHECK THE HGRPT DATABASE in the prompt field of the
MicroStation command window.

The CONTROL function then aborts processing and writes the message: 'LABEL
FAILED ' in the error message field.
! Build part if label is good
Rule (RULE) IF flag[0] < 1 THEN step[1] =
D
MESSAGE( 'ms ', 'error creating rod part 5000 ',
'PR ', 'check the hgrpt database ')

+ CONTROL( 'err ', 'label failed ')

If Rule D's premise was not met, the inference engine will look at the next rule to set
step[1]. This search is conducted in the order that the rules are defined. If the
expert system is examining Rule E, the premise of Rule D must have failed, so we
know that flag[0] is not less than 1 and it is not necessary to repeat this
condition. However, explicitly stating all conditions for a rule premise is a good self-
documenting practice for your rules and can serve as a check on your logic. Rule E
uses both the flag[0] condition and checks for logic errors using a new
condition involving rRodMinLen.
(RULE) IF flag[0] = 1 and rRodLen < rRodMinLen
Rule THEN step[1] = MESSAGE( 'ms ', 'error creating rod part
E
5000 ')

5-24 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Parametric Modeling Functions
Sample Rule File

+ MESSAGE( 'pr ', to_char( 'rod length %.2lf too short


',rRodLen) )

+ CONTROL( 'err ', 'min length constraint ')

Finally, if the premises of the first two rules (D & E) for setting step[1] have not
been met, the inference engine will attempt Rule F. This rule has no explicit premise,
but implicitly requires that flag[0] is not less than 1 and that rRodLen >=
rRodMinLen. This rule demonstrates the principle explained in the Rule E
description.

The RELOCATE function applies the proper offset and orientation


matrix, rRodMat by inference, to the cell definition that follows.
The CELL function call starts cell creation, and sets values for its
identification, label and connect points.
The PRIM function identifies the type of primitive to use, orients it
in local space, and sets its dimensions.
CELL('END') marks the end of the cell creation.
The RETURN function makes rRodLen available to the calling
rule through the ADOPT function.

(RULE) THEN step[1] = RELOCATE( 'off ', rRodPt1, 'abs_mat ',


Rule rRodMat)
F + CELL( 'start ', 'bp5000 ', 'LABEL ',
tLabel, 'snap ',2,0,0,0,rRodLen,0,0)
+ PRIM( 'cyll ', 'solid ', 'ang ', 90,90,0, rRodDia/2,
rRodLen)
+ CELL( 'END ')
+ RETURN(rRodLen)

The end of the rules to be processed is denoted by (END).


(END)

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 5-25
5 Parametric Modeling Functions
Quick Lookup by Function Name

Quick Lookup by Function Name


The following table is a quick lookup of functions by name.

Function Name Function Description Page


ABS Returns the absolute value of a number 5-30
ABS_POINT Expresses the coordinates of a point in the 5-30
present system of coordinates (the next higher
level of nesting).
ACOS Returns the arc cosine of a number 5-31
ADOPT Assigns a value returned from a lower level to 5-32
a variable on the current level
ASIN Returns the arc sine of a number 5-32
ATAN Returns the arc tangent of a number 5-33
ATTRIBUTE_INFO Relocates all the primitives drawn following 5-33
the use of the MOVE_COORD statement
BUD Creates a Basic Unit of Design (BUD) 5-36
BUILD_LABEL Creates a Design Series label 5-41
CELL Creates a MicroStation cell using a standard 5-44
frame for cells
CELL_DETAILS Retrieves the details of a previously selected 5-47
cell
CHANGE Overrides the previously assigned value of a 5-53
variable or array
CHAR_TO_INT Converts text to an integer value 5-55
CHAR_TO_REAL Converts text to a real value 5-56
CLEAR Clears the value of a variable during the 5-57
evaluation of a set of variables
COLLECT Controls of the order of the values of variables 5-58
CONTROL Changes special characteristics and controls 5-59
internal processes
COS Returns the cosine of a number 5-63
DELETE_COMP Deletes a component at a given address in the 5-63
MicroStation design file
ENDSURF Terminates a SURFACE function 5-64
EVALUATE Returns value from rule file 5-64

5-26 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Parametric Modeling Functions
Quick Lookup by Function Name

Function Name Function Description Page


EXTRACT_VALUE Extracts label attribute values from the first 5-65
component being processed
EXTRACT_VALUE2 Extracts label attribute values from the second 5-66
component being processed
INHERIT Assigns values of specified attributes by 5-67
receiving values from the calling set of rules,
rather than by evaluation at the current level
INSERT_LABEL Inserts a label for a component into a cell after 5-68
the cell has been created
LEAD_CHARS Identifies the number of lead characters in a 5-70
string
LOAD_VALUE Assigns values of specified attributes by 5-70
receiving values from the calling set of rules,
rather than by evaluation at the current level
LOCAL_POINT Transforms a point (that you are passing) to a 5-72
BUD call
LOG Returns the natural (base e) log of a number 5-72
LOG_FILE Manages log files for progress tracking or error 5-73
messages
MATRIX Creates a rotation or transformation matrix 5-76
using a set of Euler angles (expressed in
degrees or radians), two points in space, three
points in space, or two matrixes
MAX Returns maximum value of a series of numbers 5-82
MESSAGE Displays messages on the MicroStation screen 5-82
MIN Returns minimum value of a series of numbers 5-86
MOVE_COORD Relocates all the primitives drawn following 5-87
the use of the MOVE_COORD statement
NUM_TO_CHAR Converts numbers to characters 5-88
PARSE_LABEL Extracts the value and related information of 5-89
an attribute from a Design Series label
PICK_POINT Retrieves the coordinates of a point on screen 5-91
selected by a user, or sets the origin of a cell by
using the selected or stored coordinate
PRIM Controls the creation of primitive graphic 5-92
images

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 5-27
5 Parametric Modeling Functions
Quick Lookup by Function Name

Function Name Function Description Page


QUERY Queries the Design Series database 5-95
RELOCATE Changes the location or orientation (or both) 5-97
of the cell
REPLACE_LABEL Changes the label of an existing cell in the 5-98
master design file
RETURN Passes to a higher level, values obtained on the 5-99
current level
SELECT_CELL Selects a cell from a design file and returns its 5-103
address in the file and Design Series label
SIN Returns the sine of a number 5-106
SQRT Returns the square root of a number 5-106
STR_EDIT Returns an edited copy of a second string 5-107
argument
STR_FIND Returns a number indicating the string location 5-108
within a string, the length of a text string, or an
indicator that the string is or is not numeric
STR_LENGTH Determines the length of a string 5-110
STR_MATCH Determines that a sub-string is or is not found 5-110
within a string
STR_MID0 (zero) Extracts a text sub-string from a text string 5-111
variable
STR_MID1 Copies a portion of a text string to another 5-112
character variable
STR_REPLACE Performs text string substitution 5-113
STRIP Returns a normalized transformation matrix 5-114
SUB Calls sub-rules 5-114
SURFACE Creates surfaces by using graphics primitives 5-116
TAN Returns the tangent of a number 5-118
TIME Creates a text string of information on time or 5-119
date (or both)
TO_CHAR Converts numbers to text strings and embeds 5-120
values from the rules into a text string for
display
UNITS Converts values from one system of units to 5-122
another system of units

5-28 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Parametric Modeling Functions
Former Function Names

Function Name Function Description Page


UOR_LOCAL_POINT Converts a point from global space to Design 5-124
Series local space
USER_INPUT Gets information by receiving a data point, a 5-125
reset, or a key-in string from the user
VECTOR Calculates various point and vector dimensions 5-128

Former Function Names


The following table shows the former function names that were familiar to you and
their current names used in the previous table.

Former Name Current Name


ASSEMBL MOVE_COORD
CHAR$INT CHAR_TO_INT
CHAR$REAL CHAR_TO_REAL
ENCODE$VALU NUM_TO_CHAR
EXTRACT STR_MID0
LABEL$VALU EXTRACT_VALUE
LABEL$VALU2 EXTRACT_VALUE2
LEAD$CHARS LEAD_CHARS
LOCAL_PT LOCAL_POINT
MAX$VALU MAX
MIN$VALU MIN
PARAM$VALU EVALUATE
PROMPT_VAL USER_INPUT
STREDT STR_EDIT
STRG$SIZE STR_LENGTH
STRING$EXT STR_MID1
STRG$SIZE STR_LENGTH
STRING$EXT STR_MID1
STRING$MATCH STR_MATCH
STRING$REPLACE STR_REPLACE
STRNUM STR_FIND

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 5-29
5 Parametric Modeling Functions
Functions

Former Name Current Name


TEXT_LAB INSERT_LABEL
UOR_LOCAL_PT UOR_LOCAL_POINT

Functions

ABS
This function returns the absolute value of its argument, which is a numeric
expression of data type INT or REAL. The absolute value is the sign independent
value of the argument.

This function cannot be called in a rule that sets the step[ ] array variable to
control the order of rule processing.

Syntax
<abs_num> = ABS(<number>)

Token
Token Type Data Type Meaning
Name
number variable or REAL Number to absolute value
value
abs_num return INT or Absolute value of
REAL <number>

ABS_POINT
This function expresses the coordinates of a point in the present system of
coordinates in the next higher level of nesting, or transforms a point in the local
coordinate system to the coordinate system of the calling rule. This function is
useful in creating nested objects in which coordinates of points in the child object
are needed for use in the parent object.

This function cannot be called in a rule that sets the step[ ] array variable to
control the order of rule processing.

5-30 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Parametric Modeling Functions
ACOS

Syntax
<trans_point> = ABS_POINT([ 'MATRIX ', <rot_matrix>,] <point>)

Data
Token Name Token Type Meaning
Type
rot_matrix variable or Matrix Rotation matrix to apply
value
point variable or Point Local point to convert
value
trans_point return Point Transformed point

Example
Whenever the coordinates of a point are returned to a higher level rule, the
ABS_POINT function should be used to transform the point to that coordinate
system. In the following example, a point PNT is defined and then returned to the
parent rule.
(RULE) THEN PNT = ABS_POINT(0,0,P2)
(RULE) THEN RETURN(PNT)

ACOS
This function returns the inverse function for the cosine of an angle. It takes one
argument, a numeric expression.

This function cannot be called in a rule that sets the step[ ] array variable to
control the order of rule processing.

Syntax
<angle> = ACOS(<angle_cos>)

Token Data
Token Type Meaning
Name Type
angle_cos variable or REAL Cosine of an angle
value
angle return REAL Angle in degrees whose cosine
is <angle_cos>

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 5-31
5 Parametric Modeling Functions
Functions

ADOPT
This function assumes that an assignment has not already been made to the variable
on the current level. This function loads each variable listed in its argument string,
which has not yet otherwise been assigned a value, with the value returned from a
lower set of rules using the RETURN function. The argument list for this function
need not completely duplicate the argument list of the corresponding RETURN
function. The list must not be longer than the number of returned values. The list
can be terminated at any place but no values can be skipped between the starting
and terminating values. Therefore variables that need the values returned from lower
functions to proceed must be specified at the beginning of the list. Variables that can
be evaluated locally if not returned from the lower functions should be placed later
in the list for flexibility.

This function must be called in a rule that sets the step[ ] variable. For details,
see Using the Step Array Variable to Control the Order of Processing and Running
Rules on page 9-18 in the PlantSpace Design Series Administrator Guide.

Syntax
<flag> = ADOPT( '<variables> ')

Token Token Data


Meaning
Name Type Type
variables variable (varies) List of variable names to store
name values
flag return INT 1 for success or 0 for failure

Example
In the following example, the ADOPT function retrieves values from a lower-level
rule for the variables DIAM and SIZE. The lower rule must have used the
RETURN function to return values to these variables.
ADOPT( 'DIAM, SIZE ')

ASIN
This function returns the inverse function for the sine of an angle. It takes one
argument, a numeric expression.

This function cannot be called in a rule that sets the step[ ] array variable to
control the order of rule processing.

5-32 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Parametric Modeling Functions
ATAN

Syntax
<angle> = ASIN(<angle_sin>)

Data
Token Name Token Type Meaning
Type
angle_sin variable or REAL Sine of an angle
value
angle return REAL angle, in degrees, whose sine
is <angle_sin>

ATAN
This function returns the inverse function for the tangent of an angle. It takes one
argument, a numeric expression.

This function cannot be called in a rule that sets the step[ ] array variable to
control the order of rule processing.

Syntax
<angle> = ATAN(<angle_tan>)

Data
Token Name Token Type Meaning
Type
angle_tan variable or REAL Tangent of an angle
value
angle return REAL Angle in degrees whose
tangent is <angle_tan>

ATTRIBUTE_INFO
This function reads the ATTRDEFN table of the project database to retrieve
information about the attributes of a Design Series component type. The
information available is not a value specific to a component, but to all components
of that type. For example, this function can get the number of decimal places of the
SIZE_1 attribute of a fitting, but cannot get the value for SIZE_1. Use the
PARSE_LABEL function to read values for a specific component.

This function cannot be called in a rule that sets the step[ ] array variable to
control the order of rule processing.

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 5-33
5 Parametric Modeling Functions
Functions

Syntax
<attr_string> = ATTRIBUTE_INFO(<bud_type> | '<label> ',
<attr_name>, '<attr_key> ')

Data
Token Name Token Type Meaning
Type
bud_type variable or TEXT Name of BUD type to
value retrieve information for
label variable name TEXT Design Series label for the
component to retrieve
information from
attr_name variable or TEXT Attribute to retrieve
value information for
attr_key keyword (none) One of the keywords (in the
following table) to indicate
what information is
requested for the
<attr_name> attribute
attr_string return TEXT Value of the attribute
characteristic

5-34 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Parametric Modeling Functions
ATTRIBUTE_INFO

Attribute Keywords Used with <attr_key>


Attribute Keyword Description
APP_FLAGS Application flags (BEMCR)
Indicates if this label field should be displayed or
copied for a particular label operation. The
allowable flags are:
A = Automatically set single value
B = build label
C = copy label
E = edit single label
M = edit multiple labels
R = read label
H = do not display the attribute if only one value
exists for that attribute
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.
BOX_ORDER Order of appearance in dialog box
CASE U = upper
L = lower
N = numeric
DATA_TYPE Data type:
1 = string
2 = real
3 = integer
DEC_PLACES Number of decimal places in prompt
DEFAULT_VALUE Default value of attribute
DESCRIPTION Description of attribute appearing in the dialog box
GRAPHICS_RELATED Graphics related indicator (Y for yes or N for no)

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 5-35
5 Parametric Modeling Functions
Functions

Attribute Keyword Description


IN_METHOD_TYPE Returns a number that corresponds to an input
method type including:
1 = KEYIN
2 = QUERY (Dynamic), which contains a variable
that allows the results to change
3 = QUERY (Static), which always returns the same
results
4 = VALUES
5 = CREATE DATE
6 = MODIFY DATE
7 = UNIQUE ID
INPUT_METHOD Returns the text coded into the ATTRDEFN.DAT
table for the input method, such as: KEYIN,
VALUE..., and QUERY
LABEL_POS Position of attribute within the label
LABEL_WIDTH Width of attribute within the label
OVERRIDE_ALLOWED Indicator for input override: (Y for yes or N for no)
UNITS Units of attribute: MM, IN, FT

Example 1
In the following rule, the ATTRIBUTE_INFO function is used to set TYPE_VAL
to the data type of the diameter attribute of the component identified by the Design
Series label stored in LABEL1.
(RULE) THEN TYPE_VAL = ATTRIBUTE_INFO( 'LABEL1 ', 'DIAMETER ',
'DATA_TYPE ')

Example 2
In the following rule, the ATTRIBUTE_INFO function returns the label position
of the SIZE_1 attribute of the PIPE_PBRN component type. This value is
returned as a string, despite its numeric value. Use CHAR_TO_REAL or
CHAR_TO_NUM to convert this string to a numeric value.
(RULE) THEN POSITION = ATTRIBUTE_INFO( 'HVAC_HVDC ', 'ANGLE ',
'LABEL_POS ')

BUD
This function creates a parametrically modeled Basic Unit of Design (BUD) by
using expert system rules. A BUD can be a BUD cell or a rule that calls another
BUD function to actually create the BUD. The BUD function can call other BUD

5-36 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Parametric Modeling Functions
BUD

functions and can be used recursively, that is, a rule can call itself (as shown in
Example 3 at the end of this topic).

This function must be called in a rule that sets the step[ ] variable. For details,
see Using the Step Array Variable to Control the Order of Processing and Running
Rules on page 9-18 in the PlantSpace Design Series Administrator Guide.

Syntax
<flag> = BUD('<bud_type> | <rule_name> [, [<subcode1>],
[<subcode2>], [<product>], [<application>]]', [{ROTATION},]
[{POSITION},] ['LIST', <variable0> [, <variable1>] [,...]])

Data
Token Name Token Type Meaning
Type
bud_type value TEXT Name of the class to identify
the rule (explained in the
following section)
rule_name value TEXT Name of the specific rule to
run (explained in the
following section)
subcode1 value TEXT Matches to
EXPERT_RULES
(explained in the following
section)
subcode2 value TEXT Matches to
EXPERT_RULES
(explained in the following
section)
product value TEXT Design Series product class:
PIPE, CONC, and so on
(explained in the following
section)
application value TEXTDefaults to PSDS unless
otherwise specified here
{ROTATION} (See the argument set for {ROTATION} on page 5-5.)
{POSITION} (See the argument set for {POSITION}on page 5-6.)
LIST keyword (none) Precedes the list of variables
to be passed to the BUD rule

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 5-37
5 Parametric Modeling Functions
Functions

Data
Token Name Token Type Meaning
Type
variable* variable or (varies) Variables to be passed to the
value BUD rule for inheritance.
The list of variables must
agree in order and data type
(including array dimensions)
with the list to be inherited,
although the names can be
different. The number of
variables in either list can be
shorter or longer than the
corresponding list, but no
arguments can be skipped.
Therefore, those variables
that must be passed and
inherited must be specified
first in the lists.
flag return INT 1 for success or 0 for failure

Loading Expert System Rules


The Design Series parametric modeling system reads the modeling rules for the
BUD from either a text file or the EXPERT_RULES table in the database. The
expert system selects the source for the particular rule (that is, the text file or the
database table) after considering the name of the requested BUD (or rule), the
PS_RULES directory, and the data in the CLASSES table. The tables on the
following pages show the details of this consideration scheme. The following
describes the scheme.

First, the bud_type argument is used to search the BUD_TYPE column of the
CLASSES table. If a match is found, the product name is set to the value of the
LEVEL_1 column of the CLASSES table unless a product name was supplied with
the bud_name argument. The application name is set to 'PSDS' by the expert
system unless an application name was supplied with the bud_type argument.
The LEVEL_* columns of the CLASSES table are used to select the applicable
label attributes from the ATTRDEFN table. These attributes are loaded into the
expert system and used within the rules just like any other expert system variable
declared in the rule file (of course, the rules themselves must not declare variables of
the same names). If the BUD_RULE in the CLASSES table is not NULL,
RULE_NAME is set to this value. Otherwise, RULE_NAME is set to the
bud_type.

On the other hand, if the bud_type is not found in the BUD_TYPE column of
the CLASSES table, then RULE_NAME is directly set to the bud_type. The

5-38 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Parametric Modeling Functions
BUD

subcodes, product name, and application name are set as specified with the
bud_type argument. For those arguments that are not supplied, only the
application name is automatically set by the expert system.

If PS_RULES is defined and that directory contains a text file named


RULE_NAME, as assigned earlier, then the expert system uses this text file for its
modeling rules. If the configuration variable is not defined or the named file is not
found, then the expert system selects the rules from the EXPERT_RULES table
using the rule name, the two search codes, the product name, and the application
name (RULE_NAME, SUBCODE1, SUBCODE2, PRODUCT, and
APPLICATION, respectively). If no rules are located by this procedure, an error is
returned.
Example 1
In the following example, the BUD function call creates a cylinder or truncated cone
using the two sizes and two end preparations. Because the RED_2 name does not
match any BUD_TYPE in the CLASSES table, this is a RULE_NAME and not a
BUD_TYPE. If the logical PS_RULES is not defined, then the expert system
extracts the rules from the EXPERT_RULES table where RULE_NAME =
'RED_2', SUBCODE1 and SUBCODE2 are NULL, PRODUCT = 'PIPE', and
APPLICATION = 'PSDS' (using the arguments specified in the BUD function
call). If PS_RULES is defined, then the rules are read from the text file,
PS_RULES:RED_2.R. In either case, the BUD will be rotated by Euler angles
(90,45,0) relative to the orientation of the BUD and located at the point (20,30,15) in
the local space.
BUD('RED_2,,,PIPE,PSDS', 'ANGLE',90,45,0, 'OFFSET',
20,30,15),
'LIST' . . .

Partial Pipe Product Data in the CLASSES Table

bud_rule
level_1 level_2 level_3 level_4 level_5 bud_type bud_table database comptype
s
PIPE PGKT PIPE_PGKT PIPE_BUD GASKET PIPE PGKT

Example 2
In the following example, the BUD function call creates a gasket. Because the
'PIPE_PGKT' name does indeed match a BUD_TYPE in the CLASSES table, this
is a BUD_TYPE and not a RULE_NAME. If the configuration variable PS_RULES
is not defined, then the expert system extracts the rules from the EXPERT_RULES
table where RULE_NAME = 'GASKET' (from the BUD_RULES column of
CLASSES), SUBCODE1 and SUBCODE2 are NULL, PRODUCT = 'PIPE' (from
the $PRODUCT directive), and APPLICATION = 'PSDS' (from the expert system
default). If PS_RULES is defined, then the rules are read from the text file,
PS_RULES:GASKET.R. In either case, the BUD will be transformed using the

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 5-39
5 Parametric Modeling Functions
Functions

matb matrix and offset by a,b,c + h relative to the orientation of the BUD
function in its creation space. The variables gasketlbl and pl_code are
supplied to the BUD rules for use as appropriate.
$PRODUCT = 'PIPE'
BUD('PIPE_GASKET', 'MATRIX',matb, 'OFFSET',a,b,c + h,
'LIST', gasketlbl,pl_code)

Example 3
The following example shows how recursive function calls can be used to create
cable tray with a maximum fixed length.
INT step[5];
INT remaining_length; ! remaining length of tray
routing
INT section_length; ! max length of a tray section
INT current_length; ! current tray length
char label;
! Inherit the label, the remaining routing length, and the
maximum
! length of a tray section
(RULE) THEN step[0] = inherit( label, remaining_length,
section_length )

! Calculate the length of the current tray section as the


lesser of
! the remaining routing length or the max section length
(RULE) THEN current_length = MATH( 'MIN', remaining_length,
section_length )

! Read the tray width and depth from the label


(RULE) THEN width = parse_label(label, 'width')
(RULE) THEN depth = parse_label(label, 'depth')

! Build the current tray section cell

5-40 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Parametric Modeling Functions
BUILD_LABEL

(RULE) THEN step[1] = CELL('START', 'CTRAY', 'LABEL', label,


'SNAP', 2, 0,0,0, current_length,0,0)

+ PRIM('duct_seg', 'ANGLE',90,90,0, width, depth,


current_length)
+ CELL('END')

! This step checks if we need to build any more sections; if


so, we call
! this rule again with a reduced routing length.
(RULE) IF remaining_length - current_length > 0 THEN step[2]
=
BUD('CTRAY', 'LIST', label, remaining_length -
current_length, section_length)
(END)

BUILD_LABEL
This function is used to build the Design Series label for a component. All the
standard features of Design Series are incorporated including specification lookups
and matching. This function also silently builds the label (that is, without user
interaction), to force required values into specific attributes, and to present default
values to the user that are different from the default value normally returned from
the Design Series-serving database.

W Spec lookups and validation tables cannot be overridden.

If a forced, default or matching attribute value cannot be used (for example, because
it cannot be validated or because it is too long for the current label field, and so on),
an error is displayed. In the case of a default attribute, you can continue label
creation. An error loading a forced attribute causes a fatal error. If the value
provided for a default or forcing attribute is actually a blank string, the attribute
name and its value argument are ignored. This feature allows the rules for
components called as subroutines to include forced and default attribute-value pairs
in the BUILD_LABEL function call where the values are normally inherited from
the calling routine. However, if the calling routine did not actually supply some or all
of these values, the BUILD_LABEL function acts as if these attributes were not
even listed in the function call.

This function cannot be called in a rule that sets the step[ ] array variable to
control the order of rule processing.

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 5-41
5 Parametric Modeling Functions
Functions

Syntax
<flag> = BUILD_LABEL(<bud_type>, '<new>' [,'MATCH', <base>]
[,'PROMPT_OFF' |'PROMPT_ON' [,'STATUS_FLD', <message>]]
[,'ERROR_ABORT'|'ERROR_CONTINUE'] [,'DEFAULT_ATT',
<attr_name_value0>|[<attr_name0>, <attr_value0>],
<attr_name_value1>|[<attr_name1>, <attr_value1>], [...]]
[,'FORCE_ATT', <attr_name_value2>|[<attr_name2>,
<attr_value2>], <attr_name_value3>| [<attr_name3>,
<attr_value3>], [...]])

Data
Token Name Token Type Meaning
Type
bud_type variable or TEXT BUD type of label to
value create
new variable name TEXT New label
MATCH keyword (none) Use the following label as
a basis for the new label.
This keyword is ignored if
the following text string is
empty.
base variable or TEXT Label to use as basis
value
PROMPT_OFF keyword (none) Turn off user prompting.
PROMPT_ON keyword (none) Turn on user prompting.
STATUS_FLD keyword (none) Display the following
prompt to the user if
prompting is enabled.
message variable or TEXT Prompt to display
value
ERROR_ABORT keyword (none) Force the expert system
to abort on error
detection.
ERROR_CONTINUE keyword (none) Ignore errors. The
function returns the value
1 for success.

5-42 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Parametric Modeling Functions
BUILD_LABEL

Data
Token Name Token Type Meaning
Type
DEFAULT_ATT keyword (none) Use the following name-
value paired data to set
default values for named
attributes. One or more
pairs are possible.
Interpretation of pairs
ends at 'FORCE_ATT' or
function end.
attr_name_value* variable or TEXT Name and comma-
value separated or space-
separated value. Use
'%NULL%' to force a
blank value
attr_name* variable or TEXT Name of attribute to
value which to assign the
following value
attr_value* variable or (varies) Value to assign to the
value preceding named
attribute. Use '%NULL%'
to force a blank value.
FORCE_ATT keyword (none) Use the following name-
value paired data to force
values for named
attributes. One or more
pairs are possible.
Interpretation of pairs
ends at function end.
flag return INT 1 for success or 0 for
failure

Example
The following example creates a label having the BUD type 'pipe_brn' and a label
name 'label'. The created label attributes will initially MATCH those in the label
"matching_label". The 'FORCE_ATT' keyword causes size_1 to be set to 6.0,
and conn_1 to be set to BW. The 'DEFAULT_ATT' keyword also sets the default
values for the attributes lineno, system and spec.
(RULE) THEN flag = BUILD_LABEL('pipe_pbrn','label',
'MATCH', matching_label,

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 5-43
5 Parametric Modeling Functions
Functions

'DEFAULT_ATT',

'lineno', '010',

'system %NULL%',
'spec', '%NULL%',

'FORCE_ATTv,

'size_1', '6.0',

'conn_1, BW')

CELL
The function creates a MicroStation cell using a standard frame for cells. A standard
frame for cells consists of any or all of the following: cell header, a text element
containing a Design Series label, and connect point(s). The contents of the cell
depend on the set of arguments passed to this function.

The CELL function must always be called in pairs. The first CELL function call
marks the start of the cell and the second call marks the end of the cell. The CELL
function can be called as many times as needed within a single level of rules. Cells
can be nested up to six levels deep.

This function must be called in a rule that sets the step[ ] variable. For details,
see Using the Step Array Variable to Control the Order of Processing and Running
Rules on page 9-18 in the PlantSpace Design Series Administrator Guide.

Syntax for Starting a Cell


<flag> = CELL('START', <cell_name> [,'NAME', '<marker>'] [,
['LABEL', <label>]|'NOLABEL'] [,'SNAP', <num_snaps>, <snap0>,
<snap1>, ...]

Token Data
Token Type Meaning
Name Type
START keyword (none) Indicate that this CELL call is
the start of a cell.
cell_name variable or TEXT Name of the cell
value

5-44 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Parametric Modeling Functions
CELL

Token Data
Token Type Meaning
Name Type
NAME keyword (none) Use the following string as a
marker to allow the later
insertion of a label using
INSERT_LABEL.
marker value TEXT Marker to use for later
insertion of the label using
INSERT_LABEL
LABEL keyword (none) Insert the following label into
this cell. You can build a label
by using the BUILD_LABEL
function.
label variable or TEXT Label to insert into cell
value
NOLABEL keyword (none) Do not place a label in this
cell.
SNAP keyword (none) Indicate that the following
data should be used to place
connect points in this cell.
num_snaps variable or INT Number of connect points to
value follow
snap* variable or Point Connect point coordinates.
value You can have multiple points
defined, but by convention,
the first point should be the
cell origin at local coordinates
(0,0,0).
flag return INT 1 for success or 0 for failure

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 5-45
5 Parametric Modeling Functions
Functions

Syntax for Ending a Cell


<flag> = CELL( 'END' [, 'NORM ', <scaleX>, <scaleY>, <scaleZ>])

Token
Token Type Data Type Meaning
Name
END keyword (none) Indicate that this CELL call is
the end of a cell. This call must
end cell construction before a
call to RETURN.
NORM keyword (none) Use the following three scale
factors to scale the rotation
matrix of the cell so that the
cell will simulate a cell that has
been taken from a cell library.
scaleX variable or INT or X axis scale
value REAL
scaleY variable or INT or Y axis scale
value REAL
scaleZ variable or INT or Z axis scale
value REAL
flag return INT 1 for success or 0 for failure

Example 1
The following example creates the cell TANK1 with no label or connect points.
(RULE) THEN step[0] CELL('START', 'TANK1', 'NOLABEL')
...
(RULE) THEN step[1] CELL('END')

Example 2
The following example creates the cell TANK1 with a default label and two connect
points, the first at the point of origin and the second at the point (100,0,0) of the
local (cell) system of coordinates.
INT snap2[3] = {100,0,0};
(RULE) THEN step[0] CELL('START','TANK1','SNAP',2, 0,0,0, snap2)
...
(RULE) THEN step[1] = CELL('END')

5-46 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Parametric Modeling Functions
CELL_DETAILS

Example 3
The following example creates the cell 'BEAM' with two connect points, the first at
the origin and the second at the point (100,0,0) of the local (cell) system of
coordinates. Because it is desirable that this cell be the same as that taken from the
cell library where the initial sizes are 1 sub-unit by 1 sub-unit by 1 sub-unit, it is
normalized or scaled to the proper size. (See the section on "Working Units" in the
MicroStation User's Guide.)
(RULE) THEN step[0] CELL('START','BEAM','SNAP',2,0,0,0,100,0,0)
...
(RULE) THEN step[1] CELL('END','NORM',1,1,1)

Example 4
The following example creates the cell 'CLEVIS' with one connect point at the
origin. The cell is given the label contained in the 'label' text variable.
text label[1,80] text
...
(RULE) THEN step[0] CELL('START', 'CLEVIS', 'LABEL', label,
'SNAP', 1, 0,0,0)

...
(RULE) THEN step[1] CELL('END')

CELL_DETAILS
This function is used to retrieve details of a selected cell for later use within the
expert system rules.

This function cannot be called in a rule that sets the step[ ] array variable to
control the order of rule processing.

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 5-47
5 Parametric Modeling Functions
Functions

Syntax for Retrieving Multiple Cell Details


<flag> = CELL_DETAILS(<address> [, 'NO_CONVERT']
[,<detail_key0>, '<detail_value0>'] [,<detail_key1>,
'<detail_value1>'] [, ...])

Data
Token Name Token Type Meaning
Type
address variable or INT[3] Block, byte, and file number
value of cell to examine. Use
SELECT_CELL to get this
address data.
NO_CONVERT keyword (none) Prevent the expert system
from performing coordinate
conversions.
Note: Data, depending on
its type, is either:
Returned as it is read from
the design file (for
example, text weight,
global range)
Adjusted to reflect the way
that the Design Series
modeling system maintains
certain data (that is,
adjusting the origin,
connect points, local
range, and so on to reflect
the UOR conversion value
and, if appropriate, the
local Design Series system
coordinates).
This adjustment can be
prevented by including the
'NO_CONVERT' keyword
following the address data.
detail_key* keyword (none) One of the keywords (in the
Keyword Table that follows)
to indicate what data should
be stored in the next variable.
Multiple details can be
requested.

5-48 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Parametric Modeling Functions
CELL_DETAILS

Data
Token Name Token Type Meaning
Type
detail_value* variable name varies Store detail specified by the
preceding keyword. Data
type is based on the
Keyword Table that follows.
flag return INT 1 for success or 0 for failure

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 5-49
5 Parametric Modeling Functions
Functions

Syntax for a Single Cell Detail


<detail_value> = CELL_DETAILS(<address> [, 'NO_CONVERT'],
<detail_key>)

Data
Token Name Token Type Meaning
Type
address variable or INT[3] Block, byte, and file number
value of cell to examine. Use
SELECT_CELL to get this
address data.
NO_CONVERT keyword (none) Prevent the expert system
from performing coordinate
conversions.
Note: Data, depending on
its type, is either:
Returned as it is read from
the design file (for
example, text weight,
global range)
Adjusted to reflect the way
that the Design Series
modeling system maintains
certain data (that is,
adjusting the origin,
connect points, local
range, and so on to reflect
the UOR conversion value
and, if appropriate, the
local Design Series system
coordinates).
This adjustment can be
prevented by including the
'NO_CONVERT' keyword
following the address data.
detail_key keyword (none) One of the keywords (in the
Keyword Table that follows)
to indicate what data should
be returned by the function
detail_value return (varies) Detail specified by
<detail_key>. Data type is
based on the Keyword Table
that follows.

5-50 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Parametric Modeling Functions
CELL_DETAILS

Keyword Table for detail_key


Detail Keyword Data Type Cell Property Retrieved
CELL_NAME TEXT[1,6] Cell name
GLOBAL_RANGE INT[6] Cell global range cube
GRAPHIC_GROUP INT Graphic group number of the cell. An integer
value of '0' means the cell is not part of any
graphic group.
LOCAL_RANGE REAL[6] Cell local range cube
NTMATRIX matrix Normalized cell transformation matrix
(magnitude of the longest axis equals 1.0).
NUM_SNAP_PTS INT Number of connect points in the cell.
ORIGIN point Cell origin
SCALE_FACTORS Point Magnitudes of the a, b and c axes as extracted
from the transformation matrix.
SELECTED_TYPE INT MicroStation element type (2: cell, 4: line string,
and so on)
SNAP_COLOR INT Last connect point color
SNAP_LEVEL INT Last connect point level
SNAP_POINTS variable All cell connect points. Array must be sized to 3
name * NUM_SNAP_PTS.
SNAP_POINTS(N) point Nth connect point only where the first connect
point in the cell is 1.
SNAP_WEIGHT INT Last connect point line weight
TEXT_COLOR INT Text color
TEXT_LEVEL INT Text level
TEXT_WEIGHT INT Text line weight
TMATRIX Matrix Cell transformation matrix

Example 1
The following example uses the cell address array addr obtained by using the
SELECT_CELL function and places the values corresponding to the keywords into
the variable that follows each keyword. A value is returned to the flag variable
indicating failure or success.
INT addr[3];
(RULE) THEN flag =

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 5-51
5 Parametric Modeling Functions
Functions

CELL_DETAILS(addr,
'TMATRIX', 'tmatrix',

'NTMATRIX', 'ntmatrix',

'SCALE_FACTORS', 'scale_factors',

'ORIGIN', 'origin',

'SNAP_POINTS', 'snap_points',

'SNAP_POINTS(1)','snap_point1',

'SNAP_POINTS(2)','snap_point2',

'GLOBAL_RANGE', 'global_range',

'LOCAL_RANGE', 'local_range',

'CELL_NAME', 'cell_name',

'GRAPHIC_GROUP', 'graphic_group',

'TEXT_COLOR', 'text_color',

'TEXT_LEVEL', 'text_level',

'TEXT_WEIGHT', 'text_weight',

'SNAP_COLOR', 'snap_color',

'SNAP_LEVEL', 'snap_level',

'SNAP_WEIGHT', 'snap_weight',

Example 2
In the following example, this rule obtains the TMATRIX from the cell identified by
its address addr.
(RULE) THEN tmatrix = CELL_DETAILS(addr, 'TMATRIX')

Example 3
In the following example, this rule returns the coordinates of the first connect point
of the cell without UOR (units of resolution in MicroStation) conversion to the
variable actual_snap_point1.
(RULE) THEN actual_snap_point1 =
CELL_DETAILS(addr[0],addr[1],addr[2],
'NO_CONVERT', 'SNAP_POINTS(1)')

5-52 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Parametric Modeling Functions
CHANGE

Example 4
In the following example, this rule obtains the total number of connect points
contained in the cell, identified by the address array addr, and returns it to the
variable num_snaps.
(RULE) THEN num_snaps = CELL_DETAILS(addr,
'NUM_SNAP_PTS')

CHANGE
Customarily, a monotonic expert system does not allow the value of a variable to be
changed after its original assignment. This function assigns a new value to a
previously assigned variable, thereby overriding the previous value. This feature can
be useful in looping constructs within the rules (for example, as a loop counter).

This function cannot be called in a rule that sets the step[ ] array variable to
control the order of rule processing.

Syntax for Changing Individual Variables


<flag> = CHANGE('INCR'|'DECR'|'TO', <variable>, <change>)

Data
Token Name Token Type Meaning
Type
INCR keyword (none) Increment <variable>
by <change>
DECR keyword (none) Decrement <variable>
by <change>
TO keyword (none) Set <variable> to
<change>
variable variable name (varies) Unquoted name of variable
to modify
change variable or (varies) Value to use in modification
value
flag return INT 1 for success or 0 for failure

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 5-53
5 Parametric Modeling Functions
Functions

Syntax for Changing Array Elements


<flag> = CHANGE('TO_ARRAY', '<array>', <num_to_change>,
<change0>, <change1>, ...)

Data
Token Name Token Type Meaning
Type
TO_ARRAY keyword (none) Starting at <array>[0], set
the next
<num_to_change>
elements to the values in
<change0>,
<change1>, ...
array variable name (varies) Name of array to modify
num_to_change variable or INT Number of elements to be
value changed, beginning with the
first element, <array>[0],
and proceeding sequentially
through the array elements.
The maximum value is 60.
change* variable or (varies) Variable or list of variables
value whose values will replace
elements of the array. The
list can contain singular
variables, array elements,
arrays, and expressions. Only
the number of elements
specified by the third
argument will be changed. If
the list contains more values
than this number, they are
ignored.
flag return INT 1 for success or 0 for failure

Example 1
In the following example, the contents of text_string are replaced with a new
text string.
CHANGE('TO', text_string, 'This is the new value')

5-54 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Parametric Modeling Functions
CHAR_TO_INT (formerly CHAR$INT)

Example 2
In the following example, the current value contained in the variable
loop_counter is incremented by 2.
CHANGE('INCR', loop_counter, 2)

Example 3
The following example shows a segment of a program where the coordinates of
three consecutive vertices of a line string, stored into a large array, are written into
three separate points, each point a coordinate array. It is easier to work with the
points c1_sp, c2_sp and c3_sp than with the ls_sp array.
! Obtain vertices for lines
(RULE) IF i < n - 1 THEN step[13] ! Not last point to
process
= change('TO_ARRAY','c1_sp',3, ls_sp[(i)*3],
ls_sp[(i)*3+1], ls_sp[(i)*3+2]+off_z)
+ change('TO_ARRAY','c2_sp',3, ls_sp[(i+1)*3],
ls_sp[(i+1)*3+1], ls_sp[(i+1)*3+2]+off_z)
+ change('TO_ARRAY','c3_sp', 3, ls_sp[(i+2)*3],
ls_sp[(i+2)*3+1], ls_sp[(i+2)*3+2]+off_z)

CHAR_TO_INT (formerly CHAR$INT)


This function converts a text string into an integer value. Characters are converted
up to the first invalid character. A string that begins with an invalid character will
cause the function to return zero (0).

This function cannot be called in a rule that sets the step[ ] array variable to
control the order of rule processing

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 5-55
5 Parametric Modeling Functions
Functions

Syntax
<number> = CHAR_TO_INT(<int_string>)

Data
Token Name Token Type Meaning
Type
int_string variable or TEXT String containing leading
value numeric characters
number return INT Integer represented in string

Example
The following examples return the integer 123.
TEXT tFloatString = "123.45"
CHAR_TO_INT('123')
CHAR_TO_INT(tFloatString)

The following example returns the integer 0.


TEXT tNoString = "abc123";
CHAR_TO_INT(tNoString)

CHAR_TO_REAL (formerly CHAR$REAL)


This function converts a text string into an real value. Characters are converted up
to the first invalid character. A string that begins with an invalid character will cause
the function to return zero (0).

This function cannot be called in a rule that sets the step[ ] array variable to
control the order of rule processing.

5-56 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Parametric Modeling Functions
CLEAR

Syntax
<number> = CHAR_TO_REAL(<real_string>)

Data
Token Name Token Type Meaning
Type
real_string variable or TEXT String containing leading
value numeric characters or a
decimal point
number return REAL Real number represented in
string

Example
The following example returns real numbers.
TEXT tFloatString = "123.45";
CHAR_TO_REAL('123')
CHAR_TO_REAL(tFloatString)

The following example returns the integer 0.


TEXT tNoString = "abc123.45";
CHAR_TO_REAL(tNoString)

CLEAR
Normally, during the execution of a set of rules in a backward chaining expert
system, variables retain their values until the goal is returned and the entire system
of variables is cleared. This function clears the value of a variable during the
evaluation of a set of variables, before the conclusion of the reasoning. This function
can be used to simulate a GOTO command.

This function must be called in a rule that sets the step[ ] variable. For details,
see Using the Step Array Variable to Control the Order of Processing and Running
Rules on page 9-18 in the PlantSpace Design Series Administrator Guide.

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 5-57
5 Parametric Modeling Functions
Functions

Syntax
<flag> = CLEAR('<variables>')

Data
Token Name Token Type Meaning
Type
variables variable name (varies) List of names of variables to
clear
flag return INT 1 for success or 0 for failure

Example
In the following example, the CLEAR function clears the step[n] variables
(where n equals the step number) causing the expert system to repeatedly process
those steps until the loop has been traversed n times.
! Looping Example using CLEAR and CHANGE functions
INT i=0; ! Incremented variable
INT n=3; ! Maximum times through loop
! Loop through step[1] and step[2] n times
! If counter (i) equals our goal (n), exit loop
(RULE) IF i = n THEN step[0] = 1 and step[1] = 1 and step[2]
= 1
! Else loop through
(RULE) THEN step[0] = 1
! Increment i by 1
(RULE) THEN step[1] = CHANGE('incr',i,1)
! Loop back to step[0]
(RULE) THEN step[2] = CLEAR('step[0],step[1],step[2]')

COLLECT
Normally, the expert system evaluates variables in an order determined by backward
chaining principles. The COLLECT function circumvents this evaluation order,
allowing variables to be evaluated before the usual reasoning begins. Therefore the
COLLECT function should be called before the start of the usual reasoning. The
COLLECT function processes both scalar and array variables. Individual array

5-58 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Parametric Modeling Functions
CONTROL

elements can be specified with a subscript. If no subscript is specified, all values of


the array will be determined.

This function cannot be called in a rule that sets the step[ ] array variable to
control the order of rule processing.

Syntax
<flag> = COLLECT('<variables>')

Data
Token Name Token Type Meaning
Type
variables variable name (varies) List of names of variables to
evaluate
flag return INT 1 for success or 0 for failure

Example
The following example causes the expert system to evaluate the variables X, Y, all
elements of rot_matrix, the single element S[5], and Z.
REAL X, Y, Z, rot_matrix[9];
INT S[10]
(RULE) THEN COLLECT('X,Y, rot_matrix,S[5],Z')

CONTROL
This function changes special characteristics and controls internal processes.

This function must be called in a rule that sets the step[ ] variable. For details,
see Using the Step Array Variable to Control the Order of Processing and Running
Rules on page 9-18 in the PlantSpace Design Series Administrator Guide.

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 5-59
5 Parametric Modeling Functions
Functions

Syntax
<flag> = CONTROL([, 'DYNAMIC_ON'] [,'HOLE'|'NOHOLE'] [,'RUL_LIN']
[,'SNAP'|'NOSNAP'] [,<control_key0>, <control_value0>]
[,<control_key1>, <control_value1>] [, ...])

Token Data
Token Name Meaning
Type Type
DYNAMIC_ON keyword (none) Set flag to dynamically place
components into the design
file. The default is OFF. This
has the same effect as the
$DYNAMIC_ON directive.

HOLE keyword (none) Make the elements follow


"holes".
NOHOLE keyword (none) Make the elements to follow
"solids".
RUL_LIN keyword (none) Set the class of the following
single element to rule-line
(CLASS=4). This is useful for
creating surfaces (See the
SURFACE function on
page 5-116.)
SNAP keyword (none) Make the elements follow
snappable.
NOSNAP keyword (none) Make the elements follow
non- snappable.
control_key* keyword (none) One of the keywords (in the
Keyword Table that follows)
to indicate what feature should
be controlled by the next
variable. Multiple details can
be requested.

5-60 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Parametric Modeling Functions
CONTROL

Token Data
Token Name Meaning
Type Type
control_value* variable varies Store feature setting specified
name by the preceding keyword.
Data type is based on the
Keyword Table that follows.
flag return INT If a storage location is
supplied, 1 for success or 0
for failure
If no storage location is
supplied, the single piece of
data requested

Keyword Table for control_key

Control Data
Description
Keyword Type
COLOR INT Use specified color for all elements that follow.
CLASS INT Use specified class for all elements that follow.
DEBUG INT Use binary mask to set the level of rules from
which debugging statements, using the MESSAGE
function, will be displayed. The binary bit
positions represent the debug levels. For example
the integer 7, represented in binary as 111, has
debug levels 0, 1, and 2 turned on. Debug message
statements can be left in the rule code and turned
on or off as is required by the programmers
debug strategy or use of the rule in production.
ERR TEXT Set the error_status to -935, which causes the
expert system to exit the current set of rules and
display the error message provided.
LABEL_LEV INT Use specified level for the cell label.
EL
LEVEL INT Use specified level for all elements that follow.
STYLE INT Use specified line style for all elements that follow.

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 5-61
5 Parametric Modeling Functions
Functions

Control Data
Description
Keyword Type
TUTORIAL TEXT Activate the named tutorial cell from the named
cell library. If no library is named, the tutorial cell
is activated from the currently attached cell library.
The single text string argument should be
formatted as "cell_name, cell_library".
UORS INT Use this value as the Design Series UOR setting. If
this control parameter is not used, and a UOR
value is not included in the applicable database, a
default value of 8000 is used.
WEIGHT INT Use specified weight for all elements that follow.
SHIP_CELL TEXT Use the following keyword string to when cells are
shipped to MicroStation. This operation has the
same effect as the $SHIP_CELL directive. The
keyword string may be one of the following:
'DEFAULT' - Creates the cell when the
CELL('END') command is executed.
'CONTINUOUS' - Displays the cells as they are
created.
'ONE_TIME' - Shows the creation of the cells
within the rule all at once when the rule ends.

Example 1
In the following example, this function causes all the elements that follow, to be on
level 11 and to display messages to the user (that is, through the MESSAGE function
on page 5-82) where the debug level is set to 1 or 2.
CONTROL('LEVEL', 11, 'DEBUG', 6)

Example 2
In the following example, using SHIP_CELL may require changes to lower-level
rules that return coordinate data using the ABS_POINT function. To make lower-
level rules run correctly, you must call the RETURN function before calling the
CELL function with the 'end' option. Alternatively, force the expert system to make
the ABS_POINT function call occur before the CELL function. This is necessary
because when the cell is shipped, its coordinate system is destroyed and therefore
there is no data to properly compute the ABS_POINT based on that coordinate
system.
(RULE) THEN step[0] = CONTROL('DYNAMIC_ON')
(RULE) THEN step[0] = MESSAGE('CF',"Rectangular Line String")

5-62 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Parametric Modeling Functions
COS

+ CONTROL('SHIP_CELL', 'continuous')

COS
This function returns the cosine of an angle argument. The argument may be a
numeric variable, expression, or constant and is measured in degrees.

This function cannot be called in a rule that sets the step[ ] array variable to
control the order of rule processing.

Syntax
<angle_cos> = COS(<angle>)

Token
Token Type Data Type Meaning
Name
angle variable or INT or Angle in degrees to take the
value REAL cosine of
angle_cos return REAL Cosine of <angle>

DELETE_COMP
This function deletes a component at a given address in a MicroStation DGN.

This function cannot be called in a rule that sets the step[ ] array variable to
control the order of rule processing.

Syntax
<flag> = DELETE_COMP(<address>)

Token Data
Token Type Meaning
Name Type
address variable or INT[3] Cell address as provided by
value SELECT_CELL
flag return INT 1 for success or 0 for failure

Example
The following example deletes the cell identified by the cell address addr.
DELETE_COMP(addr)

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 5-63
5 Parametric Modeling Functions
Functions

ENDSURF
This function terminates a SURFACE function. It is required for each use of the
SURFACE function, to encompass all elements that create the surface. It updates
the SURFACE record and performs other actions required before a new surface can
be created.

This function must be called in a rule that sets the step[ ] variable. For details,
see Using the Step Array Variable to Control the Order of Processing and Running
Rules on page 9-18 in the PlantSpace Design Series Administrator Guide.

Syntax
<flag> = ENDSURF('SURFACE'|'SOLID')

Token Data
Token Type Meaning
Name Type
SURFACE keyword (none) End surface construction
begun by last call to SURFACE
with keyword 'SURFACE'.
SOLID keyword (none) End solid construction begun
by last call to SURFACE with
keyword 'SOLID'.
flag return INT 1 for success or 0 for failure

Example
The following example shows the beginning and ending pair of instructions required
to generate a surface from a cube primitive. For a detailed example of surface
generation, see SURFACE on page 5-116.
(RULE) then step[3] = SURFACE('solid','proj')
+PRIM('CUBE', LX, LY, LZ)
...
+ENDSURF('solid')

EVALUATE (formerly PARAM$VALU)


This function obtains the value of a parameter from a specified configuration file
(which must follow the standard keyword [=] value approach).

This function cannot be called in a rule that sets the step[ ] array variable to
control the order of rule processing.

5-64 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Parametric Modeling Functions
EXTRACT_VALUE (formerly LABEL$VALU)

Syntax
<value> = EVALUATE(<filename>,<parameter>)

Data
Token Name Token Type Meaning
Type
filename variable or TEXT Name of configuration file in
value which to find the specified
parameter
parameter variable or TEXT Name of the parameter to
value evaluate
value return TEXT Value of the specified
configuration parameter

Example
The following example returns the value for the reference elevation from the project
definition file.
EVALUATE('projdef.rul','ref_elev')

EXTRACT_VALUE (formerly LABEL$VALU)


This function retrieves the value of an attribute from the label of the first (or only)
component that the system is processing. The attribute position within the label is
determined using the label definition summary file, RIMREF.DAT, which must be
in the logical directory PS_PROJ.

This function cannot be called in a rule that sets the step[ ] array variable to
control the order of rule processing.

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 5-65
5 Parametric Modeling Functions
Functions

Syntax
<attr_value> = EXTRACT_VALUE(<attr_name>)

Data
Token Name Token Type Meaning
Type
attr_name variable or TEXT Name of the label attribute,
value as defined in the label
definition table of the project
database, whose value is to
be returned
attr_value return (varies) Value of the requested
attribute. The data type
depends on the type of the
attribute requested. Leading
and trailing spaces are
trimmed.

EXTRACT_VALUE2 (formerly LABEL$VALU2)


This function retrieves the value of an attribute from the label of the second
component that the system is processing. The attribute position within the label is
determined using the label definition summary file, RIMREF.DAT, which must be
in the logical directory PS_PROJ.

This function cannot be called in a rule that sets the step[ ] array variable to
control the order of rule processing.

5-66 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Parametric Modeling Functions
INHERIT

Syntax
<attr_value> = EXTRACT_VALUE2(<attr_name>)

Data
Token Name Token Type Meaning
Type
attr_name variable or TEXT Name of the label attribute,
value as defined in the label
definition table of the project
database, whose value is to
be returned
attr_value return (varies) Value of the requested
attribute. The data type
depends on the type of the
attribute requested. Leading
and trailing spaces are
trimmed.

INHERIT
This function can pass arguments from a calling set of rules to a set of sub-rules.
The mechanism of argument passing is similar to that in programming languages,
with one exception: if the calling set of rules does not pass down an equal number of
values, the unknown values will be obtained by the expert system from all other
available sources (local rules, local default values, or prompts to the user). The list of
values sent can be terminated at any place but no values can be skipped between the
starting and terminating value. Therefore, variables that must have their values
inherited from the calling list should be specified at the beginning of the list. The
INHERIT function should be placed at the very beginning of the active part of the
rules to ensure that the values are inherited and that the expert system is not forced
to evaluate the attributes locally.

This function must be called in a rule that sets the step[ ] variable. For details,
see Using the Step Array Variable to Control the Order of Processing and Running
Rules on page 9-18 in the PlantSpace Design Series Administrator Guide.

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 5-67
5 Parametric Modeling Functions
Functions

Syntax
<flag> = INHERIT('<variables>')

Token Data
Token Type Meaning
Name Type
variables variable name (varies) List of variable names to
retrieve values into. This list
must correspond in data type
(including array dimensions)
and order with the variables
specified in the LIST option
of the calling BUD function or
SUB function.

flag return INT 1 for success or 0 for failure

Example
In the following example, the values listed in an upper rule are placed into the
variables size, diam, and width for the currently active rule.
INHERIT('size, diam, width')

INSERT_LABEL (formerly TEXT_LAB)


This function inserts a label for a component into a cell after the cell has been
created. During the creation of a cell, some label information may be unknown. The
CELL function builds the cell and identifies through a named marker where the
label is to be placed. Later, information not known at the time of cell creation can be
determined and inserted into the cell at the marker position. The label can be any
length and can be rotated and translated. It is placed on level 63 of the cell.

This function cannot be called in a rule that sets the step[ ] array variable to
control the order of rule processing.

5-68 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Parametric Modeling Functions
INSERT_LABEL (formerly TEXT_LAB)

Syntax
<flag> = INSERT_LABEL(<label> [, 'TOP'|'BOT'|'BEFORE'|'AFTER'] [,
<marker>])

Token Data
Token Type Meaning
Name Type
label variable or TEXT Variable containing the label to
value be inserted
TOP keyword (none) Place the label at the top of the
cell information sequence.
BOT keyword (none) Place the label at the bottom of
the cell information sequence.
BEFORE keyword (none) Place the label at the position just
before the following marker
name.
AFTER keyword (none) Place the label at the position just
after the following marker name.
marker variable or TEXT Marker name declared by CELL
value function
flag return Point 1 for success or 0 for failure

Example
In the following example, step[1] creates one cell of a composite of several cells
without giving it a label, but marks the position in the composite with
LABEL_MKR. Afterward information is collected and placed into the label
CELL_LABEL. step[5] then locates the marked cell and places the label
information into it.

For the cell to be a valid Design Series cell, the label must be placed at the top
or beginning of the cells information sequence.

(RULE) THEN step[1] = CELL('start', 't11', 'nolabel', 'name',


'LABEL_MKR', 'snap', 1, 0,0,0)
.
.
.
(RULE) THEN step[5] = text_lab(CELL_LABEL, 'top',
'LABEL_MKR')

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 5-69
5 Parametric Modeling Functions
Functions

LEAD_CHARS (formerly LEAD$CHARS)


This function returns the number of leading letters (uppercase or lowercase) of a
text string.

This function cannot be called in a rule that sets the step[ ] array variable to
control the order of rule processing.

Syntax
<num_chars> = LEAD_CHARS(<string>)

Data
Token Name Token Type Meaning
Type
string variable or TEXT Text string
value
num_chars return INT Number of letters leading a
string. If the string does not
begin with any letters,
num_chars will be zero (0).

Example
The following example returns a count of 4 for leading letters.
LEAD_CHARS ('PSvr123')

The following example returns a count of zero for leading letters.


LEAD_CHARS ('123')

LOAD_VALUE
This function changes the value of a Design Series label attribute after the label has
been created, or creates a new label based on information in the current active label.
This function is useful for loading the value of external attributes into the label. It is
also useful for creating the label for a secondary component from a primary
component. If a value cannot be loaded into a label for any reason (for example,
truncation or an error at spec lookup), a fatal error is generated.

This function cannot be called in a rule that sets the step[ ] array variable to
control the order of rule processing.

5-70 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Parametric Modeling Functions
LOAD_VALUE

Syntax
<newlabel> = LOAD_VALUE('<label>' [, 'CREATE_NEW_LABEL'] [,
'NO_VALIDATE_LABEL'], <attr_name0>, <attr_value0>
[,<attr_name1>, <attr_value1>] [,...])

Data
Token Name Token Type Meaning
Type
label variable TEXT Unquoted name of label
variable in which to modify
values
CREATE_NEW_ keyword (none) Create a new label with the
LABEL current data. If this keyword
is not used, LOAD_VALUE
modifies an exact image of
the source label.
NO_VALIDATE_ keyword (none) Bypass the input method
LABEL checking to increase
performance. This keyword
can be used to create many
components from a database
where data has already been
verified.
attr_name* variable or TEXT Name of the attribute to
value modify with <attr_value*>
attr_value* variable or (varies) Value to change
value <attr_value*> to
newlabel return TEXT New or modified label

Example 1
The following example loads a 'Y' into the 'Override' attribute in the label.
LOAD_VALUE(label, 'Override', 'Y')

Example 2
The following example creates a new label from the source label, performs no input
method data checking, and loads the value of mem_grade into the 'grade'
attribute of the label.
LOAD_VALUE(newlabel,'CREATE_NEW_LABEL','NO_VALIDATE_LAB
EL',
'grade',memb_grade)

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 5-71
5 Parametric Modeling Functions
Functions

LOCAL_POINT (formerly LOCAL_PT)


This function transforms a point to the local coordinate system of the rule to be
called by a BUD call. This function expresses the coordinates of a point in the system
of coordinates used in the next lower-level of nesting. It is useful for creating nested
objects in which coordinates of points in the current object are needed in the
construction of the next lower object.

This function cannot be called in a rule that sets the step[ ] array variable to
control the order of rule processing.

Syntax
<local> = LOCAL_POINT([{ROTATION}][,{POSITION}], <current>)

Data
Token Name Token Type Meaning
Type
{ROTATION} (See the argument set for {ROTATION} on page 5-5.)
{POSITION} (See the argument set for {POSITION}on page 5-6.)
current variable or Point Point to transform from
value current coordinate system
local return Point Transformed point in local
coordinate system

Although both the {ROTATION} and {POSITION} arguments are optional,


at least one argument should be supplied, or the MOVE_COORD function will
have no effect. The rotation and position transformations applied should be
the same as those applied to the BUD function call as a whole.

Example
Whenever passing the coordinates of a point to a lower level rule, the
LOCAL_POINT function should be used to transform the point to that coordinate
system. In the following example, a point PNT is defined in preparation for a such a
call.
PNT = LOCAL_PT('MATRIX', plc_mat, 'OFFSET', snap0, 0, 0,
diam/2)

LOG
This function returns the natural (base e) log of a numeric expression.

5-72 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Parametric Modeling Functions
LOG_FILE

This function cannot be called in a rule that sets the step[ ] array variable to
control the order of rule processing.

Syntax
<natural_log> = LOG(<number>)

Token Name Token Type Data Type Meaning


number variable or INT or Number to take natural log
value REAL of
natural_log return REAL Natural log of <number>

LOG_FILE
This function manages text log files for progress tracking or error messaging.

This function cannot be called in a rule that sets the step[ ] array variable to
control the order of rule processing.

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 5-73
5 Parametric Modeling Functions
Functions

Syntax
<flag> = LOG_FILE(<filename>, <message> [, <substitute0>] [,
<substitute1>] [,...])

Token Data
Token Type Meaning
Name Type
filename variable or TEXT Log file name. You can place
value this file in a particular directory
by using a Design Series path
variable as in
PS_TEMP:logfile.log. If no path is
specified, logfile.log will be
placed in the working directory
in which MicroStation is
running.
message variable or TEXT Message to write to the file. As
value part of the second argument,
you can include a $keyword.
The $keyword serves to open,
close, or delete the log file, as
explained in the $Keyword
Table that follows. If you do
not specify a $keyword, the
system appends the message at
the bottom of the named file
(created if it does not already
exist). The message can include
%a arguments in the manner of
the C-language printf text
formatting function to easily
insert values into the message.
The %a format argument
inserts values of any data type
and does not support additional
printf modifiers such as length
or precision. The message can
also include new lines ("\n")
and tabs ("\t").

5-74 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Parametric Modeling Functions
LOG_FILE

Token Data
Token Type Meaning
Name Type
substitute* variable or (varies) Substitution values to insert
value into the message string. The
number of variables must
match the number of
substitution markers.
flag return INT 1 for success or 0 for failure

$Keyword Table for message


$Keyword Description
$OPEN Create a new version of the named file. (No check is made to
[:message] see if the file already exists.) $OPEN can be prepended to a
message to write to the file.
$CLOSE Close the named file. Additional messages can be appended
to the file at any later time by simply calling the LOG_FILE
function without a $keyword.
$DELETE Delete the named file. The file is no longer retrievable.
$DELETE can be used, for example, to delete an error log
file if no errors occurred during processing.

Example
The following example uses several of these functions and keywords.
INT step[<n>], flag[<m>]; !<n> AND <m> = number of steps AND
flags
!this file will be placed in the PS_TEMP directory
TEXT tLogfile = 'PS_TEMP:logfile.txt';
!this file will be placed in the current working directory
TEXT tErrfile = 'logfile.bad';
INT counter
(RULE) THEN step[0] = LOG_FILE(tLogfile,
"$OPEN:Create log file %a", tLogfile)
AND LOG_FILE(tErrfile, "$OPEN:Create err file
%a", tErrfile)
(RULE) IF flag[0] = 1 THEN flag[1] = LOG_FILE(tLogfile,

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 5-75
5 Parametric Modeling Functions
Functions

"Performed process %a successfully", counter)

(RULE) IF flag[0] != 1 THEN flag[1] = LOG_FILE(tErrfile,


"Error performing process %a", counter)
.
.
.
!IF no errors occurred, delete error file
(RULE) IF flag[m-1] = 1 THEN step[n-1] = LOG_FILE(tErrfile,
'$DELETE')
(RULE) THEN step[n] = LOG_FILE(tLogfile,'$CLOSE')

MATRIX
This function calculates and creates a rotation or transformation matrix specified by
the argument list. A matrix can be created from a set of angles, two or three points,
or the multiplication of two given matrixes. In addition, the optional 'SCALE'
argument can be used to obtain a t-matrix instead of a pure rotation matrix.

This function cannot be called in a rule that sets the step[ ] array variable to
control the order of rule processing.

Syntax for Creating a Rotation from Euler Angles


<rmatrix> = MATRIX('RAD_EULER'|'DEG_EULER', <alpha>, <beta>,
<gamma>
[, 'SCALE', <scaleX>, <scaleY>, <scaleZ>])

Token Name Token Type Data Type Meaning


RAD_EULER keyword (none) Create a rotation matrix
using the following three
Euler angles (measured in
radians).
DEG_EULER keyword (none) Create a rotation matrix
using the following three
Euler angles (measured in
degrees).
alpha variable or INT or Angle of rotation about the
value REAL Z axis

5-76 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Parametric Modeling Functions
MATRIX

Token Name Token Type Data Type Meaning


beta variable or INT or Angle of rotation about the
value REAL X axis
gamma variable or INT or Angle of rotation about the
value REAL Z axis
SCALE keyword (none) Scale the matrix by the
following three axial scales.
scaleX variable or INT or X axis scale
value REAL
scaleY variable or INT or Y axis scale
value REAL
scaleZ variable or INT or Z axis scale
value REAL
rmatrix return Matrix Rotation matrix generated

Syntax for Matrix Multiplication


<matrixC> = MATRIX('MULT', <matrixA>, <matrixB>)

Data
Token Name Token Type Meaning
Type
MULT keyword (none) Multiply the following
matrixes.
matrixA variable or Matrix First matrix to multiply
value
matrixB variable or Matrix Second matrix to multiply
value
matrixC return Matrix Product of the matrix
multiplication

Example 1
In the following example, the X dimension scaling factor is reflected in the first row,
the Y dimension factor is seen in the second row, and the Z dimension scaling factor
is in the third row.
REAL mat[9];
INT A1=90, A2=90, A3=90;
INT F1=1, F2=2, F3=3;

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 5-77
5 Parametric Modeling Functions
Functions

(RULE) THEN mat = MATRIX('DEG_EULER', A1,A2,A3, 'SCALE',


F1,F2,F3)
(RULE) THEN step[0] = PRIM('CUBE', 'MATRIX', mat, 1,2,3)

The value of mat before scaling is:


0 0 1
0 -1 0
1 0 0

With scaling, the value of mat becomes:


0 0 1
0 -2 0
3 0 0

The following diagrams display a cube before and after this matrix is applied.
Observe the stretching along the local B and C axes. The A axis dimension has not
changed because its scaling factor was 1.

Cube before Transformation Cube after Transformation

Example 2
REAL PNT1[3]; ! X1, Y1, Z1
REAL PNT2[3]; ! X2, Y2, Z2
REAL mat[9]
...
(RULE) THEN mat = MATRIX('2_POINTS', PNT1, PNT2)

5-78 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Parametric Modeling Functions
MATRIX

(RULE) THEN step[0] = PRIM('CUBE', 'MATRIX', mat, 1,2,3)

The following diagram shows the result from the preceding rule. The local system of
coordinates is represented by the A, B, and C axes. The global design system of
coordinates is represented by the X, Y, and Z axes. The local A axis has been rotated
by mat to conform to the vector defined by PNT1 to PNT2.

Example 2

In general, the '2_POINTS' keyword indicates that the local A axis is to be oriented
in the direction of PNT1 to PNT2. The matrix returned by
MATRIX('2_POINTS',...) performs this action. The function computes the
new coordinate system in the following manner:

If the A axis defined by PNT1 and PNT2 is not aligned with the
global Z axis (that is, it lies in the X-Y plane), B is the cross product
of the global Z and the A axes (B = Z x A). C is then the cross
product of A and B, as required by a right-hand coordinate system
(C = A x B).
If the A axis defined by PNT1 and PNT2 is aligned with the global
Z axis (that is, it is vertical), C is the cross product of the A and the
global Y axes (C = A x Y). B is then the cross product of C and A, as
required by a right-hand coordinate system (B = C x A).

For an explanation of the right-hand coordinate system and cross products, see the
section Introduction to Geometric Principles on page 5-13.
Example 3
REAL PNT1[3]; ! X1, Y1, Z1
REAL PNT2[3]; ! X2, Y2, Z2
REAL PNT3[3]; ! X3, Y3, Z3
REAL mat[9];

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 5-79
5 Parametric Modeling Functions
Functions

...
(RULE) THEN mat = MATRIX('3_POINTS', PNT2, PNT1, PNT3)

(RULE) THEN step[0] = PRIM('CUBE', 'MATRIX', mat, 1,2,3)

The following diagram shows a cube rotated by the matrix defined in the preceding
rule. The local system of coordinates is represented by the A, B, and C axes. The
global design system of coordinates is represented by the X, Y, and Z axes. The
vector from PNT1 to PNT2 defines the direction of the A axis. PNT1, PNT2, and
PNT3 are used to describe the A-B plane.

Example 3

In general, '3_POINTS' will define a matrix where the direction of the A axis is
equal to the vector from PNT1 to PNT2. The C axis is the cross product of the A
axis and the vector from PNT1 to PNT3. The C axis is normal to the plane of the
three points. The B axis is then the cross product of the C and A axes.

The resulting matrix will only rotate the A axis to be in the same direction as
the vector from PNT1 to PNT2. The origin will not automatically be at PNT1,
unless PNT1 happens to be (0,0,0). An offset can be applied to the primitive or
cell to match its origin to PNT1.

Example 4
...
REAL PNT1[3];
REAL PNT2[3];
REAL PNT3[3];
REAL mat1[9];
REAL mat2[9];

5-80 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Parametric Modeling Functions
MATRIX

...
(RULE) THEN mat1 = MATRIX('3_POINTS' PNT2, PNT1, PNT3)
(RULE) THEN mat2 = MATRIX('MULT', mat1,
(MATRIX('DEG_EULER', 90, 90, 0)) )

When a component is placed using the matrix mat1, the A axis is defined by the
vector from PNT1 to PNT2, and its A-B plane is defined by PNT1, PNT2, and
PNT3 as shown in the following diagram.

Example 4

Frequently it is desirable to have PNT1 and PNT2 define an axis other than the A
axis. Assume the C axis of the component is to be defined by PNT1 and PNT2 and
its A-C plane defined by PNT1, PNT2 and PNT3. This can be accomplished by
multiplying the mat1 matrix by a rotation matrix using the
MATRIX('MULT',...) function, and using the resultant matrix mat2 to place
the component. The result is shown in the following diagram.

Example 5

The matrix multiply function provides significant flexibility to component


placement because virtually any orientation can be achieved through its use.

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 5-81
5 Parametric Modeling Functions
Functions

MAX (formerly MAX$VALU)


This function compares a variable-length series of mixed numeric type arguments to
determine the maximum.

This function cannot be called in a rule that sets the step[ ] array variable to
control the order of rule processing.

Syntax
<max_value> = MAX(<number0>, <number1> [, ...])

Data
Token Name Token Type Meaning
Type
number* variable or (varies) Numbers to compare
value
max_value return (varies) Maximum value in argument
series:
If any arguments are
REAL,
<max_value> is a real number.
If any arguments are not
REAL,
<max_value> is an integer.

MESSAGE
This function displays messages on the MicroStation screen. This function is useful
for keeping the user informed about the progress of component creation and as a
debugging aid while developing rules. The maximum message length is 40
characters. Longer messages are truncated to this length. For key-in messages, this
limit includes the prompt characters. Double-quoted messages are displayed exactly
as they appear. Single-quoted message are displayed in all uppercase letters. When
possible, messages should be grouped into one MESSAGE call.

This function must be called in a rule that sets the step[ ] variable. For details,
see Using the Step Array Variable to Control the Order of Processing and Running
Rules on page 9-18 in the PlantSpace Design Series Administrator Guide.

5-82 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Parametric Modeling Functions
MESSAGE

Key-in Dialog Box

Message Field

Command Field Prompt Field Error Field


(left of > symbol) (right of > symbol)

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 5-83
5 Parametric Modeling Functions
Functions

Syntax
<flag> = MESSAGE(['PAUSE',] <location0>, <message0>[,
<debug0>]
[, <location1>, <message1> [, <debug1>]] [, ...])

Data
Token Name Token Type Meaning
Type
PAUSE keyword (none) Prompt the user to press a
key before resuming rule file
execution. This prompt will
appear in the command field.
location* keyword (none) One of the keywords (in the
Keyword Table that follows)
indicating where the message
should appear. Multiple
location-message pairs can
be used within a single
MESSAGE call.
message* variable or TEXT Message to appear in the
value location specified previously
debug* variable or INT Debugging level of the
value message. The message is
displayed if the debugging
level binary mask (set
through the CONTROL
function with the DEBUG
keyword) allows this level
message. If a level is not
specified, the message is
always displayed.
flag return INT 1 for success or 0 for failure

5-84 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Parametric Modeling Functions
MESSAGE

Keyword Table for location

Location
Location Description
Keyword
CF Command Text sent to the command field will temporarily
field replace the command prompt left of the greater
than symbol (>). The command field is initially set
by the PSMENU.RUL file. To reset the command
field after a CF message, send another message
with a single-quoted space (' ')as the message text.
ER Error field Text sent to the error field will be displayed in the
bottom right-hand corner of the screen. If another
message has been sent to the message field, the
error message will be displayed in the prompt field,
to the right of any messages sent to the prompt
field.
MS Message Text sent to the message field will be displayed in
field the bottom right-hand corner of the screen.
PR Prompt Text sent to the prompt field will be displayed to
field the right of the command field and the greater
than symbol (>) in the bottom left-hand corner of
the screen.
PT Keyin field Text send to the key-in field will show up in the
key-in dialog box.
ST Status field Text sent to the message field will be displayed in
the bottom right-hand corner of the screen.

Example 1
The following code:
MESSAGE('MS', 'This message is on level 4',4)

Results in:
THIS MESSAGE IS ON LEVEL 4

Example 2
The following code:
MESSAGE('MS', "This message is always shown")

Results in:

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 5-85
5 Parametric Modeling Functions
Functions

This message is always shown

Example 3
The following is are sample lines from PSMENU.RUL.
TRAYICON_HorzElbow = PS PARAMETRIC -
TRAY_TRHB -
'PSTRAY Place Bend Horizontal'

This portion will cause the message PSDSTRAY Place Bend Horizontal
to be displayed in the command field. The message will continue to be displayed in
the command field until it is overwritten by another message command:
(RULE) THEN step[1] = message('cf', "This message overwrites
the cf")
! The following rule will set it back to the default
(RULE) THEN step[2] = message('cf', ' ')

MIN (formerly MIN$VALU)


This function compares a variable-length series of mixed numeric type arguments to
determine the minimum.

This function cannot be called in a rule that sets the step[ ] array variable to
control the order of rule processing.

5-86 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Parametric Modeling Functions
MOVE_COORD (formerly ASSEMBL)

Syntax
<min_value> = MIN(<number0>, <number1> [, ...])

Token Data
Token Type Meaning
Name Type
number* variable or (varies) Numbers to compare
value
min_value return (varies) Minimum value in argument
series:
If any arguments are REAL,
<min_value> is a real
number
If any arguments are not
REAL, <min_value> is
an integer.

MOVE_COORD (formerly ASSEMBL)


This function relocates all the primitives drawn following the use of the
MOVE_COORD statement. The relocation of primitives continues until either a new
call to MOVE_COORD is encountered or the system returns to a higher level of rules.
The order of the OFFSET and ROTATION arguments has no effect on the
assembly. The rotation is always performed before the offset.

This function must be called in a rule that sets the step[ ] variable. For details,
see Using the Step Array Variable to Control the Order of Processing and Running
Rules on page 9-18 in the PlantSpace Design Series Administrator Guide.

Syntax
<flag> = MOVE_COORD([{ROTATION}][,{POSITION}])

Data
Token Name Token Type Meaning
Type
{ROTATION} (See the argument set for {ROTATION} on page 5-5.)
{POSITION} (See the argument set for {POSITION}on page 5-6.)
flag return INT 1 for success or 0 for failure

Although both the {ROTATION} and {POSITION} arguments are optional,


at least one argument should be supplied or the MOVE_COORD function will
have no effect.

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 5-87
5 Parametric Modeling Functions
Functions

Example
In each of these examples, the MOVE_COORD function relocates the coordinate
system of any primitives that follow. The first example applies an angle to achieve a
rotation. The second example applies a matrix. The third example offsets the
coordinate system origin. The fourth example applies both a rotation and an offset.
MOVE_COORD('ANGLE', 90,-90,0)
MOVE_COORD('MATRIX', 1.0,0,0,0,1.0,0,0,0,1.0,)
MOVE_COORD('OFFSET', 100,-10 20)
MOVE_COORD('ANGLE', angle,0,0, 'OFFSET', 100,-100,0)

NUM_TO_CHAR (formerly ENCODE$VALU)


This function converts numeric expressions to strings with optional formatting.

This function cannot be called in a rule that sets the step[ ] array variable to
control the order of rule processing.

Syntax
<num_string> = NUM_TO_CHAR(<number>
[,[<format_string>|<format_key> [,<units>]]])

Data
Token Name Token Type Description
Type
number variable or INT or Numeric expression to
value REAL convert
format_string variable or TEXT Standard FORTRAN
value format string (ex: I6,
F6.2). The default is "I11"
for integers and "F15.3" for
real numbers.
format_key keyword (none) Use predefined formats,
from the Keyword Table
that follows.

5-88 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Parametric Modeling Functions
PARSE_LABEL

Data
Token Name Token Type Description
Type
units keyword (none) Define units format of
<number>. The <units> can be
either 'MASTER-UNITS' or 'SUB-
UNITS'. 'SUB-UNITS' is the
default.
num_string return TEXT String form of the numeric
expression

Keyword Table for format_key

Format Keyword Format Description


"inches" ###" Double quotation mark is appended to the
converted number.
"feet" ###' Single quotation mark is appended to the
converted number.
"feet & inches", ###'- Single quotation mark is appended after the
"feet&inches" ##" converted number of feet, then hyphen, then
double quotation mark after the number of
inches.

PARSE_LABEL
This function reads the current value of an attribute from an existing Design Series
label. The label may have been created within the expert system rules (for example,
using the BUILD_LABEL function), or the label may have been read from a cell
selected from the design file (using the SELECT_CELL function). The extracted
value can then be used to make further qualifications or judgments for the current
component.

This function cannot be called in a rule that sets the step[ ] array variable to
control the order of rule processing.

Syntax
<flag> | <return_val> = PARSE_LABEL(<label>, <attribute> [,
'VALUE', '<val>'] [, 'POSITION', '<pos>'] [, 'FORMAT', '<form>'] [,

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 5-89
5 Parametric Modeling Functions
Functions

'UNITS', '<unit>']
[, 'CONVERT_UNITS']

Data
Token Name Token Type Meaning
Type
label variable name TEXT Unquoted name of variable
containing a Design Series
label
attribute variable or TEXT Name of attribute value to
value retrieve
VALUE keyword (none) Store the retrieved value into
the following variable.
val variable name (varies) Variable to store attribute
value in. Variable type must
match the value returned for
the attribute. If this keyword is
not present, the attribute value
will be returned by the
function.
POSITION keyword (none) Store the attribute label
position into following
variable.
pos variable name INT Attribute label position
FORMAT keyword (none) Store the attribute format
string into following variable.
form variable name TEXT Attribute format string
UNITS keyword (none) Store the attribute units name
into following variable.
unit variable name TEXT Attribute units name
CONVERT_UNITS keyword (none) Convert the attribute value
into database units.
flag return INT 1 for success or 0 for failure
return_val return TEXT Attribute value when the
'VALUE' keyword is not used.
If an error occurs, the
attribute value returned will be
an empty text string.

5-90 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Parametric Modeling Functions
PICK_POINT

Example
In the following example, the rule extracts four pieces of information for the
attribute size_1 from the label identified by the name label. The VALUE
keyword causes size_1 to be written to the variable, size_1_value, while the
rest of the keywords extract information about the attribute into their respective
keywords.
(RULE) THEN flag = PARSE_LABEL(label,'size_1',
'VALUE', 'size_1_value',

'POSITION', 'label_pos',

'FORMAT', 'label_format'
'UNITS', 'unit_text_variable')

PICK_POINT
To retrieve the coordinates of a point on screen selected by a user, or to set the
origin of a cell by using the selected or stored coordinate.

The PICK_POINT function can be used to retrieve a point selected by the user
and/or to set the origin for a cell under construction. The user selected point may
be assigned to a point variable or used to set the cell origin directly (see the first
syntax summary). The cell origin may be set explicitly using either absolute or UOR
coordinates, as shown in the second syntax summary.

This function must be called in a rule that sets the step[ ] variable. For details,
see Using the Step Array Variable to Control the Order of Processing and Running
Rules on page 9-18 in the PlantSpace Design Series Administrator Guide.

Syntax for Allowing the User to Select the Point


<flag> = PICK_POINT(<prompt>, '<point>'|'@ORIGIN')

Data
Token Name Token Type Meaning
Type
prompt variable or TEXT User prompt to select a point
value
point variable name Point Variable to store the selected
point into
@ORIGIN keyword (none) Use the selected point as the
origin of a cell being created.
flag return INT 1 for success or 0 for failure

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 5-91
5 Parametric Modeling Functions
Functions

Syntax for Setting the Origin by Using a Variable


<flag> = PICK_POINT(<prompt>,
'@SET_UOR_ORIGIN'|'@SET_ABS_ORIGIN', <origin>)

Data
Token Name Token Type Meaning
Type
prompt variable or TEXT Unused text string
value
@SET_UOR_ORIGIN keyword (none) Use the following point
value as the origin (in
UORs) of the cell being
created.
@SET_ABS_ORIGIN keyword (none) Use the following point
value as the origin of the
cell being created.
origin variable or Point Coordinates of origin as
value specified by the previous
keyword
flag return INT 1 for success or 0 for
failure

PRIM
At the core of Design Series modeling system is a set of building functions that
create graphics primitives. The PRIM function provides the interface to each of
these routines used to place graphics primitives into the model.

This function must be called in a rule that sets the step[ ] variable. For details,
see Using the Step Array Variable to Control the Order of Processing and Running
Rules on page 9-18 in the PlantSpace Design Series Administrator Guide.

5-92 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Parametric Modeling Functions
PRIM

Syntax
<flag> = PRIM('<primitive>', ['SOLID'|'SURFACE',]
['TOP'|'BOT'|'BEFORE'|'AFTER',][{ROTATION},] [{POSITION},]
<arg0>, <arg1>, ...)

Data
Token Name Token Type Meaning
Type
primitive variable or TEXT Name of primitive to generate
value (See the chapter Parametric
Modeling Primitives on page 6-1 on
primitive names.)
SOLID keyword (none)
For 3D shapes, specify that the
elements should be created as
solids.
SURFACE keyword (none) For 3D shapes, specify that the
elements should be created as
surfaces.
TOP keyword (none) Place the label at the top of the
cell information sequence.
BOT keyword (none) Place the label at the bottom of
the cell information sequence.
BEFORE keyword (none) Place the label at the position
just before the following marker
name. The marker name comes
from the concurrent CELL
function call.
AFTER keyword (none) Place the label at the position
just after the following marker
name. The marker name comes
from the concurrent CELL
function call.
{ROTATION} (See the argument set for {ROTATION} on page 5-5.)
{POSITION} (See the argument set for {POSITION}on page 5-6.)
arg* variable or (varies) Specify the variables in the
value definition of the primitive. (See
the chapter Parametric Modeling
Primitives on page 6-1.)
flag return INT 1 for success or 0 for failure

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 5-93
5 Parametric Modeling Functions
Functions

Example
Primitives are used to create points, lines, and other basic shapes such as cubes,
circles, cylinders, and hemispheres. Detailed instructions on the use of each of the
supported primitives are in the chapter Parametric Modeling Primitives on page 6-1.

The following example shows how a tank can be created by using different
primitives at strategic offsets and orientations:
REAL DIAM; ! diameter of the tank body
REAL LEN; ! length of tank
REAL DIST; ! distance from body axis to floor or base
REAL HEM; ! height of the endcap hemispheres
INT step[2]; ! only one step is required
(RULE) THEN step[0] = PRIM
PRIM('CYLL', 'SOLID',
'ANGLE', 90, 90, 0,

'OFFSET', -LEN/2, 0, DIST, DIAM/2, LEN)


+ PRIM('HEMISPH', 'SOLID',
'ANGLE', 90, 90, 0,

'OFFSET', LEN/2, 0, DIST, DIAM/2, HEM)


+ PRIM('HEMISPH', 'SOLID',
'ANGLE', -90, 90, 0,

'OFFSET', -LEN/2, 0, DIST, DIAM/2, HEM)


(END)

The resulting tank is:

Tank

5-94 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Parametric Modeling Functions
QUERY

QUERY
This function retrieves data from the Design Series database by accepting and
processing any valid SQL query statement in the argument. The queries can be
dynamically generated by composing the SQL statement using substitution
variables. The values of these variables are determined by inferencing.

This function cannot be called in a rule that sets the step[ ] array variable to
control the order of rule processing.

Basic SQL Query Expression


A basic but common form of a SQL query expression is:
"SELECT <something> FROM <somewhere> WHERE
<condition>"

The <something> targeted by the SELECT command can be a single item or a


comma-delimited list. For each item in the <something> list:

If the item matches the database column name, the data from that
column is stored in that variable.
If the item does not match the database column name, use the
form: <column_name>(<variable_name>) to store the
data from the <column_name> database column into the
<variable_name> expert system variable. See Example 2 for a
demonstration of this syntax.

The FROM keyword is followed by the table name. This is the name of the database
table to retrieve the data from.

The WHERE keyword is followed by a matching criteria expression. Any valid SQL
expression can be used for the criteria.

For details on SQL query statements in general, refer to any SQL language
reference manual.

Dimension Conversion During Query


A database table can contain attribute names where the names end with an underbar
(_) and a linear dimension suffix as in LENGTH_MM or HEIGHT_IN. The data
contained in these attributes should be created in their corresponding units. When a
query is performed on these attributes, the dimension suffix should be dropped
from the name.

If the current Master unit is the same as the dimension suffix, the
data values returned will equal those from the table.

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 5-95
5 Parametric Modeling Functions
Functions

If the current Master unit is not the same as the dimension suffix,
the returned table values are automatically converted to their
equivalent number of Master Units.

For example, assume the value 25.4 is selected from a table for the attribute
LENGTH_MM, but the current Master Unit is FEET. The value returned to X in the
following line from the SELECT statement would be .083.
SELECT LENGTH(X) FROM ..........

Syntax
<flag> = QUERY(<sql_string> [, <substitute0>] [,
<substitute1>] [,...])

Data
Token Name Token Type Meaning
Type
sql_string variable or TEXT Double-quoted string
value containing a valid SQL query.
The string can contain "%a"
substitution markers to enable
dynamic query building. These
"%a" markers are filled in, in
order from the variables
following the query string. The
substitution mechanism is
similar to that found in the
TO_CHAR function, although
only the generic "%a" is
supported in this instance. To
substitute a string value in the
query, the substitution marker
must be single quoted.
substitute* variable or (varies) Substitution values to insert
value into the query string. The
number of variables must
match the number of
substitution markers.
flag return INT 1 for success or 0 for failure

Example 1
In the following example, the rule variable named prop_val is the same as the
name of the column in the database table. Therefore, the form SELECT

5-96 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Parametric Modeling Functions
RELOCATE

prop_val is permissible. The database table name is project_config.


Information is retrieved from the first record that matches the criteria. The type of
data for the database variable prop_val must match the type of data contained in
the rule variable prop_name.
(RULE) THEN flag = QUERY("SELECT prop_val
FROM project_config
WHERE property = '%a' ", prop_name)

Example 2
In the following example, the rule variable has a name that is different from the
name of the database variable. The database variable named pipe_dia is retrieved
into the rule variable named D, and the database variable named pipewallstd is
retrieved into the rule variable named W.
(RULE) THEN flag = QUERY("SELECT pipe_dia(D), pipewallstd(W)
FROM pipe_diameter
WHERE size_1 = %a", nps1)

RELOCATE
This function repositions or reorients (or both) a component within its current set
of rules. Most often, the final location and orientation of a component will not be
known until after the user has entered some locational data (for example, using
PICK_POINT). After gathering this data, the rules can call this function to reposition
the component.

W This function must be called before any function that generates design
file element records is called. An attempt to change the coordinate
system after calling a design file function (for example, CELL) will result
in a fatal error.

This function must be called in a rule that sets the step[ ] variable. For details,
see Using the Step Array Variable to Control the Order of Processing and Running
Rules on page 9-18 in the PlantSpace Design Series Administrator Guide.

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 5-97
5 Parametric Modeling Functions
Functions

Syntax
<flag> = RELOCATE([{ROTATION}] [{POSITION}])

Data
Token Name Token Type Meaning
Type
{ROTATION} (See the argument set for {ROTATION} on page 5-5.)
{POSITION} (See the argument set for {POSITION}on page 5-6.)
flag return INT 1 for success or 0 for failure

The RELOCATE function is capable of handling absolute placement


arguments. To relocate the following components to an absolute position, you
can substitute 'ABS_PNT' for 'OFFSET' in the {POSITION} argument set,
and 'ABS_ANGLE' for 'ANGLE' or 'ABS_MAT' for 'MATRIX' in the
{ROTATION} argument set. It is permissible to mix an absolute position with
a relative rotation and the reverse.

Example
The following example shows the use of the RELOCATE function to reposition and
re-orient a cell (just created by using the CELL and PRIM functions) from an
established position in space. The OFFSET is 10, 20, and 30 units in the X, Y, Z
global space. The rotation is through Euler angles of 30, 0, and 0 degrees.
(RULE) THEN step[1] = RELOCATE('OFFSET', 10,20,30, 'ABS_ANGLE',
30,0,0)
+ CELL('start','cellname', 'label', label, 'snap', 2,
0,0,0,
length,0,0)
+ PRIM('cyll', 'solid', 'ang', 90,90,0, diameter/2,
length)
+ CELL('END')
(END)

REPLACE_LABEL
This function replaces the text label in an existing cell of a master design file with
the label supplied as an argument.

This function cannot be called in a rule that sets the step[ ] array variable to
control the order of rule processing.

5-98 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Parametric Modeling Functions
RETURN

Syntax
<flag> = CELL_DETAILS(<address>, <new_label>)

Data
Token Name Token Type Meaning
Type
address variable or INT[3] Block, byte, and file number
value of cell to examine. Use
SELECT_CELL to get this
address data.
new_label variable or TEXT Label to insert into the cell
value to replace the old label
flag return INT 1 for success or 0 for failure

Example
In the following example, the address of a cell in the design file has been determined
to have the address cell_address. The label information contained in
parent_label replaces the exiting label information in this cell.
(RULE) THEN flag = REPLACE_LABEL(cell_address,
parent_label)

RETURN
This function makes values used in this level of rules available to the calling rule file.

This function call must be placed before CELL('END') commands. If a cell


was created within the rule, RETURN must come before CELL('END').

The values can be retrieved by using the ADOPT function. More values can be listed
in the RETURN call than are retrieved in the ADOPT call.

This function must be called in a rule that sets the step[ ] variable. For details,
see Using the Step Array Variable to Control the Order of Processing and Running
Rules on page 9-18 in the PlantSpace Design Series Administrator Guide.

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 5-99
5 Parametric Modeling Functions
Functions

Syntax
<flag> = RETURN(<variable0> [, <variable1>] [,...])

Data
Token Name Token Type Meaning
Type
variable* variable or (varies) Variable to be returned.
value Multiple values can be
returned.
flag return INT 1 for success or 0 for failure

Example
The following example shows the last line of code in a rule. Previous code in the
rule has established the connect points for the cell and executed the code to create
the cell. This line of code returns the connect points to the calling rule and
terminates cell creation.
(RULE) THEN step[2] = RETURN(snap1, snap2, snap3) +
CELL('END')

SDNF_DATA
This function retrieves data from an SDNF data file created by Intergraphs
Frameworks program. The function operates in three modes:

Opening the data file


Within a loop, extracting each section or plate
Cleaning up memory after the loop

This function cannot be called in a rule that sets the step[ ] array variable to
control the order of rule processing.

5-100 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Parametric Modeling Functions
SDNF_DATA

Syntax for Opening the Data File


<flag> = SDNF_DATA('PROPERTY', <error>, '<standard>',
<filename>)

Token Data
Token Type Meaning
Name Type
PROPERTY keyword (none) Open the specified file and
store the design code or
standard in <standard>.
error variable or TEXT Error message
value
standard variable name TEXT Variable to store standard in
filename variable or TEXT File to open to extract data
value from
flag return INT 1 for success or 0 for failure

Syntax for Extracting Each Section or Plate


<flag> = SDNF_DATA('NEXT_PLATE'|'NEXT_SECTION', <error>, '<id>',
'<cardinal_point>', '<member_type>', '<component_type>',
'<section>', '<grade>', '<piece_name>', '<orientation_vector>',
'<rotation>', '<mirrorX>', '<mirrorY>', '<end_pts1>', '<end_pts2>',
'<length_unit>')

W You cannot mix calls of NEXT_PLATE and NEXT_SECTION.

Data
Token Name Token Type Meaning
Type
NEXT_PLATE keyword (none) Get the information
(data) for one plate from
the stored data.
NEXT_SECTION keyword (none) Get the information
(data) for one section
from the stored data.
error variable or TEXT Error message
value
id variable TEXT Member name to store
name in the Design Series
label.

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 5-101
5 Parametric Modeling Functions
Functions

Data
Token Name Token Type Meaning
Type
cardinal_point variable INT Cardinal point to place
name component by.
component_type variable TEXT Component type.
name Examples of how the
member is used are:
beam, column, or brace.
piece_name variable TEXT Piece mark
name
orientation_vector variable vector Orientation vector used
name to determine the
member's orientation
within the design file
rotation variable REAL Rotation about the
name member axis
mirrorX variable INT Variable indicating
name whether the member is
mirrored about the X
axis
mirrorY variable INT Variable indicating
name whether the member is
mirrored about the Y
axis
length_unit variable TEXT End point units
name
flag return INT -1 for error, 0 for end of
file, or 1 for success

Syntax for Cleaning Up Memory


<flag> = SDNF_DATA('CLEANUP')

Data
Token Name Token Type Meaning
Type
CLEANUP keyword (none) Free memory allocated for
SDNF extraction and close
the data file.
flag return INT 1 for success or 0 for failure

5-102 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Parametric Modeling Functions
SELECT_CELL

Example
In the following example, the first rule opens the named SDNF file by section name
for processing. The second rule should be activated within a loop in the rule file to
retrieve all the members, one member at a time. On each successful retrieval, the
data for the member is placed into the variables named by the user.
(RULE) THEN flag[0] = SDNF_DATA('PROPERTY', 'err_msg',
'design_code', filename)
!start of loop
(RULE) THEN flag[1] = sdnf_data ('NEXT_SECTION', 'err_msg',
'id'
'cardinal point'

'member_type'
'component_type'

'section',

'grade',

'piece_name',
'orientation_vector',

'rotation',

'mirrorX',
'mirrorY',

'end_pts1',
'end_pts2',
'length_unit')

!end of loop

(RULE) THEN flag[2] = sdnf_data('CLEANUP')

SELECT_CELL
This function prompts the user to select a Design Series cell from the design file.
The label of the selected cell is returned to the expert system rules for use.
Optionally, the cell's address and dimensional details can be saved for later retrieval
by the CELL_DETAILS function. This information can be used within the rules

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 5-103
5 Parametric Modeling Functions
Functions

for creating similar components or for creating mating components dependent


upon dimensional information from the selected cell.

This function cannot be called in a rule that sets the step[ ] array variable to
control the order of rule processing.

Syntax
<flag> = SELECT_CELL('<label>' [, 'ADDRESS', '<cell_addr>'
|<cell_to_select>] [, 'CELL_DETAILS'] [, 'LINE_STRING_ONLY']
[, 'ALLOWED', <type_list>] [, 'NESTED_CELL'][, 'MESSAGE',
<pr_message>
[, <er_message>]])

Data
Token Name Token Type Meaning
Type
label variable name TEXT Variable to store label of
selected cell
ADDRESS keyword (none) If the following
argument is a variable
name token, the address
of the selected cell will
be written to it.
If the following
argument is a variable
or value token, the
address of the cell to
select will be read from
it.
This second usage of the
'ADDRESS' keyword makes
this function silent.
cell_addr variable name INT[3] Stores addresses of the
selected cell
cell_to_select variable or value INT[3] Address of cell to select
CELL_DETAILS keyword (none) Make cell details available
through the CELL_DETAILS
function. This behavior is
off by default.
LINE_STRING_ONLY keyword (none) Allow MicroStation Type
4 (line string) selection
only.

5-104 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Parametric Modeling Functions
SELECT_CELL

Data
Token Name Token Type Meaning
Type
ALLOWED keyword (none) Use the following list to
filter selectable
components.
type_list variable or value TEXT Single-quoted, space-
delimited list of valid
component or commodity
types for selection. List
length is 40 characters.
NESTED_CELL keyword (none) Allow a nested cell to be
selected from within a
parent cell.
MESSAGE keyword (none) Use the first following
argument as a prompt for
the MicroStation prompt
field. The optional second
following argument is
used as a prompt to the
error field.
pr_message variable or value TEXT Message to the prompt
field
er_message variable or value TEXT message to the error field
flag return INT 1 for success or 0 for
failure

Example 1
In the following example, the rule enables the user to identify a cell by using the
mouse cursor. It always returns a label. In this case it is stored in 'beam_label'.
The 'ADDRESS' keyword returns the address of the selected cell to
'cell_address' and the 'CELL_DETAILS' keyword stores several items of
data about the cell for later use. The 'NESTED_CELL' keyword allows the selection
of one of several cells that make up a composite cell. The 'DATAPOINT' keyword
stores the coordinates of the selected point of the selected cell in 'p13'. The
messages are displayed in the prompt and error fields of the MicroStation command
window.
(RULE) THEN flag = SELECT_CELL('beam_label',
'ADDRESS', 'cell_address',

'CELL_DETAILS',

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 5-105
5 Parametric Modeling Functions
Functions

'NESTED_CELL',

'ALLOWED', 'stds hprt',

'DATAPOINT', 'p13',
'MESSAGE',

"Select attachment member",


"Reset to place by point")

Example 2
The following example enables the user to select only a line string cell. It returns
both a label and a cell address.
(RULE) THEN flag = SELECT_CELL('selected_label',
'ADDRESS', 'cell_address',

'LINE_STRING_ONLY')

SIN
This function returns the sine of an angle argument. The argument is measured in
degrees and can be a numeric variable, expression, or constant.

This function cannot be called in a rule that sets the step[ ] array variable to
control the order of rule processing.

Syntax
<angle_sin> = SIN(<angle>)

Token
Token Type Data Type Meaning
Name
angle variable or INT or Angle in degrees to take sine
value REAL of
angle_sin return REAL Sine of <angle>

SQRT
This function returns the square root of a non-negative numeric expression.

5-106 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Parametric Modeling Functions
STR_EDIT (formerly STREDT)

This function cannot be called in a rule that sets the step[ ] array variable to
control the order of rule processing.

Syntax
<root> = SQRT(<number>)

Token
Token Type Data Type Meaning
Name
number variable or INT or Number to take square root
value REAL of
root return float Square root of <number>

STR_EDIT (formerly STREDT)


This function executes one or more specified editing operations on a text argument.

This function must be called in a rule that sets the step[ ] variable. For details,
see Using the Step Array Variable to Control the Order of Processing and Running
Rules on page 9-18 in the PlantSpace Design Series Administrator Guide.

Syntax
<edit_string> = STR_EDIT(<edit_key>, <string>)

Data
Token Name Token Type Meaning
Type
edit_key keyword (none) Single-quoted, comma-
separated string containing
one or more of the editing
keywords (in the Keyword
Table that follows). If more
than one editing key is listed,
they are executed in the
order shown.
string variable or TEXT String to operate on
value
edit_string return TEXT Edited string

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 5-107
5 Parametric Modeling Functions
Functions

Keyword Table for edit_key

Edit Keyword Meaning


COLLAPSE Removes all space characters from the text string
COMPRESS Replaces multiple spaces with single blank spaces
TRIM Removes all leading and trailing spaces from the
text string
UPCASE Converts the text string to all upper case characters
LOWCASE Converts the text string to all lower case characters

Example
(RULE) IF STR_EDIT('COMPRESS, UPCASE', answer) = "Y"
THEN step[0] = 1
(RULE) IF STR_EDIT('TRIM LOWCASE', answer) = "y"
THEN step[0] = 1
(RULE) IF STR_FIND('LENGTH', STR_EDIT('COLLAPSE', answer)) = 0
THEN step[0] = message('PAUSE', 'ER', "Answer cannot be
blank")

STR_FIND (formerly STRNUM)


This function can locate a substring within a string, determine the length of a text
string, or determine if a text string is or is not numeric.

This function cannot be called in a rule that sets the step[ ] array variable to
control the order of rule processing.

Syntax for Finding a Sub-string


<start> = STR_FIND('LOCATE', <source>, <target>)

Data
Token Name Token Type Meaning
Type
LOCATE keyword (none) Find the <target> within
the <source>.
source variable or TEXT String to search
value

5-108 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Parametric Modeling Functions
STR_FIND (formerly STRNUM)

Data
Token Name Token Type Meaning
Type
target variable or TEXT String to find
value
start return INT Position at which the first
occurrence of the
<target> begins in the
<source>. If the
<target> is not found
within the <source>, the
length of the <source> is
returned.

Syntax for Finding the Length of a String


<size> = STR_FIND('LENGTH', <source>)

Data
Token Name Token Type Meaning
Type
LENGTH keyword (none) Measure the <source>.
source variable or TEXT String to measure
value
size return INT Length of the <source>.

Syntax for Determining a Numeric String


<true_or_false> = STR_FIND('NUMERIC', <source>)

Data
Token Name Token Type Meaning
Type
NUMERIC keyword (none) Determine if the
<source> can be
interpreted as a number.
source variable or TEXT String to evaluate as a
value number. Scientific notations
('15e-6') are considered
valid numbers.
true_or_false return INT 1 if a number, 0 if not a
number

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 5-109
5 Parametric Modeling Functions
Functions

Example
The following example shows various returns depending on the keyword used.
(RULE) IF STR_FIND('NUMERIC', rot_angle) = 1
THEN b_angle = char$real(rot_angle)
(RULE) IF STR_FIND('LENGTH', file_name) <= 12
AND STR_FIND('LOCATE', file_name, '.') = 1
THEN step[0] = 1
(RULE) IF STR_FIND('LOCATE', file_name, '.') <> 1
AND STR_FIND('LENGTH', file_name) > 8
THEN step[0] = message('ER', "Filename is too long")
+ clear('step[0], file_name')

STR_LENGTH (formerly STRG$SIZE)


This function determines the length of a string argument.

This function cannot be called in a rule that sets the step[ ] array variable to
control the order of rule processing.

Syntax
<length> = STR_LENGTH(<string>)

Data
Token Name Token Type Meaning
Type
string variable or TEXT String to measure
value
length return INT Length of string

STR_MATCH (formerly STRING$MATCH)


This function checks if a target sub-string can be found within a source string.

This function cannot be called in a rule that sets the step[ ] array variable to
control the order of rule processing.

5-110 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Parametric Modeling Functions
STR_MID0 (formerly EXTRACT)

Syntax
<found> = STR_MATCH(<target>, <source>)

Data
Token Name Token Type Meaning
Type
target variable or TEXT String to find
value
source variable or TEXT String to search within
value
found return TEXT '.TRUE.' if found or
'.FALSE.' if not found

Example
In the following example, test is set to '.TRUE.' because 'GBD' can be found in
the source string.
test = STR_MATCH('GBD', 'GAD GBD GCD')

STR_MID0 (formerly EXTRACT)


This function extracts a text sub-string from a text string variable.

This function cannot be called in a rule that sets the step[ ] array variable to
control the order of rule processing.

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 5-111
5 Parametric Modeling Functions
Functions

Syntax
<substring> = STR_MID0(<start>, <length>, <string>)

Data
Token Name Token Type Meaning
Type
start variable or INT Position at which to begin
value the extraction. Characters are
indexed from 0. If the
<start> is greater than
the <length>, an empty
string will be returned.
length variable or INT Number of characters to
value extract. If the <start> +
<length> is greater than
the length of the
<string>, the function
will return characters up to
the end of the string.
string variable or TEXT String to extract from
value
substring return TEXT Extracted sub-string

Example
In the following example, STR_MID0 is used within an expression to get the first
two characters from the text string sect_name for comparison with the text
string '2L'.
TEXT sect_name, mem_type;
(RULE) IF extract(0, 2, sect_name) = '2L'
THEN mem_type = 'double_angle'

STR_MID1 (formerly STRING$EXT)


This function extracts a substring from a source string without modifying the source
string. The maximum length of the source string is 80 characters. The first column
of the source string is column 1 and the copy is inclusive (the ending column is
included in the copy). If the ending column is greater than the last column in the
string, the extraction ends at the last column.

This function cannot be called in a rule that sets the step[ ] array variable to
control the order of rule processing.

5-112 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Parametric Modeling Functions
STR_REPLACE (formerly STRING$REPLACE)

Syntax
<substr> = STR_MID1(<source>, <start>, <end>)

Data
Token Name Token Type Meaning
Type
source variable or TEXT String to extract from
value
start variable or INT Starting location
value
end variable or INT Starting location
value
substr return TEXT Extracted sub-string

STR_REPLACE (formerly STRING$REPLACE)


This function substitutes a replacement sub-string for a target sub-string within the
original source string. The source string is not modified. If the system does not find
the target sub-string within the source string, it returns the source string. If more
than one occurrence is found, only the first one is replaced.

This function cannot be called in a rule that sets the step[ ] array variable to
control the order of rule processing.

Syntax
<new_string> = STRING_REPLACE(<source>, <target>,
<replacement>)

Data
Token Name Token Type Meaning
Type
source variable or TEXT String to search within
value
target variable or TEXT String to search for
value
replacement variable or TEXT String to substitute for
value <target>
new_string return TEXT String containing the
replacement

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 5-113
5 Parametric Modeling Functions
Functions

STRIP
This function normalizes a transformation matrix.

This function cannot be called in a rule that sets the step[ ] array variable to
control the order of rule processing.

Syntax
<normal_transform> = STRIP(<scaled_transform>)

Data
Token Name Token Type Meaning
Type
scaled_transform variable or Matrix Transformation matrix
value to normalize
normal_transform return Matrix Normalized
transformation matrix

SUB
This function runs a non-graphical set of rules as sub-rules of another rule file.
Consequently, no arguments to modify the location and orientation of cells are
supported. In all other respects, the SUB function behaves the same way as the BUD
function. For more details on how expert system rules are loaded and run, see
BUD on page 5-36. The SUB function can also be used recursively, that is, a rule
can call itself.

This function must be called in a rule that sets the step[ ] variable. For details,
see Using the Step Array Variable to Control the Order of Processing and Running
Rules on page 9-18 in the PlantSpace Design Series Administrator Guide.

5-114 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Parametric Modeling Functions
SUB

Syntax
<flag> = BUD('<bud_type>|<rule_name> [, [<subcode1>],
[<subcode2>], [<product>], [<application>]]', ['LIST',
<variable0> [, <variable1>] [,...]])

Token Data
Token Type Meaning
Name Type
bud_type value TEXT Name of class to identify rule.
See the explanation under the
function BUD on page 5-36.
rule_name value TEXT Name of specific rule to run.
See the explanation under the
function BUD on page 5-36.
subcode1 value TEXT Matches to EXPERT_RULES.
See the explanation under the
function BUD on page 5-36.
subcode2 value TEXT Matches to EXPERT_RULES.
See the explanation under the
function BUD on page 5-36.
product value TEXT Design Series product class such
as PIPE and CONC. See the
explanation under the function
BUD on page 5-36.
application value TEXT Defaults to PSDS unless
otherwise specified here
LIST keyword (none) Precedes list of variables to be
passed to the BUD rule

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 5-115
5 Parametric Modeling Functions
Functions

Token Data
Token Type Meaning
Name Type
variable* variable or (varies) Variables to be passed to the
value BUD rule for inheritance. The
list of variables must agree in
order and data type (including
array dimensions) with the list to
be inherited, although the names
can be different. The number of
variables in either list can be
shorter or longer than the
corresponding list, but no
arguments can be skipped.
Therefore, those variables that
must be passed and inherited
must be specified first in the
lists.
flag return INT 1 for success or 0 for failure

Example
In the following example, this SUB function call loads and executes the TOEANGLE
rule from product PIPE in the default application (not specified). The two
parameters, PIPE_CLASS and P0, are passed to this rule.
(RULE) THEN step[3] = SUB('TOEANGLE, , , PIPE', 'LIST',
PIPE_CLASS, P0)

SURFACE
The function indicates when graphics primitives should be used to create a surface.
This function places a surface record into the design file. To create a proper image,
the user must satisfy all MicroStation requirements in terms of record types and
order of placement after the SURFACE header. (See MicroStation documentation
for these requirements.)

This function must be called in a rule that sets the step[ ] variable. For details,
see Using the Step Array Variable to Control the Order of Processing and Running
Rules on page 9-18 in the PlantSpace Design Series Administrator Guide.

5-116 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Parametric Modeling Functions
SURFACE

Syntax
<flag> = SURFACE('SURFACE'|'SOLID', 'PROJ'|'REVOL' [, {ROTATION}]
[, {POSITION}] [, 'ELEM', <boundary_elems>])

Data
Token Name Token Type Meaning
Type
SURFACE keyword (none)
Create a surface header.
SOLID keyword (none)
Create a solid header.
PROJ keyword (none)
Indicate that this is a surface
of projection.
REVOL keyword (none) Indicate that this is a surface
of revolution.
{ROTATION} (See the argument set for {ROTATION} on page 5-5.)
{POSITION} (See the argument set for {POSITION}on page 5-6.)
ELEM keyword (none) Use the following integer to
indicate the number of
boundary primitives used in
creating the surface. By
default, the boundary is
formed by one primitive, such
as a line string or shape, but
the latest versions of
MicroStation allow more than
one boundary. The number of
boundary primitives must be
specified so that it can be
inserted into the header
record of the surface element.
boundary_elems variable or INT Number of boundary
value elements
flag return INT 1 for success or 0 for failure

Example
The following example creates a solid cell using the surface function. The CELL
function names the cell, assigns it a label and connect points. The surface
function initiates the construction of the solid surface that is created by a cross-
sectional shape and lines of projection. The first two PRIM functions define the
coordinates of the cross sectional shape at the beginning and end of the cell. The
CONTROL function followed by the remaining PRIM functions identify the
corresponding lines to connect the cross_section points at each end of the cell. The

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 5-117
5 Parametric Modeling Functions
Functions

ENDSURF function identifies the end of the surface generation specifications and
the CELL('END') function identifies the end of the cell generation specs.
(RULE) THEN step[4] = relocate('off', place_point)
+ CELL('start','stds', 'label', label, 'snap', 2, 0,0,0,
len,0,0)
+ SURFACE('solid', 'proj')
+ PRIM('shape', 6, 0,a1, 0,a2, 0,a3, 0,a4, 0,a5, 0,a6)
+ PRIM('shape', 6, len,a1, len,a2, len,a3, len,a4,
len,a5, len,a6)
+ CONTROL('rul_lin')
+ PRIM('line' 0,a1, len,a1)
+ PRIM('line' 0,a2, len,a2)
+ PRIM('line' 0,a3, len,a3)
+ PRIM('line' 0,a4, len,a4)
+ PRIM('line' 0,a5, len,a5)
+ PRIM('line' 0,a6, len,a6)
+ ENDSURF('solid')
+ CELL('END')
+ RETURN

TAN
This function returns the tangent of an angle argument. The argument is measured
in degrees and can be a numeric variable, expression, or constant.

This function cannot be called in a rule that sets the step[ ] array variable to
control the order of rule processing.

5-118 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Parametric Modeling Functions
TIME

Syntax
<angle_tan> = TAN(<angle>)

Token
Token Type Data Type Meaning
Name
angle variable or INT or Angle in degrees to take
value REAL tangent of
angle_tan return REAL Tangent of <angle>

TIME
This function returns a text string containing requested elements of the current date
and time. Time formats can be written in either 24 hour style or 12 hour a.m./p.m.
style.

This function cannot be called in a rule that sets the step[ ] array variable to
control the order of rule processing.

Syntax
<td_string> = TIME(<time_code>|'<time_keyword>')

Data
Token Name Token Type Meaning
Type
time_code variable or INT Time/date format code from the
value Code and Keyword Table that
follows
time_keyword keyword (none) Time/date format keyword,
where applicable, from the Code
and Keyword Table that follows
td_string return TEXT String containing the time or
date (or both) in the requested
format

Code and Keyword Table

Format Format
Format Hours
Code Keyword
1 TIME HH:MI:SS 24
2 ETIME HH:MI:SSa.m./p.m. 12

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 5-119
5 Parametric Modeling Functions
Functions

Format Format
Format Hours
Code Keyword
4 DATE MMDDYY
5 TIME+DATE HH:MI:SS DDMMYY 24
6 (none) HH:MI:SSa.m./p.m. MMDDYY 12
8 DATE1 MM:DD:YY
9 (none) HH:MI:SS MM:DD:YY 24
10 (none) HH:MI:SSa.m./p.m. MM:DD:YY 12
16 DATE2 DD <month> YYYY
17 (none) HH:MI:SS DD <month> YYYY 24
18 (none) HH:MI:SSa.m./p.m. DD <month>YYYY 12
37 DATE+TIME MMDDYY HH:MI:SS
38 (none) MMDDYY HH:MI:SSa.m./p.m. 24
41 (none) MM:DD:YY HH:MI:SS 12
42 (none) MM:DD:YY HH:MI:SSa.m./p.m.
49 (none) DD <month> YYYY HH:MI:SS 24
50 (none) DD <month> YYYY HH:MI:SSa.m./p.m. 12

Example
The following examples set various formats for displaying the date and time:
(RULE) THEN CURRENT_TIME = TIME('TIME')
(RULE) THEN CURRENT_TIME = TIME('DATE+TIME')
(RULE) THEN CURRENT_TIME = TIME(41)

TO_CHAR
This function composes a formatted text string of numbers or text (or both). It
enables you to construct text strings dynamically for prompts or messages to the
user. In its simplest form, a number is converted to a string. In its text formatting
form, the first argument (which must be text and is the format string) is combined
with any following arguments to produce a formatted text string.

This function cannot be called in a rule that sets the step[ ] array variable to
control the order of rule processing.

5-120 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Parametric Modeling Functions
TO_CHAR

Syntax for Converting a Number to a Formatting String


<string> = TO_CHAR(<number>)

Token
Token Type Data Type Meaning
Name
number variable or INT or Number to convert to a string
value REAL
string return TEXT Output string of the converted
number

Syntax for Comprising a String Using a Variable as a Substitution


<string> = TO_CHAR(<format>, [, <substitute0>] [,
<substitute1>] [,...])

Data
Token Name Token Type Meaning
Type
format variable or TEXT Format string indicating
value where and how the following
variables should be
substituted. The format
string can use any standard C
language "printf"
formatting codes (for
example, %s, %d, and
%12.6lf). For details, refer
to a C language manual.
substitute* variable or (varies) Substitution values to insert
value into the query string. The
number of variables must
match the number of
substitution markers.
string return TEXT Formatted output string

Example
The following example shows the use of the TO_CHAR function by first converting
a real number into a text string and returning it to the variable TXT1. Likewise, an
integer value is returned to TXT2. The first TXT3 rule shows the conversion of text
data, real data, and integer data into a single text string and its return to TXT3. The
second TXT3 rule is identical to the first rule, except that the use of single quotation
marks around the format specification displays any alphabetic characters in upper
case.

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 5-121
5 Parametric Modeling Functions
Functions

REAL a;
INT b;
TEXT txt1;
TEXT txt2;
TEXT txt3;
! The following rules set text1 to the string "12.000000 "
and
! txt2 to the string "5 "
(RULE) THEN a = 12.0
(RULE) THEN txt1 = TO_CHAR(a)
(RULE) THEN b = 5
(RULE) THEN txt2 = TO_CHAR(b)
! The following rules set txt3 to the string
! a is 12.000000 and b is 5
(RULE) THEN txt3 = TO_CHAR( "%s is %lf and %s is %d",
'a',a,'b',b)

Using single quotes to force capitalization, the rule would be:


! The following rules set text3 to the string
! A IS 12.000000, B IS 5
(RULE) THEN txt3 = TO_CHAR( '%s is %lf and %s is
%d','a',a,'b',b)

UNITS
This function uses units keywords to operate in three modes: conversion,
identification, and UOR reporting. The conversion mode converts from one named
unit to another or to the current modeling units by default. The identification mode
returns the actual units associated with a named unit. The third mode, UOR
reporting, retrieves the number of MicroStation UORs associated with each
modeling unit.

This function cannot be called in a rule that sets the step[ ] array variable to
control the order of rule processing.

5-122 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Parametric Modeling Functions
UNITS

Syntax in Conversion Mode


<converted> = UNITS(<dimension>, '<from_key>' [, '<to_key>'])

Token
Token Type Data Type Meaning
Name
dimension variable or INT or REAL Number to convert
value
from_key keyword (none) Units to convert from one of
$MODEL, $MASTER,
$SUBUN, and $UORS
to_key keyword (none) Units to convert to.
'$MODEL' is the default.
converted return INT or REAL Converted dimension

Syntax in Identification Mode


<unit_name> = UNITS('<units_key>')

Token Token Data


Meaning
Name Type Type
units_key keyword (none) Return the actual units setting for
this units keyword. Possible
keywords are $MODEL,
$MASTER, and $SUBUN.
unit_name return TEXT Name ("FT", "MM", and so on)
of the units set for the units
keyword

Syntax in UOR Reporting Mode


<uors> = UNITS('$UORS')

Token Token Data


Meaning
Name Type Type
$UORS keyword (none) Return the number of UORS for
each sub-unit.
uors return INT Number of UORS per sub-unit

Example
The following example shows the three modes of the UNITS function. In mode 1,
the number of UORS is returned in the numeric value given as 0.5. Mode 2 returns

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 5-123
5 Parametric Modeling Functions
Functions

a text string of the master units. Mode 3 returns a numeric value of the number of
UORs in a modeling unit.
REAL conv_valu, cur_uors;
TEXT cur_units;
INT step[1];
(RULE) THEN conv_valu = UNITS( 0.5, 'IN', '$UORS') ! Mode 1
(RULE) THEN cur_units = UNITS('$MASTER') ! Mode 2
(RULE) THEN cur_uors = UNITS('$UORS') ! Mode 3
(RULE) THEN step[0] = message('pause'),
'ms',to_char("Current units = %s",
cur_units),
'pr',to_char("Converted value = %lf",
con_valu),
'er',to_char("Current UORS = %lf",
cur_uors))

Sample results displayed in the MicroStation command window are:


Current units = FT
Converted value = 4000.000000
Current UORS = 8000.000000

UOR_LOCAL_POINT (formerly UOR_LOCAL_PT)


This function is not expected to be used often because points normally
calculated within the rules are almost always in the proper coordinate system.
This is primarily a function for use by specialized user commands in Design
Series that pre-load data into the Design Series for later use by the rules.

This function converts a point from global space to Design Series local space. This
function enables you to convert a point (defined in global space coordinates and
passed into the Design Series modeling system) from a special user command or
calculated within the rules into the coordinate system in effect at the current stage of
the rules.

5-124 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Parametric Modeling Functions
USER_INPUT (formerly PROMPT_VAL)

This function cannot be called in a rule that sets the step[ ] array variable to
control the order of rule processing.

Syntax
<local_point> = UOR_LOCAL_POINT(<global_point>)

Data
Token Name Token Type Meaning
Type
global_point variable or Point Global point to convert
value
local_point return Point Point converted to local
space

Example
In the following example, the globally defined point pt1 is converted to a point in
the local coordinate system, namely pt2.
(RULE) THEN pt2 = UOR_LOCAL_POINT(pt1)

USER_INPUT (formerly PROMPT_VAL)


This function prompts for and receives any type of user input (text, data points, or
resets). Only one input will be collected per call. For example, if the user enters a
text string and then, without pressing <Enter>, selects a data point, the data point
will be stored in the second argument and the string will be lost. The type of input is
indicated by the return value of the function. In the previous example, the return
code would have been 3.

Keyed-in input is stored to the variables listed by name in the first argument. You
must always provide at least the name of a string variable. Any keyed-in input will be
stored in this variable unless a second variable name, of a numeric type, is provided.
When a numeric variable is also provided, valid numeric strings will be treated as
numeric values. Non-valid numeric strings and all other strings will be treated as
normal text and will be stored in the first variable. If a numeric variable is provided,
a units conversion keyword, such as $UORS or $MASTER can also be listed. For
more on unit conversion keywords, see UNITS on page 5-122.

This function cannot be called in a rule that sets the step[ ] array variable to
control the order of rule processing.

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 5-125
5 Parametric Modeling Functions
Functions

Syntax
<flag> = USER_INPUT('<string> [, <number> [, <units>]]',
'<datapoint>', <prompt0> [,<prompt1>])

Token Data
Token Type Meaning
Name Type
string variable name TEXT Variable in which to store text
keyed in by the user
number variable name INT or Variable in which to store the
REAL number keyed in by the user
units keyword (none) One of the units conversion
keywords, such as $UORS or
$MASTER, to be applied to
<number> when entered
datapoint variable name Point Variable in which to store the
point selected by the user
prompt0 variable or TEXT Prompt message to direct the
value users input
prompt1 variable or TEXT Optional prompt message to
value append to <prompt0>
flag return INT Indicate failure or the type of
input that was successfully
retrieved. Values are:
0 = Error
1 = User keyed-in text stored to
<string>
2 = User-entered a reset
3 = User-selected data point
stored to <datapoint>

Example 1
The following example shows the use of the USER_INPUT function to take
different actions based on the user response to a prompt. The response, either
through the keyboard or cursor, determines the value returned to the flag[6]
variable. The flag[6] variable can then be tested to take appropriate actions.
When the USER_INPUT function is activated it displays the prompt:
Keyin 'a' Axis Act. Angle(DEG)
DP = 0 Degrees, RST = 90 Degrees

5-126 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Parametric Modeling Functions
USER_INPUT (formerly PROMPT_VAL)

Because a numvar of a_angle is supplied in the calling parameters, the function


will allow a numeric entry. If a number is keyed in that value is stored in the variable
a_angle. If the keyin is not numeric it is considered an error and the rule request
a retry. The program is written to set a_angle to 0 or 90 degrees depending on
whether flag[6] = 3 (a data point was placed) or flag[6] = 2 (a reset button
was clicked).
! FLAG[6] is 1 when user keys in a text string
! FLAG[6] is 2 when user clicks the reset button
! FLAG[6] is 3 when user places a data point
! FLAG[6] is 4 when user keys in text that is convertible to
numeric, when specified
! If the key-in is not numeric, clear the step and ask for
it again
Text ta_angle;
REAL a_angle;
REAL a_angle_pt[3];
(RULE) IF flag[6] = 1
THEN step[9] = message('PAUSE', 'MS',
to_char("%s is not a valid Angle",
ta_angle),
'PR', "Please Try Again")
+ clear('step[9], flag[6], ta_angle')
! A valid keyin was entered, a data point was placed, or a
reset button was clicked
(RULE) THEN step[9] = 1
(RULE) THEN flag[6] = user_input('ta_angle, a_angle',
'a_angle_pt',

"Key in 'a' Axis Act.


Angle(DEG)",
"DP=0 Degrees, RST=90
Degrees")
! User placed a data point for an angle of 0 degrees

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 5-127
5 Parametric Modeling Functions
Functions

(RULE) IF flag[6] = 3
THEN a_angle = 0
! User clicked the reset button for an angle of 90 degrees
(RULE) IF flag[6] = 2
THEN a_angle = 90

Example 2
The following example shows the units syntax:
(RULE) THEN flag[8] = user_input('tadjx, adjx, $UORS', dummy,
"Enter X UOR offset value or",
to_char("DP for default (%lf)",
def_adjx))

VECTOR
This function performs geometric calculations with vectors. The eleven different
modes of operation are detailed in the syntax summary.

This function cannot be called in a rule that sets the step[ ] array variable to
control the order of rule processing.

Syntax for Calculating the Cross Product of Two Vectors


<vector2> = VECTOR( 'CROSS_PROD', <vector0>, <vector1>,
'<magnitude>')

Data
Token Name Token Type Meaning
Type
CROSS_PROD keyword (none) Calculate the cross product of
the following two vectors.
vector0 variable or Vector Direction cosines of the input
value vector
vector1 variable or Vector Direction cosines of the input
value vector

5-128 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Parametric Modeling Functions
VECTOR

Data
Token Name Token Type Meaning
Type
magnitude variable name REAL Magnitude of the output
vector
vector2 return Vector Direction cosines of output
vector

Syntax for Calculating the Dot Product of Two Vectors


<angle>= VECTOR( 'DOT_PROD', <vector0>, <vector1>[,
'DEG'|'RAD'])

Data
Token Name Token Type Meaning
Type
DOT_PROD keyword (none) Calculate the dot product of the
following two vectors.
vector0 variable or Vector Direction cosines of the input
value vector
vector1 variable or Vector Direction cosines of the input
value vector
DEG keyword (none) Measure angles in degrees.
RAD keyword (none) Measure angles in radians.
angle return REAL Angle between the input vectors

Syntax for Calculating the Cross Product of Two Lines with a Common Point
<vector> = VECTOR('CROSS_PROD_3PTS', <line0_end>, <start>,
<line1_end>, '<magnitude>')

Data
Token Name Token Type Meaning
Type
CROSS_PROD_3PTS keyword (none) Calculate the cross
product of line0 and
line1
line0_end variable or Point End point of line0
value
start variable or Point Start point of both input
value lines
line1_end variable or REAL End point of line1
value

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 5-129
5 Parametric Modeling Functions
Functions

Data
Token Name Token Type Meaning
Type
magnitude variable name REAL Magnitude of the output
vector
vector return Vector Direction cosines of the
output vector

Syntax for Calculating the Dot Product of Two Lines with a Common Point
<angle> = VECTOR('DOT_PROD_3PTS', <line0_end>, <start>,
<line1_end>
[, 'DEG'|'RAD'])

Data
Token Name Token Type Meaning
Type
DOT_PROD_3PTS keyword (none) Calculate the dot product of
line0 and line1
line0_end variable or Point End point of line0
value
start variable or Point Start point of both input
value lines
line1_end variable or REAL end point of line1
value
DEG keyword (none) Measure angles in degrees.
RAD keyword (none) Measure angles in radians.
angle return REAL Angle between the input
vectors

Syntax for Calculating the Cross Product of Two Lines


<vector> = VECTOR('CROSS_PROD_4PTS', <line0_start>,
<line0_end>, <line1_start>, <line1_end>, '<magnitude>')

Data
Token Name Token Type Meaning
Type
CROSS_PROD_4PTS keyword (none) Calculate the cross
product of line0 and
line1
line0_start variable or Point Start point of line0
value

5-130 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Parametric Modeling Functions
VECTOR

Data
Token Name Token Type Meaning
Type
line0_end variable or Point End point of line0
value
line1_start variable or Point Start point of line1
value
line1_end variable or REAL End point of line1
value
magnitude variable name REAL Magnitude of the output
vector
vector return Vector Direction cosines of the
output vector

Syntax for Calculating the Dot Product of Two Lines


<angle> = VECTOR('DOT_PROD_4PTS', <line0_start>, <line0_end>,
<line1_start>, <line1_end>[, 'DEG'|'RAD'])

Data
Token Name Token Type Meaning
Type
DOT_PROD_4PTS keyword (none) Calculate the dot product of
line0 and line1
line0_start variable or Point Start point of line0
value
line0_end variable or Point End point of line0
value
line1_start variable or Point Start point of line1
value
line1_end variable or REAL end point of line1
value
DEG keyword (none) Measure angles in degrees.
RAD keyword (none) Measure angles in radians.
angle return REAL Angle between the input
vectors

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 5-131
5 Parametric Modeling Functions
Functions

Syntax for Calculating the Direction Cosines of a Vector


<vector> = VECTOR('DIR_COSINES', <start>, <end>,
'<magnitude>')

Data
Token Name Token Type Meaning
Type
DIR_COSINES keyword (none) Calculate the direction cosines
of the vector between the
following two points.
start variable or Point Start point of the line
value
end variable or Point End point of the line
value
magnitude variable name REAL Magnitude of the output vector
vector return Vector Direction cosines of the output
vector

Syntax for Calculating the Magnitude of a Vector


<length> = VECTOR('LENGTH', <start>, <end>, '<vector>')

Token Data
Token Type Meaning
Name Type
LENGTH keyword (none) Calculate the distance between
the two following points.
start variable or Point Start point
value
end variable or Point End point
value
vector variable name Vector Direction cosines of the
output vector
length return REAL Length of the output vector

5-132 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Parametric Modeling Functions
VECTOR

Syntax for Calculating the Location of a Point Projected onto a Vector


<projection> = VECTOR('PROJECT', <start>, <end>, <point0>[,
'<flag>'])

Token Data
Token Type Meaning
Name Type
PROJECT keyword (none) Project <point0> onto the
line between <start> and
<end>.
start variable or Point Start point of line
value
end variable or Point End point of line
value
point0 variable or Point Point to project onto the line
value
flag variable name REAL Projection status:
0 = Projection within line
1 = Projection outside of start
2 = Projection outside of end
projection return Point Projected point

Syntax for Calculating the Location of a Point in Distance along a Vector


<pt_on_line> = VECTOR('PT_ALONG', <start>, <end>, <distance>)

Data
Token Name Token Type Meaning
Type
PT_ALONG keyword (none) Calculate the point coordinates
at <distance> along the line
from <start> to <end>.
start variable or Point Start point of line
value
end variable or Point End point of line
value
distance variable or INT or Distance along the line from the
value REAL start point
pt_on_line return Point Point at a specified distance
along the line from the start
point

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 5-133
5 Parametric Modeling Functions
Functions

Syntax for Calculating the Intersection of a Vector with a Plane


<flag> = VECTOR('PLANE_LINE', <point0>, <point1>, <point2>,
<start>, <end>, '<intersect>')

Data
Token Name Token Type Meaning
Type
PLANE_LINE keyword (none) Calculate the intersection
between the plane defined by the
following three points and the
line from <start> to <end>.
point0 variable or Point Point in plane
value
point1 variable or Point Point in plane
value
point2 variable or Point Point in plane
value
start variable or Point Start point of line
value
end variable or Point End point of line
value
intersect variable name Point Intersection between the line
and plane
flag return REAL Projection status:
0 = Error
1 = Success
2 = Points are colinear.
3 = Line and plane are parallel.
4 = Line has length zero.
5 = Intersection point(s) off plane

Example
In the following example, the rule shows all the keywords available to the function
and examples of the parameters. Each of the following keywords is described with
numeric input and output values, and the variable names correspond with the rule in
the previous section:

The CROSS_PROD keyword requires as input the direction cosines,


dir_cos1 and dir_cos2. If these are given as (3, 0, 0) and (0,
2, 0), the results are a direction cosine dir_cos1 of (0, 0, 1) and a
cross product magnitude, xprod, of 6.

5-134 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Parametric Modeling Functions
VECTOR

The CROSS_PROD_3PT keyword requires as input the


coordinates of three points, pt1, pt2, and pt3. If these points are
(2, -1, 0), (1, 0, 0) and (2, 1, 0), the results are a direction cosine
dir_cos2 of (0, 0, 1) and a cross product magnitude, xprod, of
2.
The CROSS_PROD_4PT keyword requires as input the
coordinates of four points, pt1, pt2, pt3, and pt4. If these
points are (2,0,0),
(3, -1, 0), (1, 1, 0) and (2, 2, 0), the resulting direction cosine
dir_cos3 is (0, 0, 1) and a cross product magnitude, xprod, of
2.
The DOT_PROD keyword requires as input the direction cosines,
dir_cos1 and dir_cos2. If these are given as (1, .5, 0) and (1,
0, 0) and the 'RAD' parameter is used, the result angle1 is
0.463648 radians.
The DOT_PROD_3PTS keyword requires as input three points,
pt1, pt2, and pt3. If these points are (1, 0, 2), (0, 0, 0) and (1, 0,
0), the result angle2 is 63.43 degrees.
The DOT_PROD_4PTS keyword requires as input four points,
pt1, pt2, pt3, and pt4. If these points are (1, 1, 0), (2, 2, 0), (0,
3, 0), and (5, 3, 0), the result angle3 is 45 degrees.
The DIR_COSINES and LENGTH keywords both require two
points, pt1 and pt2. If these points are (1, 1, 0) and (2, 3, 2), the
resulting direction cosine dir_cos4 is (.333333, .666666,
.666666) and the length is 3.0.
The PROJECT keyword requires three points, pt1, pt2, and pt3.
If these points are (0, 0, 0), (1, 0, 1) and (1, 0, 0), the resulting
projected point pt4 is (.5, 0, .5) and flag = 1 indicating a point
within the given two points of the line.
The PLANE_LINE keyword requires five points, pt1, pt2, pt3,
pt4, and pt5. If the three points defining the plane are (0, 0, 1), (0,
1, 1), and (1, 0, 1) and the points of the line are (0, 0, 0) and (2, 2, 2),
the resulting point of intersection intersec_pt is (1, 1, 1) and
flag is set to 1 for success.
The PT_ALONG keyword requires two points, pt1 and pt2, and a
length from the first point. If these points are (0, 0, 0) and (1, 1, 2)
and the length is 2, the resulting point on the line pt4 is (.816497,
.816497, 1.632993)

REAL pt1[3];

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 5-135
5 Parametric Modeling Functions
Functions

REAL pt2[3];
REAL pt3[3];
REAL pt4[3];
REAL pt5[3];
REAL intersec_pt[3];
REAL dir_cos1[3];
REAL dir_cos2[3];
REAL dir_cos3[3];
REAL dir_cos4[3];
REAL angle1;
REAL angle2;
REAL angle3;
REAL flag;
REAL length;
REAL xprod;
REAL distance;
(RULE) THEN dir_cos1 = VECTOR('CROSS_PROD', dir_cos1,
dir_cos2,
'xprod')
(RULE) THEN dir_cos2 = VECTOR('CROSS_PROD_3PTS', pt1, pt2,
pt3,'xprod')
(RULE) THEN dir_cos3 = VECTOR('CROSS_PROD_4PTS', pt1, pt2,
pt3, pt4,
'xprod')
(RULE) THEN angle1 = VECTOR('DOT_PROD', dir_cos1, dir_cos2,
'RAD')
(RULE) THEN angle2 = VECTOR('DOT_PROD_3PTS', pt1, pt2,
pt3,'DEG')
(RULE) THEN angle3 = VECTOR('DOT_PROD_4PTS', pt1, pt2, pt3,
pt4)

5-136 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Parametric Modeling Functions
VECTOR

(RULE) THEN dir_cos4 = VECTOR('DIR_COSINES', pt1, pt2,


'length')

(RULE) THEN length = VECTOR('LENGTH', pt1, pt2, 'dir_cos1')


(RULE) THEN pt4 = VECTOR('PROJECT', pt1, pt2, pt3, 'flag')
(RULE) THEN flag = VECTOR('PLANE_LINE', pt1, pt2, pt3,
pt4, pt5,
'intersec_pt')

(RULE) THEN pt4 = VECTOR('PT_ALONG', pt1, pt2,


distance)

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 5-137
5 Parametric Modeling Functions
Functions

5-138 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
6 Parametric Modeling Primitives

Introduction
This chapter expands on the chapter Using the Expert System in Design Series in the
PlantSpace Design Series Administrator Guide. This listing details the graphics primitives
available for creation through PRIM function calls. For a detailed explanation of the
PRIM function, see PRIM on page 5-92 of this Reference Guide for
Administrators.

You must define any required angles in degrees, not radians.

Quick Lookup by Name


The following table is a quick lookup of primitives by name.

Primitive Name Geometric Shape Page


ARC Elliptical Arc 6-3
CIRCLE Circle 6-3
CIRCELB Partial Torus (Non-snappable) 6-4
CIRCLELL Partial Torus (Snappable) 6-5
CONE Cone 6-6
CUBE Rectangular Prism (Snappable) 6-7
CYLL Cylinder (Snappable) 6-7
DUCT_ECC_RED Eccentric Reducing Duct (Non- 6-8
snappable)
DUCT_RED Concentric Reducing Duct (Non- 6-9
snappable)
DUCT_SEG Duct (Non-snappable) 6-10

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 6-1
6 Parametric Modeling Primitives
Introduction

Primitive Name Geometric Shape Page


ECONE Eccentric Cone 6-11
ECYLL Eccentric Cylinder 6-12
ELBOW Sectioned Elbow (Snappable) 6-12
ELLIPSE Ellipse 6-15
EPYRAM Eccentric Truncated Pyramid 6-15
(Snappable)
ETRCONE Eccentric Truncated Cone (Snappable) 6-16
HEMISPH Hemisphere 6-17
LINE Line 6-18
LINESTRING Line String 6-19
PIPE_ECC_RED Eccentric Pipe Reducer (Non- 6-20
snappable)
PIPE_ELB Pipe Elbow (Non-snappable) 6-21
PIPE_HUB Open-End Pipe (Non-snappable) 6-24
PIPE_RED Concentric Pipe Reducer (Non- 6-24
snappable)
PIPE_SEG Closed-End Pipe (Non-snappable) 6-25
POINT Point 6-26
POLYCP Polygonal Extrusion 6-26
PYRAM Pyramid (Snappable) 6-28
RECTANGLE Rectangle 6-28
RECTELL Partial Annulus 6-29
RIGHT_PRYSM Regular Polygonal Extrusion 6-30
SEMI_PRYSM Partial Regular Polygonal Extrusion 6-31
SHAPE Shape 6-32
SQTORND Rectangular-to-Round Transition 6-33
TRCONE Truncated Cone (Snappable) 6-34

6-2 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Parametric Modeling Primitives
Primitives

Primitives

ARC
Geometric Shape: Elliptical Arc
Syntax
PRIM('ARC', PRIMARY, SECOND, ALPHA, SWEEP)

Where Means
PRIMARY One-half the primary (major) axis
length
SECOND One-half the secondary (minor) axis
length
ALPHA Starting offset angle in the +X direction
SWEEP Sweep angle of arc

Example
PRIM('ARC', 3, 2, 10, 120)

Top View

CIRCLE
Geometric Shape: Circle

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 6-3
6 Parametric Modeling Primitives
Primitives

Syntax
PRIM('CIRCLE', RADIUS)

Where Means
RADIUS Radius of circle

Example
PRIM('CIRCLE', 2)

Top View

CIRCELB
Geometric shape: Partial Torus (Non-snappable)

For the snappable primitive, see the CIRCLELL primitive.

Syntax
PRIM('CIRCELB', RAD, R_RAD, SWEEP)

Where Means
RAD Radius of the opening
R_RAD Radius of the elbow
SWEEP Sweep angle

6-4 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Parametric Modeling Primitives
CIRCLELL

Example
PRIM('CIRCELB', 1, 3, 60)

Isometric View Top View

CIRCLELL
Geometric Shape: Partial Torus (Snappable)

For the non-snappable primitive, see the CIRCELB primitive.

Syntax
PRIM('CIRCLELL', RAD, R_RAD, SWEEP)

Where Means
RAD Radius of the opening
R_RAD Radius of the elbow
SWEEP Sweep angle

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 6-5
6 Parametric Modeling Primitives
Primitives

Example
PRIM('CIRCLELL', 1, 3, 60)

Isometric View Top View

CONE
Geometric Shape: Cone
Syntax
PRIM('CONE', RAD, H)

Where Means
RAD Radius of base
H Height

Example
PRIM('CONE', 1, 2)

Isometric View

6-6 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Parametric Modeling Primitives
CUBE

CUBE
Geometric Shape: Rectangular Prism (Snappable)

For the non-snappable primitive, see the DUCT_SEG primitive.

Syntax
PRIM('CUBE', LX, LY, LZ)

Where Means
LX X Dimension
LY Y Dimension
LZ Z Dimension

Example
PRIM('CUBE', 3, 4, 2)

Isometric View

CYLL
Geometric Shape: Cylinder (Snappable)

For the non-snappable primitive, see the PIPE_HUB primitive.

Syntax
PRIM('CYLL', RAD, H)

Where Means
RAD Radius of base
H Height

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 6-7
6 Parametric Modeling Primitives
Primitives

Example
PRIM('CYLL', 1, 2)

Isometric View

DUCT_ECC_RED
Geometric Shape: Eccentric Reducing Duct (Non-snappable)

For the snappable primitive, see the EPYRAM primitive.

Syntax
PRIM('DUCT_ECC_RED', LX, LY, H, TX, TY, DX, DY)

Where Means
LX X Dimension of base
LY Y Dimension of base
H Height
TX X Dimension of top
TY Y Dimension of top
DX X-Offset of top
DY Y-Offset of top

6-8 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Parametric Modeling Primitives
DUCT_RED

Example
PRIM('DUCT_ECC_RED', 2,2, 2.5, 1,1, 1,1)

Isometric View Top View

DUCT_RED
Geometric Shape: Concentric Reducing Duct (Non-snappable)

For the snappable primitive, see the PYRAM primitive.

Syntax
PRIM('DUCT_RED', LX, LY, H, TX, TY)

Where Means
LX X Dimension of base
LY Y Dimension of base
H Height
TX X Dimension of top
TY Y Dimension of top

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 6-9
6 Parametric Modeling Primitives
Primitives

Example
PRIM('DUCT_RED', 2, 2, 2.5, 1, 1)

Isometric View

DUCT_SEG
Geometric Shape: Duct (Non-snappable)

For the snappable primitive, see the CUBE primitive.

Syntax
PRIM('DUCT_SEG', LX, LY, LZ)

Where Means
LX X Dimension
LY Y Dimension
LZ Z Dimension

The duct is created along the Z axis.

6-10 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Parametric Modeling Primitives
ECONE

Example
PRIM('DUCT_SEG', 3, 4, 2)

Isometric View

ECONE
Geometric Shape: Eccentric Cone
Syntax
PRIM('ECONE', RAD, H, DX, DY)

Where Means
RAD Radius of base
H Height
DX X-Offset of apex of cone
DY Y-offset of apex of cone

Example
PRIM('ECONE', 1, 2, 0.5, 0.5)

Isometric View Top View

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 6-11
6 Parametric Modeling Primitives
Primitives

ECYLL
Geometric Shape: Eccentric Cylinder
Syntax
PRIM('ECYLL', RAD, H, DX, DY)

Where Means
RAD Radius of base
H Height
DX X-Offset of top cylinder
DY Y-offset of top cylinder

Example
PRIM('ECYLL', 1, 2, 0.5, 0.5)

Isometric View Top View

ELBOW
Geometric Shape: Sectioned Elbow (Snappable)

For the non-snappable primitive, see the PIPE_ELB primitive.

6-12 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Parametric Modeling Primitives
ELBOW

Syntax
PRIM('ELBOW', MASK, S_RAD, E_RAD, C_RAD, N, PNT1, PNT2,
PNT3)

Where Means
MASK Valid values:
0 = No pipes connected to elbow
1 = Pipe from PNT1 to PNT2 (start to elbow)
2 = Pipe from PNT3 to PNT2 (end to elbow)
3 = Pipe from PNT1 to PNT2 and from PNT3
to PNT2 (start to end)
S_RAD Starting radius
E_RAD Ending radius
C_RAD Curvature radius
N Number of sections in elbow (reducing elbow
only)
PNT1 (X1, Y1, Z1) Coordinates of starting point
PNT2 (X2, Y2, Z2) Coordinates of center of elbow
PNT3 (X3, Y3, Z3) Coordinates of ending point

Examples
PRIM('ELBOW', 3, 0.5, 0.75, 0.65, 3, 1, 2.5,0, 3, 0, 0, 2, -
3,0)

Isometric View

Top View

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 6-13
6 Parametric Modeling Primitives
Primitives

This figure has the same


definition as the first
figure, except that MASK=0,
and so on. No pipes are
connected to the elbow.

Isometric View

This figure has the same


definition as the first
figure, except that MASK=1,
and so on. The pipe lies
between the elbow and the
start of the primitive
(PNT 1).

Isometric View

This figure has the same


definition as the first
figure, except that N=6,
which creates greater
detail in the ELBOW bend
(6 sections instead of 3
sections as in the other
examples). MASK=2, and so
on. The pipe lies between
the elbow and the end of
the primitive (PNT 3).
Isometric View

6-14 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Parametric Modeling Primitives
ELLIPSE

ELLIPSE
Geometric Shape: Ellipse
Syntax
PRIM('ELLIPSE', PRIM, SECOND)

Where Means
PRIM One-half the primary (major) axis
length
SECOND One-half the secondary (minor) axis
length

Example
PRIM('ELLIPSE', 3, 2)

Top View

EPYRAM
Geometric Shape: Eccentric Truncated Pyramid (Snappable)

For the non-snappable primitive, see the DUCT_ECC_RED primitive.

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 6-15
6 Parametric Modeling Primitives
Primitives

Syntax
PRIM('EPYRAM', LX, LY, H, TX, TY, DX, DY)

Where Means
LX X Dimension of base
LY Y Dimension of base
H Height
TX X Dimension of top
TY Y Dimension of top
DX X-Offset of top
DY Y-Offset of top

Example
PRIM('EPYRAM', 2,2, 2.5, 1,1, 1,1)

Isometric View Top View

ETRCONE
Geometric shape: Eccentric Truncated Cone (Snappable)

For the non-snappable primitive, see the PIPE_ECC_RED primitive.

6-16 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Parametric Modeling Primitives
HEMISPH

Syntax
PRIM('ETRCONE', RAD, T_RAD, H, DX, DY)

Where Means
RAD Radius of base
T_RAD Radius of top
H Height
DX X-Offset of top
DY Y-Offset of top

Example
PRIM('ETRCONE', 1, 0.5, 2, 0.5, 0.5)

Top View Isometric View

HEMISPH
Geometric shape: Hemisphere

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 6-17
6 Parametric Modeling Primitives
Primitives

Syntax
PRIM('HEMISPH', RAD, H)

Where Means
RAD Radius of base
H Height

Example
PRIM('HEMISPH', 2, 2)

Isometric View

LINE
Geometric shape: Line
Syntax
PRIM('LINE', X1, Y1, Z1, X2, Y2, Z2)

Where Means
X1, Y1, Z1 Coordinates of the starting point of the line
(PNT 1)
X2, Y2, Z2 Coordinates of the ending point of the line
(PNT 2)

6-18 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Parametric Modeling Primitives
LINESTRING

Example
PRIM('LINE', 3, 1, 0, 0, 3, 1)

Isometric View

LINESTRING
Geometric shape: Line String
Syntax
PRIM('LINESTRING', n, X1, Y1, Z1, X2, Y2, Z2,... Xn,
Yn, Zn)

Where Means
n Number of points (maximum of 101)
X1, Y1, Z1 Coordinates of first point of linestring (PNT
1)
X2, Y2, Z2 Coordinates of second point of linestring
(PNT 2)
Xn, Yn, Zn Coordinates of nth point of linestring (PNT n)

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 6-19
6 Parametric Modeling Primitives
Primitives

Example
PRIM('LINESTRING', 4, 1, -1, 0, 3, 1, 0, 2, 3, 1, 1, 3, 1)

Isometric View

PIPE_ECC_RED
Geometric shape: Eccentric Pipe Reducer (Non-snappable)

For the snappable primitive, see the ETRCONE primitive.

Syntax
PRIM('PIPE_ECC_RED', RAD, T_RAD, H, DX, DY)

Where Means
RAD Radius of base
T_RAD Radius of top
H Height
DX X-Offset of top
DY Y-Offset of top

6-20 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Parametric Modeling Primitives
PIPE_ELB

Example
PRIM('PIPE_ECC_RED', 1, 0.5, 2, 0.5, 0.5)

Isometric View Top View

PIPE_ELB
Geometric shape: Pipe Elbow (Non-snappable)

For the snappable primitive, see the ELBOW primitive.

Syntax
PRIM('PIPE_ELB', MASK, S_RAD, E_RAD, C_RAD, N, PNT1,
PNT2, PNT3)

Where Means
MASK Valid values:
0 = No pipes connected to elbow
1 = Pipe from PNT1 to PNT2 (start to elbow)
2 = Pipe from PNT3 to PNT2 (end to elbow)
3 = Pipe from PNT1 to PNT2 and from PNT3 to
PNT2 (start to end)
S_RAD Starting radius
E_RAD Ending radius
C_RAD Curvature radius

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 6-21
6 Parametric Modeling Primitives
Primitives

Where Means
N Number of sections in elbow (reducing elbow
only)
PNT1 (X1, Y1, Z1) Coordinates of starting point
PNT2 (X2, Y2, Z2) Coordinates of center of elbow
PNT3 (X3, Y3, Z3) Coordinates of ending point

Examples
PRIM('PIPE_ELB', 3, 0.5, 0.75, 0.65, 3, 1, 2.5, 0, 3, 0, 0, 2,
-3, 0)

Isometric View Top View

6-22 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Parametric Modeling Primitives
PIPE_ELB

Examples (continued)

This figure has the same definition


as the first figure, except that
MASK=0, and so on. No pipes are
connected to the elbow.

Isometric View

This figure has the same definition


as the first figure, except that
MASK=1, and so on. The pipe lies
between the elbow and the start of
the primitive (PNT 1).

Isometric View

This figure has the same definition


as the first figure, except that N=6,
which creates greater detail in the
ELBOW bend (6 sections instead of
3 sections as in the other
examples). MASK=2, and so on. The
pipe lies between the elbow and the
end of the primitive (PNT 3).

Isometric View

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 6-23
6 Parametric Modeling Primitives
Primitives

PIPE_HUB
Geometric shape: Closed-End Pipe (Non-snappable)

For the snappable primitive, see the CYLL primitive.

Syntax
PRIM('PIPE_HUB', RAD, H)

Where Means
RAD Radius of base
H Height

Example
PRIM('PIPE_HUB', 1, 2)

Isometric View

PIPE_RED
Geometric shape: Concentric Pipe Reducer (Non-snappable)

For the snappable primitive, see the TRCONE primitive.

Syntax
PRIM('PIPE_RED', RAD, T_RAD, H)

Where Means
RAD Radius of base

6-24 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Parametric Modeling Primitives
PIPE_SEG

Where Means
T_RAD Radius of top
H Height

Example
PRIM('PIPE_RED', 1, 0.5, 2)

Isometric View

PIPE_SEG
Geometric shape: Open-End Pipe (Non-snappable)

For the snappable primitive, see the CYLL primitive.

Syntax
PRIM('PIPE_SEG', RAD, H)

Where Means
RAD Radius of base
H Height

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 6-25
6 Parametric Modeling Primitives
Primitives

Example
PRIM('PIPE_SEG', 1, 2)

Isometric View

POINT
Geometric shape: Point
Syntax
PRIM('POINT', X, Y, Z)

Where Means
X, Y, Z Coordinates of the point

Example
PRIM('POINT', 2, 1, 1)

Isometric View

POLYCP
Geometric shape: Polygonal Extrusion

6-26 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Parametric Modeling Primitives
POLYCP

Syntax
PRIM('POLYCP', n, H, X1, Y1, X2, Y2,... Xn, Yn)

Where Means
n Number of vertexes
H Height
X1, Y1 Coordinates of first vertex (PNT1)
X2, Y2 Coordinates of second vertex
(PNT2)
Xn, Yn Coordinates of nth vertex (PNTn)

W Do not specify Z coordinates when you define the vertexes. Design


Series automatically creates the base of the polygon in the Z=0 plane.

Example
PRIM('POLYCP', 5, 2, 1,2, 3, 1, 3, -1, -1, -2, -2, 1)

Isometric View

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 6-27
6 Parametric Modeling Primitives
Primitives

PYRAM
Geometric shape: Pyramid (Snappable)

For the non-snappable primitive, see the DUCT_RED primitive.

PRIM('PYRAM', LX, LY, H, TX, TY)

Where Means
LX X Dimension of base
LY Y Dimension of base
H Height
TX X Dimension of top
TY Y Dimension of top

Example
PRIM('PYRAM', 2, 2, 2.5, 1, 1)

Isometric View

RECTANGLE
Geometric shape: Rectangle

6-28 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Parametric Modeling Primitives
RECTELL

Syntax
PRIM('RECTANGLE', LX, LY)

Where Means
LX X Dimension
LY Y Dimension

Example
PRIM('RECTANGLE', 6, 4)

Top View

RECTELL
Geometric shape: Partial Annulus (Snappable)
Syntax
PRIM('RECTELL', W, H, R_RAD, SWEEP)

Where Means
W Width of the opening
H Height of the opening
R_RAD Radius of the elbow
SWEEP Sweep angle

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 6-29
6 Parametric Modeling Primitives
Primitives

Example
PRIM('RECTELL', 2, 1, 3, 45)

Isometric View Top View

RIGHT_PRYSM
Geometric shape: Regular Polygonal Extrusion
Syntax
PRIM('RIGHT_PRYSM', N, RADIUS, HEIGHT)

Where Means
N Number of vertexes as follows:
If N > 2, the expert system creates the inscribed polygon.
If N < -2, the expert system creates the circumscribed
polygon.
Note: N greater than -3 or less than 3 is an error.
RADIUS Radius
HEIGHT Height (thickness) of the prysm

Example
PRIM('RIGHT_PRYSM', 5, 6, .5) to create an inscribed pentagon
PRIM('RIGHT_PRYSM', -5, 6, .5) to create a circumscribed
pentagon

6-30 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Parametric Modeling Primitives
SEMI_PRYSM

Inscribed Right Prysm Circumscribed Right Prysm

SEMI_PRYSM
Geometric shape: Partial Regular Polygonal Extrusion
Syntax
PRIM('SEMI_PRYSM', N, M, RADIUS, HEIGHT)

Where Means
N Number of right polygon vertexes as follows:
If N > 2, the semi-prysm created will be based on an inscribed
polygon with vertexes.
If N < -2, the semi-prysm created will be based on a
circumscribed polygon with vertexes.
Note: N greater than -3 or less than 3 is an error.
M The number of semi-prysm vertexes is (M <= abs(N)).
RADIUS Radius
HEIGH Height (thickness) of the prysm
T

Example
PRIM('SEMI_PRYSM', 5, 3, 6, .5) to create an inscribed semi
prysm

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 6-31
6 Parametric Modeling Primitives
Primitives

PRIM('SEMI_PRYSM', -5, 4, 6, .5) to create a circumscribed


semi prysm

Inscribed Semi-Prysm Circumscribed Semi_Prysm

SHAPE
Geometric shape: Shape
Syntax
PRIM('SHAPE', n, X1, Y1, Z1, X2, Y2, Z2, Xn, Yn, Zn)

Where Means
n Number of vertexes
X1, Y1, Z1 Coordinates of first vertex
X2, Y2, Z2 Coordinates of second
vertex
Xn, Yn, Zn Coordinates of nth vertex

The shape primitive automatically creates the line segment between the first
and the last point to close the shape. The first and the last points in the
argument list should not be the same.

6-32 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Parametric Modeling Primitives
SQTORND

Example
PRIM('SHAPE', 5, 1, 1, 0, 1, -1, 1, 2, -1, 2, 3, -2, 0, 3, -
3, 3)

Isometric View

SQTORND
Geometric shape: Rectangular-to-Round Transition
Syntax
PRIM('SQTORND', LX, LY, H, PRIM, SECOND, DX, DY)

Where Means
LX X Dimension of base
LY Y Dimension of base
H Height
PRIM One-half the primary (major) axis length of top
SECOND One-half the secondary (minor) axis length of
top
DX X-Offset of top
DY Y-Offset of top

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 6-33
6 Parametric Modeling Primitives
Primitives

Example
PRIM('SQTORND', 6, 4, 2, 1, 0.5, 0.5, 0.5)

Isometric View Top View

TRCONE
Geometric shape: Truncated Cone (Snappable)

For the non-snappable primitive, see the PIPE_RED primitive.

Syntax
PRIM('TRCONE', RAD, T_RAD, H)

Where Means
RAD Radius of base
T_RAD Radius of top
H Height

6-34 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Parametric Modeling Primitives
TRCONE

Example
PRIM('TRCONE', 1, 0.5, 2)

Isometric View

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators 6-35
6-36 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
7 Flowcharting a Component Using
Parametric Rule Files

Understanding Rule Files


PlantSpace Piping, Cable Tray, and Conduit are driven by parametric rules. This
chapter discusses parametric rules at a very basic level. We step through the rules
used to place a pipe cap with a butt welded end condition.

Before you can understand rule files, you need to understand what a rule file is, what
defines a Design Series component, and how a component is placed inside Design
Series.

If you need to refresh your memory on the meaning of terms used in this
chapter, see the Glossary at the end of the PlantSpace Design Series Administrator
Guide.

What Is a Rule File?


Rules are sets of conditions or standards placed in a file. In expert systems, a rule is a
conditional statement that tells the system how to react to a particular situation.
Rules are called parametric rules when they can make adjustments based on the
values provided.

Because the adjustments can be made, potentially thousands of static information


(such as a cell definition) can be replaced by one set of rule files. Therefore, using
rule files is more efficient and less prone to error than using cell libraries.

What Is a Design Series Component?


A valid PlantSpace Design Series component has the following characteristics:

Is a MicroStation cell

April 23, 2004 PlantSpace Design Series Reference Guide for Administrators 7-1
7 Flowcharting a Component Using Parametric Rule Files
Understanding Rule Files

Design Series recognizes and groups all the pieces of a plant design
component (for example, a piping valve) by its association as a cell
in the design file.
Has a label
The type of component along with all of its attribute settings (for
example, valve number and piping system) are contained in a
MicroStation text element called the cell label. This information is
used in the modeling environment.
Has connect points
The component connect points are used in the modeling
environment to facilitate automatic alignment when placing
components. Some of the post-processing software uses the
connect points to analyze connectivity.

How Is a Design Series Component Created?


The process of creating a component involves the following stages:

1. The user selects an icon representing a component from a Design


Series modeling tool box.
2. The request for that component is sent through the MDL
command to AMS (ams.exe).
AMS is explained in Chapter 1 of the PlantSpace Design Series
Administrator Guide.
3. The CLASSES table in your project database specifies the rule used
to construct the component for each BUD_TYPE.
4. The rule text associated with the rule is loaded from the
EXPERT_RULES table.
5. AMS uses the built-in parser and expert system to apply the rule.
6. The rule requests the system to create the label.

How Is a Design Series Component Placed?


The process of placing a component involves the following stages:

7-2 PlantSpace Design Series Reference Guide for Administrators April 23, 2004
Flowcharting a Component Using Parametric Rule Files
How Is a Design Series Component Placed?

1. The attributes dialog box for the selected icon is displayed.


2. When the user clicks OK in the attributes dialog box, the rules
associated with that component are completed, which creates the
graphical representation.
3. The user places the component, orients it, and moves it to the
desired location.

The following graphics show how a cap is placed inside PlantSpace Design Series.

As you can see in the first graphic, the CLASSES table in the PlantSpace database
identifies the upper level rule file needed for that component.

April 23, 2004 PlantSpace Design Series Reference Guide for Administrators 7-3
7 Flowcharting a Component Using Parametric Rule Files
Understanding Rule Files

What Types of Parametric Rules Are Used?


Three types of parametric rules are used: upper level, second level, and sub.

Upper Level Rule

The Upper level rule is typically the first rule called and is listed in the CLASSES
table of the PlantSpace database. An upper level rule is any rule that uses the BUD
function to call another rule. An upper level rule can also be an MDL application.

Second Level Rule

The second level rule is always called by an upper level rule through the BUD
function. A second level rule can also be an upper level rule file as well if it uses the
BUD function to call another rule. Typically the second level rule is used to
determine what primitives are needed to graphically build the component.

7-4 PlantSpace Design Series Reference Guide for Administrators April 23, 2004
Flowcharting a Component Using Parametric Rule Files
What Does a Rule File Contain?

Sub Rule

The sub rule can be called by either the upper level or second level rule. A sub rule is
called using the SUB function. A sub rule is used to return data (for example, query
a database table). It does not determine what primitives are needed to graphically
build the component.

A sub rule that instances graphics is called by BUD, instead of SUB.

What Does a Rule File Contain?


A rule contains three basic components: variables, flags, and steps.

Variables

Variables are used in rules the same way that they are used in any other software
language. Variables can be defined as an integer, real, or character. A variable can be
defined two ways in a rule as explained in Style 1 and Style 2.

Style 1 Style 2
TEXT pl_type; (type) pl_type TEXT
REAL xlen; (type) xlen REAL

Either way of defining a variable in a rule is acceptable. Both ways can be used in the
same rule.

Flags

Flags are defined as an array in a rule. Flags are typically used to track the status of a
query to a database table for information and to display an error message if the
query fails. Flags are defined at the top of the rule and are defined as an integer. The
array length should be at least equal to the total number of flags used in the rule.

The following is an example of a flag used in a rule to query a database table:


(RULE) THEN flag[0] =
QUERY("SELECT tbl_name(tabName), col_name(colName)

FROM diameter_tables WHERE stndrd = '%a' and code =


'%a'", Rstndrd, code_num)

The above rule uses the QUERY function to select values for tbl_name and
col_name from the diameter_tables database table based on the values of stndrd and

April 23, 2004 PlantSpace Design Series Reference Guide for Administrators 7-5
7 Flowcharting a Component Using Parametric Rule Files
Understanding Rule Files

code. If the query is successful, FLAG[0] will be set to 1. If the query fails FLAG[0]
will be set to 0.

Steps

Steps are used to call STEP functions and are defined as an array in a rule. For a
complete list of user functions, refer to the Design Series Reference Guide for
Administrators delivered in release 7.1. Steps are defined at the top of the rule and
are defined as an integer. The array length should be at least equal to the total
number of steps used in the rule. The following is an example of a STEP function in
a rule used with a flag to display error message if a query fails:
(RULE) IF flag[0] = 0 THEN Step[1] =
CONTROL('ERR',TO_CHAR("Query error [DIAMETER_TABLES]
stndrd %s, code %s", Rstndrd, code_num ) )

The above rule looks at the value of flag[0]. If it is equal to 0, then step[1] uses the
CONTROL function to display an error message and step[1] will be set to 1.

How Does the System Execute a Rule File?


A rule can contain only IF-THEN statements. No IF-THEN-ELSE statements are
available. An IF-THEN-ELSE statement can be created by using a THEN
statement directly after an IF-THEN statement. The following is an example of an
IF-THEN-ELSE statement:
(RULE) IF variable_1 = 2 then variable_2 = 3
(RULE) THEN variable_2 = 4

The assignment of values to variables and the calculation of variables is initiated by


inference and not by the order of appearance in the code. The following is an
example of a calculation of a variable value:
(RULE) THEN f1 = bandDiameter - 0.0625_in
(RULE) THEN l1 = 0.6*(len1-bandLength)

(RULE) IF con1 = 'SK' THEN step[5] =


+ BUD('ENDPREP,,,PIPE', 'ANG',90,90,0, 'OFF', -
insetLength,0,0, 'LIST', label, con1, s_rat1,
diameter1, dia_1 )

+ PRIM('PIPE_SEG', 'SOLID', 'ANG',90,90,0, 'OFF', -


insetLength,0,0, 1.8*dia_1/2, len1 )

7-6 PlantSpace Design Series Reference Guide for Administrators April 23, 2004
Flowcharting a Component Using Parametric Rule Files
How Do You Step Through a Rule?

+ BUD('HEXAGON,,,PIPE', 'OFF', xlen-l1,0,0, 'LIST',


f1, l1 )

Values for f1 and l1 are not assigned until con1= SK and the BUD function calls the
HEXAGON rule and passes values for variables f1 and l1 to that rule.

Rules are processed in a STEP sequence, STEP[0] followed by STEP[1]. When all
STEPs have been set to a positive integer, processing is complete. If any of the
STEPs evaluate to 0, the expert system stops processing. Therefore, before the
expert system moves to the next STEP in a rule, the previous STEP must evaluate
to a positive integer.

In the example that follows, STEP [0] uses two functions, INHERIT and SUB.
When called, both of these functions return the value 1. Therefore, after these
functions are called, STEP[0] will have the value 2. Because Step[0] evaluates to a
positive integer, the expert system moves to the next step, STEP[1].

STEP [1] uses two functions, ADOPT and SUB. When called, both of these
functions return the value 1. When the ADOPT and SUB functions are called,
STEP 1[1] will have the value 2. Because STEP [1] evaluates to a positive integer, the
expert system moves to the next step, STEP[2].

The expert system continues in this manner until one of the steps does not evaluate
to a positive integer or the END statement is found.
(RULE) THEN step[0] = INHERIT('label,nomDiam,con1')
+ SUB('getStand,,,PIPE', 'LIST', label )

(RULE) THEN step[1] = ADOPT ( 'Rstndrd' )


+ SUB('getCode,,,PIPE', 'LIST', label )

How Do You Step Through a Rule?


In this section we look at the rules used to create a 6-inch pipe cap with a butt
welded end condition. The first rule called is CAP. This is the upper level rule and is

April 23, 2004 PlantSpace Design Series Reference Guide for Administrators 7-7
7 Flowcharting a Component Using Parametric Rule Files
Understanding Rule Files

identified in the CLASSES table of the Design Series database. The label
information for our pipe cap is shown in the attributes dialog box.

Service is set to ACD, Line No. is set to 123, Insulation Thickness is set to 0, Spec is
set to CS150, Standard is set to ANSI, Size 1 is set to 6, End Preparation 1 is set to
Butt Weld, and Schedule is set to 40.

The rule files called by AMS will use the data supplied from the label to create our
pipe cap. To create a 6-inch butt welded pipe cap, the following rules are called:

CAP GETCODE INSETLEN


GET_OD SYMB CONN1
GETSTAND CAP_END

In the following sections, we look at flowcharting of the:

Upper level rule CAP


Sub rule GET_OD
Second level rule CAP_END

7-8 PlantSpace Design Series Reference Guide for Administrators April 23, 2004
Flowcharting a Component Using Parametric Rule Files
Flowcharting the Upper Level Rule CAP

Flowcharting the Upper Level Rule CAP


The large gray arrows show the direction through the rule as it would apply to
our 6-inch butt welded pipe cap.

April 23, 2004 PlantSpace Design Series Reference Guide for Administrators 7-9
7 Flowcharting a Component Using Parametric Rule Files
Flowcharting the Upper Level Rule CAP

7-10 PlantSpace Design Series Reference Guide for Administrators April 23, 2004
Flowcharting a Component Using Parametric Rule Files
Flowcharting the Upper Level Rule CAP

April 23, 2004 PlantSpace Design Series Reference Guide for Administrators 7-11
7 Flowcharting a Component Using Parametric Rule Files
Flowcharting the Upper Level Rule CAP

7-12 PlantSpace Design Series Reference Guide for Administrators April 23, 2004
Flowcharting a Component Using Parametric Rule Files
Flowcharting the Sub Rule GET_OD

Flowcharting the Sub Rule GET_OD


The sub rule GET_OD is used by all pipe rules to determine the outside diameter
of the pipe component.

April 23, 2004 PlantSpace Design Series Reference Guide for Administrators 7-13
7 Flowcharting a Component Using Parametric Rule Files
Flowcharting the Sub Rule GET_OD

7-14 PlantSpace Design Series Reference Guide for Administrators April 23, 2004
Flowcharting a Component Using Parametric Rule Files
Flowcharting the Sub Rule GET_OD

April 23, 2004 PlantSpace Design Series Reference Guide for Administrators 7-15
7 Flowcharting a Component Using Parametric Rule Files
Flowcharting the Second Level Rule CAP_END

Flowcharting the Second Level Rule CAP_END


The CAP_END rule (the second level rule used by the CAP rule) determines what
primitives are needed to build the pipe cap component.

7-16 PlantSpace Design Series Reference Guide for Administrators April 23, 2004
Flowcharting a Component Using Parametric Rule Files
Flowcharting the Second Level Rule CAP_END

April 23, 2004 PlantSpace Design Series Reference Guide for Administrators 7-17
7 Flowcharting a Component Using Parametric Rule Files
Flowcharting the Second Level Rule CAP_END

7-18 PlantSpace Design Series Reference Guide for Administrators April 23, 2004
Flowcharting a Component Using Parametric Rule Files
Flowcharting the Second Level Rule CAP_END

April 23, 2004 PlantSpace Design Series Reference Guide for Administrators 7-19
7 Flowcharting a Component Using Parametric Rule Files
Summary

Summary
You should now have a basic understanding of the following key points.

A valid PlantSpace Design Series component has the following characteristics: is a


MicroStation cell, has a label, and has connect points.

Three types of parametric rules are used: upper level, second level, and sub.

Rules are processed in a STEP sequence, STEP[0] followed by STEP[1]. When all
STEPs have been set to a positive integer, processing is complete. If any of the
STEPs evaluate to 0, the expert system stops processing. Therefore, before the
expert system moves to the next STEP in a rule, the previous STEP must evaluate
to a positive integer.

7-20 PlantSpace Design Series Reference Guide for Administrators April 23, 2004
Index

A CIRCLELL Primitive 6-5


ABS Function 5-30 CLASSES Table 2-10
ABS_POINT Function 5-30 CLEAR Function 5-57
ACOS Function 5-31 CLMP.DAT 4-8
ADOPT Function 5-32 CNDT_SYMBOLGY.DAT 4-27
ARC Primitive 6-3 COLLECT Function 5-58
Array Types in functions 5-3 Comment Character 1-1
ASIN Function 5-32, 5-33 Components
ASSEMBL. See MOVE_COORD. Parameterized 3-13-32
ATTR_XXn Tables 2-8 Piping Components 3-7
ATTRC_XXn Tables 2-8 Raceways 3-6
ATTRCDEF Table 2-6 CON_CODE.DAT 4-34
ATTRCDEF Table with the ATTRDEFN Table 2-7 CONE Primitive 6-6
ATTRDEFN Table 2-5 Configuration Data for Your Project Database Tables
Attribute Definition Tables, layers of 2-4 4-14-35
Attribute Standards and Codes, tables relating to 2-22 Configuration Tables 2-12
ATTRIBUTE_INFO Function 5-33 CONTROL Function 5-59
AVLV.DAT 4-32 COS Function 5-63
Cosines, direction 5-18
cross product 5-13
B CUBE Primitive 6-7
Basic Unit of Design 2-10 CYLL Primitive 6-7
BLLW.DAT 4-6
BOLTS.DAT 4-7
BUD Function 5-36 D
BUDs 2-10 DELETE_COMP Function 5-63
BUILD_LABEL Function 5-41 Description Tables 2-15
Automatic Expansion of Description Names 2-
19
C DIAMETER.DAT 4-21
CAESAR2.DAT 4-22 DIATABLE.DAT 4-21
Cartesian coordinate 5-13 Dimensions 3-1
Catalog Tables 2-9 DRAIN.DAT (metric) 4-33
CELL Function 5-44 Drawings of Piping Components 3-7
CELL_DETAILS Function 5-47 Drawings of Raceway Components 3-6
CHANGE Function 5-53 DUCT_ECC_RED Primitive 6-8
CHAR$INT. See CHAR_TO_INT. DUCT_RED Primitive 6-9
CHAR_TO_INT Function 5-55, 5-56 DUCT_SEG Primitive 6-10
CIRCLE Primitive 6-3 DWV_DIA.DAT 4-21
CIRCLELB Primitive 6-4

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators IN-1
Index

E INHERIT Function 5-67


ECONE Primitive 6-11 Inline Pipe Components 3-8
ECYLL Primitive 6-12 INSERT_LABEL Function 5-68
ELBOW Primitive 6-12 INST.DAT 4-16
ELLIPSE Primitive 6-15 INSTALL.SCR 1-3
ENCODE$VALU. See NUM_TO_CHAR. INSULATION.DAT 4-22
End Preparations for all pipe components 3-31
END_RATG.DAT 4-10
ENDSURF Function 5-64
K
EPYRAM Primitive 6-15 Keyword/Value Pairs 1-1
EQNOMSIZ.DAT 4-19
Escape Character 1-1
L
ETRCONE Primitive 6-16
LABEL$VALU. See EXTRACT_VALUE.
Euler angles 5-13
LABEL$VALU2. See EXTRACT_VALUE2.
EVALUATE Function 5-64
LBEND.TYP.DAT 4-33
Expert System Rules, loading 5-38
LCND_CPL.DAT 4-35
EXPERT_RULES Table 2-21
LCND_DIA.DAT 4-34
EXTRACT. See STR_MID0.
LCND_ELS.DAT 4-34
EXTRACT_VALUE Function 5-65
LCNDLLP.DAT 4-34
EXTRACT_VALUE2 Function 5-66
LCNDLSP.DAT 4-34
LCNDLTP.DAT 4-35
F LEAD$CHARS. See LEAD_CHARS.
FERR.DAT 4-11 LEAD_CHARS Function 5-70
FILES.DAT 1-4 Line Continuation 1-2
FILES.SQL 1-4 LINE Primitive 6-18
FLEX.DAT 4-12 LINESTRING Primitive 6-19
FLG_ENDS.DAT 4-12 LOAD_VALUE Function 5-70
Flowcharting a Component Using Parametric Rule LOCAL_POINT Function 5-72
Files 7-1 LOCAL_PT. See LOCAL_POINT.
FLWMTR.DAT 4-13, 4-14, 4-15 LOG Function 5-72
Functions. See JSpace User Functions and Parametric LOG_FILE Function 5-73
Modeling Functions LPILBEND.DAT 4-16
FWLD.DAT 4-11 LPILCONN.DAT 4-16
LPILCREA.DAT 4-17
LPILGASK.DAT 4-16
G LPILRAD.DAT 4-17
Geometric Principles, introduction 5-13
GROUP_CODE Table 2-12
GROUP_USAGE Table 2-12
M
MANUFAC.DAT 4-9
MANUFACTURERS Table 2-23
H MATRIX Function 5-76
HEMISPH Primitive 6-17 Matrixes 5-14
MAX Function 5-82
MAX$VALU. See MAX.
I MESSAGE Function 5-82
IL_VALS.DAT 4-17 MIN Function 5-86

IN-2 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Index
N

MIN$VALU. See MIN. What Is a Rule File? 7-1


Modeling Tables PARSE_LABEL Function 5-89
Specification Tables 2-22 PBRN.DAT 4-7
Modeling tables 2-12-23 PBUS.DAT 4-7
MOVE_COORD Function 5-87 PCAP.DAT 4-20
PCPL.DAT 4-8
PELB.DAT 4-9
N PEND.DAT 4-9
NO_SCHED.DAT 4-9 PERD.DAT 4-24
NOM_OD.DAT 4-21 PERSONAL.INI 1-3
NUM_SEG.DAT 4-8 PFLG.DAT 4-12
NUM_TO_CHAR Function 5-88 PGKT.DAT 4-15
PGKT_THK.DAT 4-15
PICK_POINT Function 5-91
O PIDATTR.DAT 4-19
Offset 5-20 PINS.DAT 4-16
OFFSETS.DAT 4-25 Pipe Branches 3-13
OPER.DAT 4-33 Pipe Database Tables 4-6
Operators 3-24 Pipe Flanges and Clamps 3-17
ORNG.DAT 4-19 Pipe Reducers 3-22
PIPE.DAT 4-20
PIPE_ECC_RED Primitive 6-20
P PIPE_ELB Primitive 6-21
PADP.DAT 4-6 PIPE_HUB Primitive 6-24
PARAM$VALU. See EVALUATE. PIPE_RED Primitive 6-24
Parametric Modeling Functions 5-15-137 PIPE_SEG Primitive 6-25
Parametric Modeling Primitives 6-16-35 PIPE_SYMB Table 2-12
Parametric Rule Files PIPEPROP.DAT 4-22
Contents of a Rule File 7-5 PNFL.DAT 4-10
Creating a Design Series Component 7-2 PNOZ.DAT 4-11
Executing a Rule File 7-6 PNPL.DAT 4-18
Flags 7-5 POINT Primitive 6-26
Flowcharting a component using 7-1 POLYCP Primitive 6-26
Flowcharting the Second Level Rule CAP_END POPL.DAT 4-19
7-16 POUB.DAT 4-23
Flowcharting the Sub Rule GET_OD 7-13 POUS.DAT 4-23
Flowcharting the Upper Level Rule CAP 7-9 PPLG.DAT 4-22
Placing a Design Series Component 7-2 PRED.DAT 4-24
Second Level Rule 7-4 PRIM Function 5-92
Stepping Through a Rule 7-7 Primitives. See Parametric Modeling Primitives
Steps 7-6 PROJECT_CONFIG Table 2-14
Sub Rule 7-5 PROJECT_VOLUMES Table 2-15
Summary 7-20 PROMPT_VAL. See USER_INPUT.
Types of Parametric Rules Used 7-4 PSBN.DAT 4-25
Understanding 7-1 PSPL.DAT 4-26
Upper Level Rule 7-4 PSTR.DAT 4-26
Variables 7-5 PSWE.DAT 4-27
What Is a Design Series Component? 7-1 PSWG.DAT 4-26

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators IN-3
Index

PTAP.DAT 4-23 STR_EDIT Function 5-107


PTRP.DAT 4-28 STR_FIND Function 5-108
PUNI.DAT 4-29 STR_LENGTH Function 5-110
PVC_DIA.DAT 4-21 STR_MATCH Function 5-110
PVC_PEND.DAT 4-10 STR_MID0 Function 5-111
PVC_PTNO.DAT 4-20 STR_MID1 Function 5-112
PVLG.DAT 4-33 STR_REPLACE Function 5-113
PVLT.DAT 4-18 STREDT. See STR_EDIT.
PVLV.DAT 4-31 STRG$SIZE. See STR_LENGTH.
PVOP.DAT 4-30 STRING$EXT. See STR_MID1.
PYRAM Primitive 6-28 STRING$MATCH. See STR_MATCH.
STRING$REPLACE. See STR_REPLACE.
STRIP Function 5-114
Q STRNUM. See STR_FIND.
QUERY Function 5-95 STUBLEN.DAT 4-17
SUB Function 5-114
SURFACE Function 5-116
R SYMBOLGY.DAT 4-27
RBND.DAT 4-24 Syntax in function statements 5-1
RECTANGLE Primitive 6-28 Syntax Summaries, examples 5-7
RECTELL Primitive 6-29
REIHE Attribute, example 2-9
RELOCATE Function 5-97 T
REMOVE.SCR 1-3 Tables
REPLACE_LABEL Function 5-98 ATTR_XXn 2-8
RETURN Function 5-99 ATTRC_XXn 2-8
RIGHT_PRYSM Primitive 6-30 ATTRCDEF 2-6
Rotation 5-13 ATTRDEFN 2-5
Rule File Catalog Tables 2-9
Local and global coordinates 5-13 CLASSES 2-10
Sample format for programming 5-21 EXPERT_RULES 2-21
Run-Time Keyword Evaluation 1-2 GROUP_CODE 2-12
GROUP_USAGE 2-12
MANUFACTURERS 2-23
S Modeling 2-12-23
SDNF_DATA Function 5-100 Pipe Database Tables, layout of 4-6
SELECT_CELL Function 5-103 PIPE_SYMB 2-12
SEMI_PRYSM Primitive 6-31 PROJECT_CONFIG 2-14
SETUP.CFG 1-3 PROJECT_VOLUMES 2-15
SETUP.INI 1-3 Tables Relating to the Attribute Standards and
SHAPE Primitive 6-32 Codes 2-22
SIGL.DAT 4-25 USERS 2-12
SIN Function 5-106 TAN Function 5-118
Specification Tables 2-22 TANTAP.DAT 4-28
SQL Query Expression, basic 5-95 TCODE.DAT 4-35
SQTORND Primitive 6-33 Text Files
Storage Tables Features 1-1
PROJECT_VOLUMES Table 2-15 FILES.DAT 1-4

IN-4 PlantSpace Design Series Reference Guide for Administrators May 19, 2004
Index
U

FILES.SQL 1-4
INSTALL.SCR 1-3
PERSONAL.INI 1-3
REMOVE.SCR 1-3
Setting Up Design Series 1-11-4
SETUP.CFG 1-3
SETUP.INI 1-3
TEXT_LAB. See INSERT_LABEL.
THREADS.DAT 4-19
TIME Function 5-119
TO_CHAR Function 5-120
Tokens in functions 5-1
TRAY_SYMBOLGY.DAT 4-27
TRCONE Primitive 6-34

U
UNITS Function 5-122
UOR_LOCAL_POINT Function 5-124
UOR_LOCAL_PT. See UOR_LOCAL_POINT.
User Tables 2-12
USER_INPUT Function 5-125
USERS table 2-12

V
Valves 3-24
VECTOR Function 5-128
VLV_CODE.DAT 4-11

W
WALLTHK.DAT 4-33
WTRF_DIA.DAT 4-21
WTRH_DIA.DAT 4-21
WTRI_DIA.DAT 4-21
WTRP_DIA.DAT 4-21

May 19, 2004 PlantSpace Design Series Reference Guide for Administrators IN-5
IN-6 PlantSpace Design Series Reference Guide for Administrators May 19, 2004

Вам также может понравиться