SPF Admin Course - Modeling and Mapping PDF
SPF Admin Course - Modeling and Mapping PDF
Mapping
Course Guide
DSPF-TP-100014A
Copyright
Copyright © 2002 - 2010 Intergraph Corporation. All Rights Reserved.
Including software, file formats, and audiovisual displays; may be used pursuant to applicable software license
agreement; contains confidential and proprietary information of Intergraph and/or third parties which is protected by
copyright law, trade secret law, and international treaty, and may not be provided or otherwise made available
without proper authorization.
Trademarks
Intergraph, the Intergraph logo, SmartSketch, FrameWorks, SmartPlant, SmartPlant Foundation, SmartPlant P&ID,
SmartPlant Instrumentation and INtools are registered trademarks of Intergraph Corporation. Microsoft and
Windows are registered trademarks of Microsoft Corporation. Other brands and product names are trademarks of
their respective owners.
Table of Contents
Table of Contents - 2 SmartPlant Modeling and Mapping
SmartPlant Modeling and Mapping Table of Contents - 3
1. Overview of SmartPlant
SmartPlant supports the integration of engineering authoring tools, such as SmartPlant
P&ID, SmartPlant Electrical, SmartPlant 3D, SmartPlant Instrumentation, PDS, and
Aspen Basic Engineering. This integration addresses the flow of data as it moves from one
engineering application to another through its lifecycle.
At the center of SmartPlant is SmartPlant Foundation, which provides the repository for
data published by the authoring tools. SmartPlant components make the exchange of data
from the authoring tools to SmartPlant Foundation and back possible.
SPI
SPPID SP3D
SPF Data
Repository
SPMat
SPF is a "loose integration" solution that allows each software application to maintain its
own data model, independent of the SmartPlant Foundation data model. The benefit of
"loose integration" is the flexibility to add or remove applications for any desired
configuration of SPF.
Overview of SmartPlant
The design of today’s SmartPlant provides the following features:
Transfer of engineering data from one tool to another,
eliminating the manual reentry of data
Management of change resulting from ongoing engineering in
upstream applications
Accessibility of engineering information to other collaborators
without requiring the original engineering tools
Recording of change in data as it moves through the plant
lifecycle
Correlation of shared objects from multiple authoring tools.
For example, the full definition of a pump may come from
multiple disciplines (electrical, mechanical, and so on), and the
data comes from different authoring tools.
Support for engineering workflows, especially versioning,
© 2005. Intergraph Corp.
All Rights Reserved.
approval/release, and configuration control
SmartPlant Architecture
SmartPlant Enterprise is functionality built on top of the
SmartPlant Foundation database. Each tool that integrates
with SmartPlant supports:
The SmartPlant schema: A standard data definition
designed to facilitate the flow of engineering information
through its lifecycle. Each tool works with XML files that
are representations of this schema.
Commands to publish, retrieve, subscribe, unsubscribe
and compare between the engineering tool and
SmartPlant Foundation database.
An adapter that allows communication with SmartPlant.
Engineering tools Zyqad, SmartPlant P&ID, SmartPlant
Electrical, SmartPlant Instrumentation, and SmartPlant
3D, and PDS integrate with SmartPlant by providing an
© 2005. Intergraph Corp.
adapter.
All Rights Reserved.
1-6 Overview/Review of SmartPlant Integrated Engineering Architecture
The following graphic shows the architecture for SmartPlant. At the heart of the system is
SmartPlant Foundation (SPF). Each tool has an adapter (SmartPlant Adapter) that allows
for communication between the tool and the underlying SmartPlant Foundation database
and vault.
Authoring Tools
Aspen Basic Eng. SP P&ID SP Inst SP 3D SP Electrical SP Materials
Tool Tool Tool Tool
SmartPlant SmartPlant SmartPlant SmartPlant SmartPlant SmartPlant
DB PFD DB DB DB
Adapter Adapter Adapter Adapter Adapter Adapter
SmartPlant SmartPlant SmartPlant SmartPlant SmartPlant SmartPlant
Equipment Data Sheet
Client Client Client Client Client Client
Data
and/or
Picture
SPF
Vault
Document Data
Workflow
Management Management
SmartPlant Architecture
© 2008. Intergraph Corp.
All Rights Reserved.
Overview/Review of SmartPlant Integrated Engineering Architecture 1-7
SmartPlant Client
The SmartPlant Client provides the methods for
communication between the tool adapter and the
SmartPlant Foundation Server.
The SmartPlant Client serves three roles:
Communicates with SPF and returns the results of that
communication back to the tool adapter
Calls interface methods on the tool adapter to perform
functions associated with the integration process
Provides common user interface components that tools
may use to present a consistent UI across all SmartPlant-
enabled applications
Tool
SmartPlant Client SmartPlant
Database
Adapter
Computer 1 SmartPlant
Client
SmartPlant
Adapter Tool
SmartPlant
Database
Adapter
SmartPlant
Tool SmartPlant Client
Database Client
Computer 3
Computer 2
SmartPlant Foundation
The SmartPlant Client component work directly with a portion of the SmartPlant
Foundation software to share information. When a publish operation occurs, the
SmartPlant Foundation scheduler is responsible for loading the data from the published
XML files into the SPF database. The SmartPlant Foundation software is also responsible
for making sure that the files published from the authoring tool are placed in the
appropriate SPF vault.
SmartPlant Client
Computer 1 SmartPlant
Client
SmartPlant SmartPlant
Client Client
Computer 2 Computer 3
SmartPlant Foundation
Server
SPF
Database
SPF
Vault
© 2005. Intergraph Corp.
All Rights Reserved.
A different tool can then retrieve that same data for the next phase of design in the
engineering workflow.
Overview/Review of SmartPlant Integrated Engineering Architecture 1-11
SmartPlant Schema
The SmartPlant schema, effectively SPF data model,
model
provides the structure and semantics of the data that can be
published to, and retrieved from, the SPF data repository.
SmartPlant Foundation
Data Model =
Data Dictionary
© 2005. Intergraph Corp.
All Rights Reserved.
1-12 Overview/Review of SmartPlant Integrated Engineering Architecture
SmartPlant Schema
Models are used to convey the essence of what
you're talking about.
If you think about the problem of integrating data from a lot of different software
applications, you can understand how a "model" of the data that is being passed around
might be a good way to simplify the discussion of "how do I get that valve from a P&ID
(piping diagram) into my 3-D program?"
SmartPlant Schema
A "model of a valve" is not a valve, but it can expose many
aspects of a valve, e.g., its flow-rate, its weight, its inlet size,
etc.
Some other program may not care about any of that, and just
wants to talk about the height of the valve, or about who
carries the valve "in-stock", so that it can be ordered quickly.
SmartPlant Schema
Each SmartPlant Enterprise software program or "tool
tool" has
some conceptual model of a valve. When we say "tool", we're
talking about:
SmartPlant Foundation for total information management
for the life of your plant.
SmartPlant 3D our next generation, data-centric, rule-
driven engineering design solution.
SmartPlant Electrical an application designed by electrical
engineers for electrical engineers.
SmartPlant Instrumentation the industry-leading
instrumentation solution.
SmartPlant Schema
SmartPlant Enterprise tools (con
(con’’t)
SmartPlant P&ID for generating "intelligent" P&IDs and
management of related engineering data for use
throughout a plant's life.
SmartPlant Markup a precision viewing and markup tool.
SmartPlant Review for dynamically viewing 3D computer
models for in-depth review and analysis.
So how does the data about "this particular valve" get “shared” between tools? Make a
"model of a valve", and share the model between the tools!
SmartPlant Schema
A "data model" is an abstract representation of the
objects that software tools can share, use, and think
about.
SmartPlant Schema
The SmartPlant schema defines the structure of the
SmartPlant Foundation (SPF) database, and is used as the
neutral format through which authoring tools publish and
retrieve data, independent of their specific data model.
SmartPlant Schema
SmartPlant schema functions (con’t)
User-defined properties - Software applications provide
the means for users to specify user-defined variables.
Procedures must be established to assure that this data
is implemented in the SmartPlant schema.
Support for Units-of-Measure, to allow clear flow of data
regardless of the units specified.
Rules for evolving the schema, so changes to the
structure and semantics of the data can be made due to
new or changing requirements.
Specific support for engineering concepts such
addressing process data, relationships between
equipment and nozzles, and so on.
© 2005. Intergraph Corp.
All Rights Reserved.
1-16 Overview/Review of SmartPlant Integrated Engineering Architecture
SmartPlant Schema
The SmartPlant schema is actually divided into two schemas:
SPF / Authoring Schema
Consists of many xml files, dividing the schema information
according to the applicable layer/container
Managed in the Schema Editor tool using a configuration
(cfg) file
Integrated Schema
Managed in the Schema Editor as a CMF file that is stored in,
and accessed through, SmartPlant Foundation
Allows you to manage multiple versions of the schema to
support forward/backward compatibility with authoring tools
The files used for managing the Authoring schema are stored in the installation folder
(..\SmartPlant\Foundation \2009\Models). Inside the Models directory, multiple folders
separate xml files according to the layer of the data in that file. These xml files can be
managed individually, or using configuration (cfg) files to group multiple xml file
together. You may open the cfg files and xml files directly from within the Schema Editor
application.
SmartPlant Schema
The SmartPlant
schema for
Authoring is
divided into a
number of XML
files, for each
layer/container
containing objects
or data.
Make changes and
extensions to these
files for objects that
will be part of SPF,
but not published
in an integrated
environment.
© 2005. Intergraph Corp.
All Rights Reserved.
1-18 Overview/Review of SmartPlant Integrated Engineering Architecture
The integration schema file is managed with a CMF file. This CMF allows you to manage
changes to multiple versions of the SmartPlant schema.
As of SPF version 2008, SPF is compatible with authoring tools versions 2007 SP4 or
later. For that reason, you will need to have multiple versions of the schema. For example,
if your integrated environment includes one or more version 2007 authoring tools, you
will need to have the SPF schema for versoin 2007 for mapping, but SmartPlant
Foundation version 2009 itself uses the 2008 version of the SmartPlant schema. You will
need to have both on your SPF server. Using the CMF, file you can write changes to
multiple versions of the schema at once.
The CMF file is managed by SmartPlant Foundation. To make changes to that file, you
will need to check out the file and (initially, at least) launch it from the SmartPlant
Foundation application.
SmartPlant Schema
Because SmartPlant is intended to facilitate data exchange
from multiple engineering tools, the following rules apply to
the Integration schema:
All schema data (data definitions) is defined as part of the
SmartPlant schema (CMF file)
The SmartPlant schema describes everything that goes on
in SmartPlant
A copy of the SmartPlant schema resides on the server(s)
Component schemas are selective extracts from the
SmartPlant schema, and reside on every client
All changes are made to the SmartPlant schema and then
propagated to the component schemas
SmartPlant Schema
Both the Authoring and Integrated SmartPlant schemas store
the following types of schema objects to define data.
SmartPlant Schema
The building blocks of the schema are classes, interfaces, and relationships. Classes are
typically real world objects like instruments, tanks (vessels) or pipe runs.
Overview/Review of SmartPlant Integrated Engineering Architecture 1-21
Class Definitions
Class definitions define physical or logical types of object
data.
SmartPlant Schema
A ClassDef is the SmartPlant schema element that will eventually become something
important in the data that is “published” and “retrieved” from your software tool.
To be more precise, a ClassDef can represent physical things, such as pumps, or
conceptual things, such as projects. Instances of classes become “objects” within a
container (XML) that gets published by a software program, during the “publish” process.
For example, an instance of a class that was defined as a ClassDef named ELEWire can
be published, and is expected to contain data that is the electrical system’s idea about a
wire.
1-22 Overview/Review of SmartPlant Integrated Engineering Architecture
The ClassDef also acts as a container to group a set of properties or characteristics that is
used to describe the object class.
Class Definitions
Class definitions contain a set of properties (attributes) that
describes the class.
SmartPlant Schema
Properties
In the schema, class definitions are a named description of a set of objects that support or
realize the same interface definitions and share the same property definitions and
relationships.
Class definitions realize interface definitions. For example, the EQDProcessVessel class
definition realizes the IProcessVessel interface definition. The IProcessVessel interface
definition exposes property definitions, such as ProcessVesselNormalLiquidVolume.
Overview/Review of SmartPlant Integrated Engineering Architecture 1-23
Property Definitions
If a Valve could talk, this is what it would say:
My inlet side is an 8" opening. My I perform the function of controlling
outlet is on the other side, and offset fluid flow in, e.g., a fluid system of
2", it is also an 8" opening.
some kind.
I'm a valve.
Property Definitions (PropertyDef’s) are used to provide identification and naming of all
object classes. PropertyDef’s allow you to describe the class with respect to its position in
the hierarchy and provide inheritance of information to other classes. All property
definitions for a class are exposed through interface definitions and never directly by the
class.
1-24 Overview/Review of SmartPlant Integrated Engineering Architecture
Property Definitions
A property is a characteristic or attribute used to describe a
class.
SmartPlant Schema
The property definitions that apply to a particular interface definition are defined by the
Exposes relationship between objects of type InterfaceDef and objects of type
PropertyDef.
For example, the IDocument interface definition exposes the following property
definitions:
DocCategory
DocSubType
DocTitle
DocType
These specific properties are a set of attributes that are always used together on an object
to describe the role an object can play – the role of being a document.
Property information can be used to determine the property type or, in other words, the
possible values for that property definition. Standard schema property types include
Boolean, integer, double, and string.
Property definitions of the enumerated property type (picklist) have a list of possible
string property values defined for them. A property definition of this type must match an
entry in the list of enumerated property values defined for the property type.
Overview/Review of SmartPlant Integrated Engineering Architecture 1-25
Interface Definitions
Microsoft has been a leading proponent of the "role-based"
view of objects, and they implement this by using an artifact
called an interface.
interface
Interface
= a Role
Interfaces are just convenient "places" to group the tightly-bound properties of a role:
A role is something that an object yields up to the universe, i.e., "I am a driver,
here is my 'driver-ness'."
A role consists of closely-related properties, such as driver's license number,
expiration date, restrictions, picture.
Properties that you purposefully keep together, such as on a driver's license, in
your wallet, in your purse, in your car.
Because a role makes data retrieval easier, and less ambiguous.
If you want to get more technical - an interface could be thought of as a named table of
property definitions that are role-based.
Thus an interface definition is a named collection of property definitions. Interface
definitions expose the property definitions for class definitions. Each interface definition
represents a "role" for a class definition.
1-26 Overview/Review of SmartPlant Integrated Engineering Architecture
Interface Definitions
Interface definitions define different roles (functions) for a
class definition.
SmartPlant Schema
By sharing specific interface definitions, class definitions can also share property
definitions, but not the data associated with the properties.
Interface Definitions
Classes can share interfaces/roles in the SmartPlant Schema.
SmartPlant Schema
Different class definitions can share the same interface definitions, and therefore, the same
role. For example, every class definition in the schema shares the IObject interface,
which means that every class definition in the schema has the role of an object. When a
class definition has this role, it has an object name, an object description, an object
identifier, and any other property definitions exposed by the IObject interface.
1-28 Overview/Review of SmartPlant Integrated Engineering Architecture
1.2.6 Relationships
Relationships are associations between interface definitions in the schema. They identify
two specific objects that are related by a specific relationship type. The relationship type
identifies the interface definitions on the two objects that fulfill the roles associated with
the relationship type.
Relationships
Relationships are associations between interface definitions in
the schema.
SmartPlant Schema
The relationship type also identifies the roles defined at both ends of the relationship. In
the schema, relationship definitions are defined between interface definitions, not between
class definitions. A relationship can only exist between objects that support (realize) the
interface definitions at each end of the relationship definition.
Overview/Review of SmartPlant Integrated Engineering Architecture 1-29
SmartPlant Schema
The SmartPlant schema contains definitions for all authoring
tool components relevant to SmartPlant.
ABE
SPPID SmartPlant Schema
PIDComponent
EquipDataSheetComponent
PFDComponent
ControlSystemComponent SP3D
SPInst DimensionalDataSheetComp
InstrumentIndexComponent
P3DComponent
ELEComponent
PDSComponent
DocVersionComponent
SPElec EQLComponent PDS
ProcessDataComponent
GenericDocumentComponent
WBSComponent
IMLComponent
© 2005. Intergraph Corp. PBSComponent
All Rights Reserved.
The SmartPlant schema will then encompass the items and relationships for all the
authoring tools in order to facilitate the transfer of information from one tool to another.
This helps reduce the need to recreate data from one tool to the next.
The following defines the component schemas that encompass SPF:
PBS stands for Plant Breakdown Structure. Plant breakdown is created in SPF
and retrieved into the tools to create an identical structure.
WBS stands for Work Breakdown Structure, and like PBS, the objects are
created and published in SPF and retrieved by the tools.
1-30 Overview/Review of SmartPlant Integrated Engineering Architecture
A tool schema file, also known as a map file or a tool map file, describes the structure of
data as it is defined in the authoring tool database and how the authoring tool classes and
properties map into and out of the SmartPlant schema.
Some authoring tools, such as SmartPlant P&ID, will have one tool schema XML file
while other applications such as Aspen Basic Engineering has several tool schemas;
eqdmap.xml, pbsmap.xml, pfdmap.xml, pidmap.xml, and wbsmap.xml.
Schema Mapping
Every class in the tool schema that is to be published to
SmartPlant maps to a class, property, or picklist in the EF
Schema.
SmartPlant Schema
ClassToMapClass SPPIDDataMap.xml
Map Properties
Properties
MapPropertyToProperty
Map Picklists
Picklists MapPropertyMapEnumList
Map UOM’s
UOM’s
Integration with SmartPlant is done in a modular fashion with minimal impact to the
application itself. Each authoring tool delivers an adapter that supports the key
functionality to publish and retrieve data to SmartPlant. For tools that support
configurable mapping, a map must be defined between the applications internal data
structures and the SmartPlant schema. The Schema Component can be used to help
generate the necessary XML files to exchange data and assist with many of the integration
operations.
Overview/Review of SmartPlant Integrated Engineering Architecture 1-33
Mapping is not required, because there is some hard coding done in the tool adapter so
that the adapter can publish default data. However, without mapping, data retrieval can be
a big problem. If mapping is done correctly, a tool will be able to retrieve data from other
tools.
Tool Schemas
P&ID SPInst
Retrieve
ConstructionStatus ConstructionStatus
InsulationSpec
Retrieve
SmartPlant Schema
Publish
ConstructionStatus
ConstructionStatus
InsulSpec
Mapping Mapping
SmartPlant Schema
Software developers can also use the Schema Editor to modify schemas, tool schemas,
and data files. However, you cannot edit objects and relationships in the meta schema.
1-36 Overview/Review of SmartPlant Integrated Engineering Architecture
Set your open browser to the folder path specified by your instructor. Write down the path
here________________________________________________________.
In the future, this session will be at the top of a list of recent VM Session, for faster
access.
When you have finished with your hands-on exercises at the end of each day, please shut
down your VM session to free up memory in your native machine in preparation for the
next day.
You will be prompted for an option when powering off the virtual machine.
This will keep all of your work just as you left it from that day.
You will only revert to the snapshot on the last day of class when you shut down for the
last time. Using the revert option will cause you to lose all of your work from the week.
Over the following chapters, we will use both user interfaces, and you may choose which
ever you are more confortable with for regular use. Both user interfaces support all the
same functions.
This interface includes such features as viewing and modifying the schema and defining
mapping between authoring tools.
Using the Schema Editor 2-5
To see the Schema Editor in action, we must first open a file to navigate. Click the button
beside the Startup file field.
Browse to the XML, CFG, CMF, or session file to open. In the illustration below, we are
opening the D:\Program Files\SmartPlant\Foundation\2009\Models\Core folder.
A configuration file (CFG) can open multiple schemas at once and sets the active file.
2-6 Using the Schema Editor
The Active tab allows you to view a list of the open files, as well as change the active
schema or open additional files.
The 900-AllCore,cfg file is the delivered schema configuration containing all of the
SmartPlant Foundation definitions. Extension schemas are used to add additional
definitions to the base SmartPlant Foundation definitions in SCHEMA_BootStrap.xml.
Meta
Schema file Schema file
Another Schema
There were many attempts during the last 20 years to arrive at a "common" understanding
of how to represent ideas on a diagram. UML won the war because it is so easy to use,
and is extensible (for new ideas that might come along at any time).
In the Schema Editor, you can view any schema in .XML format. The many different
schema views in the Schema Editor provide different types of information that help you
understand how the schema works. For example, when you view the schema in any of the
tree views (except the schema tree/UML view and the schema hierarchy views) you can
typically see the schema class definitions.
As you expand nodes in the tree views, you can navigate the relationships in the schema
and view interface definitions, property definitions, and even instances of the class if
you also have a data file open in the Schema Editor.
The Schema Editor also provides graphical views of the schema. These views allow you
to see both static and dynamic UML diagrams containing the classes, relationships,
interfaces, and properties defined in the schema.
Using the Schema Editor 2-9
There are many other ways to view the schema in the Schema Editor depending on what
aspect of the schema that you want to understand.
Shown below are some short explanations for the tabs visible in the Standard Workflows
window:
Active Tab
The Active tab allows you to select a startup file and view related files. You can also open
tool schema files, connect to SmartPlant Foundation for mapping, and synchronize tool
map schemas and tool metadata for tools with metadata adapters. You can also change the
active schema and open tool schemas from the Active tab.
Schema Tab
The Schema tab allows you to search the active schema for specific objects or browse the
schema in the tree view. When you select an object in the tree view, information for that
object is displayed on the active tab on the right side of the window.
Tool Schema Tab
The Tool Schema tab allows you to search the active tool schema for specific objects or
browse the schema in the tree view. When you select an object in the tree view,
information for that object is displayed on the active tab on the right side of the window.
Using the Schema Editor 2-11
Mapping Tab
The Mapping tab allows you to view loaded tool map schemas, expand them, and select
tool map schema objects for which you want to define mapping.
Schema Editor toolbars provide easy access to the most commonly used commands. You
can move the toolbars around in the Schema Editor window and dock them wherever you
want. For descriptions of the commands on the Schema Editor toolbars, see the
SmartPlant Schema Editor User's Guide delivered with the documentation.
Command buttons on the Schema Editor vertical tabs allow you to identify commands
easily with icons.
Note: For more details on the Standard Workflow window, see the
SmartPlant Schema Editor User's Guide (DSPF1-PE-200008I-
Updated)
Horizontal tabs across the top of the Standard Workflows window provide easy access to
different views of schema, tool schema, and mapping. To change the view, click a tab.
The context of the tabs change depending on your selections on the vertical tabs on the
left of the Standard Workflows window, and the selection from the Tree in the Schema
tab.
The MultiTab Options dialog box will appear. This dialog box will allow you to
add/remove more views to/from the list of horizontal tabs.
The first example, the tree view, is useful for general navigation through relationships, but
not for looking at property values.
2-14 Using the Schema Editor
The Schema Tree window will be displayed. You can navigate all the relationships
defined in the schema using the Schema Tree view.
Expand the ClassDef node to see a list of the class definition objects that met your search
criteria.
In the tree, objects that are colored black are standard objects while those in blue are
special (multiple relationships) and are limited.
Use the open button beside the SmartPlant Schema file field to open the
PIDComponnt.xml schema file.
The reason for starting with the PIDComponent.xml file is that it is a smaller version of
the “master” SmartPlant schema file, EFSchema.xml. The PIDComponent.xml contains
all of the same object types as the master schema, ClassDefs, InterfaceDefs, PropertyDefs,
RelDefs, and so forth. However, instead of all application definitions, only those specific
to SmartPlant P&ID will be shown. Therefore, there will be fewer objects to scroll
through in the tree.
Also, if a definition is accidentally deleted, the PIDComponent.xml schema file is easy to
re-create.
Click on the Properties tab and the Schema Tree/Properties view is displayed.
There are two types of tables that you can choose from: vertical and horizontal. The
vertical table displays row headers along the left side of the table and data in vertical
columns.
The horizontal table displays column headers across the top of the table, with the data
displayed in horizontal rows. In the following example, a horizontal table is display is
used.
In the table view, bold text is used in class definitions and interface definitions to identify
required entries. Bold interfaces in the table view indicate that the interface is required for
the associated class.
Properties that appear in bold text in the table view are required for the associated
interface.
2-22 Using the Schema Editor
Bold property types in the table view indicate that the value for the property cannot be
null.
Bold text in the tree view represents relationship edges. Relationship edges define paths
that go from one point to another point in the data without traversing the entire tree.
Using the Schema Editor 2-23
The Tree/Editable UML View displays a tree view on the left of the drag-and-drop UML
pane.
You can select items from the tree view to display in the UML view by dragging the
objects from the tree view to the UML view.
Using the Schema Editor 2-25
When you drag and drop an object to the UML view, you will be prompted to create either
a custom UML view or a default view. An example of creating a custom UML view will
be demonstrated later.
In the resulting UML view, you can view the realizes relationships between the selected
objects and the relationship ends for each one.
Use the right mouse button menu to clear the UML view back to a blank view.
Interface Relationships
There are two kinds of relationships that can exist between
InterfaceDef’s.
RelDef
(Relationship Definition) User Defined
Implies
(Relationship (Default))
System Defined
Both RelDef’s and Implied relationships can be used for object navigation or browsing,
but RelDef’s provide for more browsing control. This will be discussed in more detail in
chapter 5.
Interface Relationships
Each relationship has 2 ends, End 1 and End 2.
RelDef
(Relationship Definition) User Defined
Implies
(Relationship (Default)) Object navigation (browsing)
uses relationships.
System Defined
Forward +
End 1 End 2
Reverse -
End 1 End 2
© 2005. Intergraph Corp.
All Rights Reserved.
Interface Relationships
Each relationship has 2 ends, End 1 and End 2.
RelDef
(Relationship Definition) User Defined
One of the primary functions of the Implies relationship is to allow an interface to inherit
properties and relationships from an associated interface. For example, the interface
IElecPowerConsumer exposes a property called AverageActiveLoad.
Interface Relationships
There are two kinds of relationships that can exist between
InterfaceDef’s.
RelDef
(Relationship Definition) User Defined
Implies
(Relationship (Default))
System Defined
The property AverageActiveLoad will display as one of the Properties For Role for the
interface IInstrument.
Interface Relationships
There are two kinds of relationships that can exist between
InterfaceDef’s.
RelDef
(Relationship Definition) User Defined
Implies
(Relationship (Default))
System Defined
Interface Relationships
There are two kinds of relationships that can exist between
InterfaceDef’s.
RelDef
(Relationship Definition) User Defined
erty
Prop
Implies
Is
lied
Imp (Default))
(Relationship
System Defined
To view the UML for an object, click the object in the tree view.
You can use the Tree/Viewable UML view to see details of any related edges.
To create a new object in the Editor view, drag the object type from the Create tree to the
UML view.
When you drag an object type to the UML view, the New dialog box for that object type
appears. Only those objects that have New dialog boxes defined for them in the Schema
Editor appear in the Create tree.
First, clear the current selection, then choose the new type of schema objects you want to
search for.
Under Match object names and descriptions, type text you want to include and exclude
from your search. The “*” character can be used to perform wildcard searches.
The following defines the fields used the Find dialog box:
Click Find to search for objects matching your criteria in the active file.
Search results appear in a tree view under the search criteria. Nodes are organized
by the type of results, such as ClassDef and InterfaceDef.
Select an object in the tree view to view more information about that object on the
tabs in the right pane. To switch between tabs, click the tab name at the top of the
Standard Workflows window.
Using the Schema Editor 2-41
The tree displays the results of the search. Expand nodes in the tree to see related edges.
Click on the ClassDef heading to expand the tree contents in the right pane.
2-42 Using the Schema Editor
Use the Search classes list button to select a new class of object to search.
In this example, the search is limited to the RelDef object class and any name that
contains the phrase doc.
The tree will display the search results. Again, expand nodes in the tree to see related
edges.
The tree will initially display the results of the find operation.
A Schema Editor dialog window will display to allow you to save a session file. For now,
we will not save sesson files, but they will be covered in depth in later chapters.
In the following example, the relationship between Instruments and Signal Ports as
defined in the schema, will be displayed graphically using UML.
Using the Schema Editor 2-51
Switch to the Schema tab after the EFSchema.xml has been opened.
Once the schema has been opened, select the viewing format using the tabs across the top
of the window.
The Schema Editor dialog box appears. Click No to create a customized UML view.
1
2
The following defines the fields used in the New UML View Definition dialog box:
UML view name – Specifies the name for the new custom UML view. This is a
required field.
UML view description – This is an optional field used to give the new view a
description.
Package – Use the browse button beside this field to select an existing package in
which to store the UML view. You can also create a new package to use in storing
your custom UML view.
Using the Schema Editor 2-55
The new package appears in the Possible PackageForUMLViewDef Values dialog box
and is automatically highlighted.
In the New UML View Definition dialog box, the new package name appears in the
Package field.
Expand the PIDInstrument ClassDef, and click the + next to Realized Interface
Definitions to see the related objects.
1
Expand the RelDefs For
Role to see the related
objects.
2
© 2005. Intergraph Corp.
All Rights Reserved.
Expand nodes in the tree then select the object then drag/drop them into the UML view.
By dragging and dropping objects from the tree, you are able to define your custom UML
view objects and their relationships.
The selected object is added to the diagram along with any RelDefs defined between it
and any other interfaces on the diagram.
Note that you are building your own custom UML view diagram.
This operation will change the selected object display from a rectangle to a circle.
To select multiple
objects, click on
object, and then,
pressing the
Control key, select
additional objects.
Selected item will
appear as light
blue.
© 2005. Intergraph Corp.
All Rights Reserved.
Using the Schema Editor 2-65
Place Text
Right-click in any white space in the view, and choose the
Place Text command from the shortcut menu.
Place Text
Enter the desired text, and specify any additional
parameters, such as text alignment. Click the Font button
to access an additional dialog for font settings.
The Place Text dialog box allows you to set the font color and alignment (left, center or
right). Click the Font button to set the font parameters.
Place Text
Select a Font, Font Style, Size and Color, and then click OK.
Note the approximation of the font display at the bottom of the Text dialog box.
2-68 Using the Schema Editor
Place Text
Once the parameters are set, click OK to return to the UML
view.
Place Text
Click and hold the
left mouse button
to drag the text to
the appropriate
location.
Place Text
Position the text in the desired location, and release the
mouse button to place it.
In order to show an example of using the Schema Editor in a different mode, use the exit
command.
Open Package
Click the open SmartPlant schema file button to open a
different schema file.
Open Package
Open the Schema tab to view the base class tree and
search options.
Next, switch from the Standard Workflows display to the Overall Workflows dialog.
Open Package
From the menu, click Workflows > Overall Workflows.
Make sure the Schema tab is selected when the Workflows dialog displays.
Open Package
In the Workflows dialog box, click the View button beside
the Schema File button to view the open schema file.
Open Package
To select a view option, click the Options button at the
bottom left of the View Schema dialog box.
In order to see the saved packages and views, use the Tree/Editable UML view option.
Open Package
Choose the Tree/Editable UML option on the Options
dialog box, and click OK to open that view.
You will be taken from the Options dialog back to the View Schema dialog.
You will be looking for any of the custom UML packages/views that you have defined.
Open Package
Select CustInstPkg from the Package list box at the top left
of the UML pane.
Open Package
Select CustInstrumentView from the UML View list box at
the top right of the UML pane.
Open Package
The view changes to the saved PID Instrument View.
View
Erase View
Click and hold
the left mouse
button while
dragging the
mouse diagonally
to draw a fence
and to select all
the objects with
the area. 1
All of the objects completely inside of the dynamic rectangle will be selected.
Erase View
Right-click a highlighted object in the view, and then click
Erase on the shortcut menu.
The selected objects will be erased but will remain in the schema.
Erase View
The selected objects and any relationships associated with
them are removed from the view.
Note: You can also clear the view by right-clicking in the background of the view and
clicking New UML view definition on the shortcut menu.
Using the Schema Editor 2-79
You will be prompted whether or not to save any changes that has been made to the
extension schema.
A Schema Editor window will allow you to save the session to a file. We will not save the
session file at this time.
Excel Spreadsheet
Tag Prefix
Tag Sequence Number
Tag Suffix
Maximum Pressure
Maximum Temperature
When extending the delivered schema structure, it is recommended that any site specific
extensions be made in an “extension” schema.
This is done to make it easier to carry site specific extensions forward when you upgrade
your SmartPlant Enterprise system. In future releases, just change the configuration of the
extension schema file with your custom model extensions to use the new version of the
EFSchema.xml file.
2-84 Using the Schema Editor
Call the new file EISchema, and place it in the same following folder: D:\Program
Files\SmartPlant\Foundation\2009\Models\Core.
Once you have created the new schema file, close the Schema Editor. We will be opening
a number of files, and they must be opened in the correct order. If prompted, save the
changes to the EISchema file.
Once the Schema Editor has closed, re-open it as before, in the standard mode. Then click
the button beside the Startup file field.
Next, click the button beside the Open schema files section to open another schema file.
Once you have opened the necessary files, you need to create a configuration file that will
open all these files and make the EISchema both editable and the active schema.
First, make sure that only the EISchema has a Yes in the Editable column. That file is the
only one that you should make any changes to.
Next, set your dependencies. The EISchema file is dependent on all the others in the list.
Finally, make sure that the EISchema file is selected in the Active schema file field. This
selection will tell the system that any new objects should be placed in the EISchema file.
Save the new configuration file. We don’t want to change the 900-AllCore configuration
file, so we will create a new one for our purposes.
Name the new configuration file 904-EISchema.cfg and save it into the same directory as
the 900-AllCore.cfg.
Do not save the session file at this time. The cfg file we just created will open all the files
we will need to perform our activities.
Data
The meta schema classes do not directly describe the data that is part of the schema (the
SmartPlant schema describes the data). Instead, these classes describe the classes in the
schema. The meta schema defines the rules of the schema and is the code behind the
schema.
For example, all classes in the schema are instances of the ClassDef class in the meta
schema. Similarly, all relationship definitions in the schema are of class RelDef, which is
part of the meta schema.
The meta schema also describes itself. All classes in the meta schema are also of the class
ClassDef, which is defined as part of the meta schema.
3-4 Schema Overview and Modeling New Classes
More information on the meta schema classes will be discussed in the following sections
of this chapter.
Schema Overview and Modeling New Classes 3-5
Model Definitions
A model definition (ModelDef)
is the schema information <<ModelDef>>
PlannedMaterialModel
used to describe the model.
The primary function of a
ModelDef is to identify those <<ModelClass>> <<ModelClass>>
objects that can be shared
through a ModelClass <<ClassDef>> <<ClassDef>>
PIDInstrument INDXInstrument
relationship.
Objects can only be shared if <<ModelClass>>
they exist within the same
ModelDef. Objects in different <<ClassDef>>
PIDProcessEquipment
ModelDefs can be related, but
cannot be shared.
The only use for the ModelDef currently is to enforce a rule that ClassDefs must be in the
same ModelDef to participate in a Sharing relationship.
3-6 Schema Overview and Modeling New Classes
Model Definitions
ModelDefs define domains of data. There are seven
ModelDefs in the SmartPlant schema:
MetaModel
OrganizationModel
WorkBreakdownModel
FacilityModel
PlannedMaterialModel
TypicalMaterialModel
ActualMaterialModel
MetaModel - Used only by the ClassDefs in the meta-schema. You should never use this
model for Schema.
OrganizationModel - Like the name implies, this is intended for ClassDefs that are
organizational concepts. Examples would be User, Company, Department, Manufacturer,
Vendor, etc.
WorkBreakdownModel - For ClassDefs that provide organizations of work. This
includes the ClassDefs that you see in the WBS documents, such as Project and Contract,
as well as all the document ClassDefs defined in the schema.
FacilityModel - For ClassDefs that represent abstract concepts in a process plant.
Examples include Plant, Area, Unit, System, Discipline (although you might put
Discipline in the OrganizationModel instead.)
PlannedMaterialModel - For ClassDefs that represent real objects that you plan to
purchase to construct your design. This is the “design” arena in which engineering tools
like Zyqad, SPPID, and SmartPlant Instrumentation work. In a traditional SPF Model, this
would be the “tag”.
TypicalMaterialModel - For ClassDefs that represent real objects offered by
manufacturers or vendors. When an engineer goes looking for something to fulfill the
requirements of his design, he might look through a manufacturer catalog. This is the
domain of this model. In a traditional SPF Model, this would be the “model”, or “catalog”,
or “standard equipment”.
ActualMaterial - For ClassDefs that represent what is purchased and assembled to
construct the plant. In a traditional SPF Model, this would be the “asset”.
Schema Overview and Modeling New Classes 3-7
Note: All ModelDefs are part of the meta schema and are therefore predefined.
3-8 Schema Overview and Modeling New Classes
Component Schemas
A component <<CompSchema>>
schema PIDComponent
(CompSchema) is a
<<Componentization>> <<Componentization>>
set of class
definitions that are <<ClassDef>> <<ClassDef>>
PIDNozzle
PIDPipeline
used within a
specified domain or <<Componentization>> <<Componentization>>
Component Schemas
Component schemas contain the following:
The set of class definitions that have a
componentization relationship with the component
schema
The interface definitions realized by those class
definitions
The property definitions exposed by those interface
definitions
The property types that scope those property
definitions
The component schemas are full of examples of shared objects that appear in more than
one component schema. Virtually all of the schema data defined in a component schema,
including class definitions, interface definitions, property definitions, and property types,
may be shared by one or more other component schemas.
The unique identity of an object is defined by its unique identifier (UID) and does not
depend in any way on its classification. Therefore, an object can be classified differently
by different components and still be one shared object in the SmartPlant Foundation
database. Shared object definitions will be discussed later in this chapter.
For example, if an object in one component schema is classified as class AA1 and the
same object with the same UID is classified as class AA2 by another component schema,
then the shared object in the SmartPlant Foundation database contains the information
associated with the union of classes AA1 and AA2.
Editing of the component schema should always be done against the SmartPlant schema
files from which the component schema files were generated rather than the component
schema files themselves (because they can be regenerated).
3-10 Schema Overview and Modeling New Classes
Component Schemas
Excel Spreadsheet
Tag Prefix
Tag Sequence Number
Tag Suffix
Maximum Pressure
Maximum Temperature
This is an example of Excel Import Pump that needs to be implemented. What you see
depicted above is a form that will be used to gather the necessary information about the
pump.
3-12 Schema Overview and Modeling New Classes
First, we will need a new Component Schema to contain the type of object to be added to
the SmartPlant Desktop Client.
New Object – The Excel Import Pump Step 1 – Create a Component Schema to store class defs
of objects that will be added through an import from
Excel.
Excel Spreadsheet
Component Schema: SPFExcelImportComponent
Want to map a class EIPump for Storage in SPF: <Comp Schema> SPFExcelImportComponent
Tag Prefix
Tag Sequence Number
Tag Suffix
Maximum Pressure
Maximum Temperature
Since a new type of object will be created, a new class of object must be defined, which is
called a Class Definition.
New Object – The Excel Import Pump Step 2 – Create a class definition for the Excel Import Pump.
Excel Spreadsheet
Want to map a class EIPump for Storage in SPF: <Comp Schema> SPFExcelImportComponent
Tag Prefix
Tag Sequence Number
Tag Suffix
Maximum Pressure
Maximum Temperature
New Object – The Excel Import Pump Step 3 – Realize as many existing interfaces as are available
in the system that map your needs
Excel Spreadsheet
Want to map a class EIPump for Storage in SPF: <Comp Schema> SPFExcelImportComponent
Maximum Pressure
Maximum Temperature
You will also need to define new interfaces and properties to complete the mechanism to
capture all of the needed information for this new object type.
New Object – The Excel Import Pump Step 4 – Create new interfaces and properties for specifically
needed parts of the new item not covered by the schema,
separate them out into multiple interfaces for maximum reuse
i.e if a group of properties will be used elsewhere it needs its
Excel Spreadsheet own interface
Want to map a class EIPump for Storage in SPF: <Comp Schema> SPFExcelImportComponent
The various properties we need can be spread out across multiple interfaces to make it
easier to re-use the interfaces for more than one type of object.
New Object – The Excel Import Pump Step 4 – Create new interfaces and properties for specifically
needed parts of the new item not covered by the schema,
separate them out into multiple interfaces for maximum reuse
i.e if a group of properties will be used elsewhere it needs its
Excel Spreadsheet own interface
New Object – The Excel Import Pump Step 4 – Create new interfaces and properties for specifically
needed parts of the new item not covered by the schema,
separate them out into multiple interfaces for maximum reuse
i.e if a group of properties will be used elsewhere it needs its
Excel Spreadsheet own interface
New Object – The Excel Import Pump Step 4 – Create new interfaces and properties for specifically
needed parts of the new item not covered by the schema,
separate them out into multiple interfaces for maximum reuse
i.e if a group of properties will be used elsewhere it needs its
Excel Spreadsheet own interface
<interface> IEI_HeldItem
© 2005. Intergraph Corp.
All Rights Reserved. <property def> Hold Status
As part of defining a new class (ClassDef), a primary interface for the class should be
specified.
New Object – The Excel Import Pump Step 5 – Specify a primary interface that identifies the
“uniqueness” of the role for this class def
Excel Spreadsheet
<Class Def > EIPump
<interface> IEI_Pump
Excel Import Pump
Name
Description <implies> <implies>
<interface>
IEI_PumpOcc
IEI_Pump is Primary as it scopes
EIPump in its entirety
© 2005. Intergraph Corp.
All Rights Reserved.
3-16 Schema Overview and Modeling New Classes
One of the last steps will be to specify the values used for the picklists.
New Object – The Excel Import Pump Step 6 – Scope the design status property using a “picklist”,
an enum list type and enum enums (entries)
Excel Spreadsheet
<interface>
IEI_Pump
<exposes>
Want to map a class EIPump for Storage in SPF:
Maximum Pressure
<contains>
Maximum Temperature
New Object – The Excel Import Pump Step 6 – Scope the design status property using a “picklist”,
an enum list type and enum enums (entries)
Excel Spreadsheet
<interface>
IEI_HeldItem
<exposes>
Want to map a class EIPump for Storage in SPF:
Maximum Pressure
<contains>
Maximum Temperature
Hands on:
Please follow along with the instructor in creating a new component schema. Do not close
your Schema Editor window as this activity will continue with additional components.
1. If you are not already logged into your VM session, log on to your operating
system as Administrator with a password of Training#1.
2. Click Start > All Programs > Intergraph SmartPlant Foundation >
SmartPlant Schema Component > SmartPlant Schema Editor - Standard to
start the Schema Editor.
4. In the Create section of the Editor view, find the CompSchema option. Drag
and drop it into the UML view area.
Class Definitions
A class definition (ClassDef) is a <<ClassDef>>
named description of a set of objects PIDInstrument
that specifies the attributes (data
elements) and methods (member
functions) for those objects in the
schema. <<ClassDef>>
PIDInstrumentLoop
Class Definitions
New Object – The Excel Import Pump Step 2 – Create a class definition for the Excel Import Pump.
Excel Spreadsheet
Want to map a class EIPump for Storage in SPF: <Comp Schema> SPFExcelImportComponent
Tag Prefix
Tag Sequence Number
Tag Suffix
Maximum Pressure
Maximum Temperature
6. From the form where you are creating your component schema, click the
browse button beside the Class definitions defined by component schema
field.
7. As there currently are no class defs that do not already belong to a component
schema, the list is empty. We need to create a new class def. Click the New
button at the bottom.
9. Click the browse button beside the Model definition field, and choose the
PlannedMaterialModel option from the list.
10. Click the browse button beside the Class factory definition field, and choose
the SchemaCompFactory option from the list.
The following graphic is a reminder of the terms that will be important to us as we learn
about the relationships between the various pieces of the schema.
Implies
Interface or Interface
RelDef
Interface Exposes Property
Data Type
Properties ScopedBy Type
Enum List
Navigation Relationships
Interface from/to Interface
© 2005. Intergraph Corp.
All Rights Reserved.
A reminder from the previous chapter that the two types of relationships used from
interface to interface are:
RelDefs – these are user defined relationships defined by the data modeler and are
used to associate interfaces that are realized by different class definitions
(ClassDef’s).
Implies – this type of relationship is thought of as a system default relationship. It
is used primarily for inheritance from one interface to another interface where
both are realized by the same ClassDef.
3-28 Schema Overview and Modeling New Classes
The following example shows how these different types of relationships are used.
Schema Overview and Modeling New Classes 3-29
Interface Definitions
An interface definition <<ClassDef>>
(InterfaceDef) represents a <<Realizes>>
PIDInstrument
<<Realizes>>
roles.
<<InterfaceDef>> <<InterfaceDef>>
<<Realizes>>
IPlannedFacility IInstrumentLoop
For example, all ClassDefs
in the schema realize the <<Realizes>> <<Realizes>>
IObject interface.
<<ClassDef>>
PIDInstrumentLoop
Just as in the real world, the role defines both the properties and relationships of an object.
Some interface definitions are defined to carry properties. Some are defined to carry
relationships. Others may be defined merely to indicate a role.
Note: SPF uses InterfaceDefs to define what methods are allowed on an object and what
workflows are appropriate. These special relationships are not available in the
Schema Editor, only within SPF Desktop Client.
3-30 Schema Overview and Modeling New Classes
"Employee",
"Driver", and so
on.
© 2005. Intergraph Corp.
All Rights Reserved.
Schema Overview and Modeling New Classes 3-31
The primary interface will imply all of the interfaces that are realized by the class def.
as "Father", <<Implies>>
"Employee",
"Driver", and so
on.
© 2005. Intergraph Corp.
All Rights Reserved.
Interface Definitions
InterfaceDefs define the <<ClassDef>>
PIDInstrument
relationships that an <<Realizes>> <<Realizes>>
The second relationship defined between ClassDef and InterfaceDef is the “Primary
Interface” relationship. The primary interface definition defines the set of possible roles
for a class definition and should imply everything that is known about that class
definition. Primary interface definitions, rather than class definitions, actually define the
objects in the schema. Class definitions fulfill a subset of the roles defined by the primary
interface definition.
The most relevant purpose for the Primary InterfaceDef is to define the full and
complete “roleness” of an object. It defines what an object “is” and everything that is
known about it. The IEquipmentOcc defines the what a piece of equipment is in the
schema and the IInstrumentOcc defines what an instrument is. This definition is
completed through the use of the Implies relationships. When you consider the complete
hierarchy of Implies under a Primary InterfaceDef, you know what that object “is”.
Schema Overview and Modeling New Classes 3-33
One of the interface definitions that identify a role is IObject. This is the most common
interface in the system and has the properties of unique identifier, a name, and a
description. Every class definition in SmartPlant must realize IObject.
There are no relationships between class definitions, only between interface definitions.
That is because only the interface definitions are exposed to the outside world. The
underlying reason for modeling class definitions and interface definitions instead of class
definitions and relationships is because of the complexity of the relationships that can be
formed.
3-34 Schema Overview and Modeling New Classes
In a traditional class data model, relationships go directly from one class definition to
another. When the class hierarchy gets moderately deep, however, the relationships
become very hard to understand. The consequence is that the modeler moves the
relationships “up” in the hierarchy, which causes ambiguity in defining just what the
relationship represents. By grouping similar characteristics together and exposing them as
an abstract entity called an interface definition, it is easier to maintain precision in the
relationships.
Interface Definitions
InterfaceDefs can imply <<ClassDef>>
other InterfaceDefs. If an <<Realizes>>
PIDInstrument
<<Realizes>>
InterfaceDef implies
<<Realizes>>
another InterfaceDef, then <<InterfaceDef>> <<InterfaceDef>>
any ClassDef that realizes IInstrument <<Realizes>> ILoopMember
<<PrimaryInterface>>
© 2005. Intergraph Corp.
All Rights Reserved.
Interface Definitions
Primary interface for class defs – Lists the class definitions for which this
InterfaceDef is the primary interface. Primary interfaces should imply
everything that is known about a particular class definition.
Implies interface definitions – Lists all the InterfaceDefs that this
InterfaceDef implies. All class definitions that realize this InterfaceDef must
also realize all the InterfaceDefs this InterfaceDef implies.
Implied by interface definitions – Lists all other InterfaceDefs that imply
this one.
Exposed property definitions – Lists all property definitions that this
InterfaceDef exposes.
Implementation of enumeration - Defines a relationship between an
enumerated entry that represents a classification hierarchy and the primary
interface of the objects the enumerated entry classifies. For example, a
primary interface, such as IPIDDrawing, should have a relationship with the
P&ID enumerated entry from the DocCategories enumerated list.
Schema Overview and Modeling New Classes 3-37
New Object – The Excel Import Pump Step 3 – Realize as many existing interfaces as are available
in the system that map your needs
Excel Spreadsheet
Want to map a class EIPump for Storage in SPF: <Comp Schema> SPFExcelImportComponent
Maximum Pressure
Maximum Temperature
Eventually, we will create implies relationships between our primary interface and each of
the other interfaces realized by our class def.
New Object – The Excel Import Pump Step 5 – Specify a primary interface that identifies the
“uniqueness” of the role for this class def
Excel Spreadsheet
<Class Def > EIPump
<interface> IEI_Pump
Excel Import Pump
Name
Description <implies> <implies>
<interface>
IEI_PumpOcc
IEI_Pump is Primary as it scopes
EIPump in its entirety
© 2005. Intergraph Corp.
All Rights Reserved.
11. Click the browse button beside the Primary interface definition field on the
New Class Definition form.
12. The interface we want to use is not the list because it does not exist yet. Click
the New button.
14. The Implies interface definitions field is a required field. Click the browse
button to find an interface to be implied by the new interface.
15. Eventually, this interface will imply all the interface realized by our new class
def, but at this point, the only one of those interfaces that exists is IObject.
16. This is enough information to create the interface. We can provide more
information later. Click OK to create the interface.
18. The new interface name now appears as the Primary interface definition field.
All required information has been provided. Click OK to create the class def.
21. When prompted, choose to create a default UML view of the component
schema.
The component schema and its first-level relationship will appear in the UML view.
22. From the Tree portion of the window, find the new EIPump class def in the
ClassDef section. Choose the Table (hor) view and review the interface
associated with the class def and the properties exposes by those interfaces.
ClassDef/InterfaceDef Properties
Review your
changes.
Search for base
classes, and
find EIPump
under
ClassDef.
Go to the Table
(hor) view to
see the
interfaces
related to the
class def and
any properties
exposes by
those
interfaces.
© 2005. Intergraph Corp.
All Rights Reserved.
Schema Overview and Modeling New Classes 3-47
23. Save the changes you made to the EISchema file. Click File > Save As >
Schema File.
Property Definitions
InterfaceDefs define <<ClassDef>>
and group <<PropertyDef>>
PIDInstrument
<<Realizes>>
the properties Name
property definitions
(PropertyDefs). <<Exposes>>
<<InterfaceDef>>
IInstrumentLoop
A particular <<PropertyDef>> <<Realizes>>
UID
PropertyDef for a <<Realizes>>
given ClassDef is
typically exposed by <<ClassDef>>
one, and only one, PIDInstrumentLoop
InterfaceDef. <<PrimaryInterface>>
For example, the IObject interface definition exposes, among other properties, the
following basic properties:
UID - Unique identifier for the object. This identifier is only required to be unique
within the SmartPlant.
Name - Name of the object
Description - Description of the object
Some interface definitions exist to hold properties, and other interface definitions exist to
form relationships. Some interface definitions are defined for neither properties nor
relationships – they are defined only for a role.
Creating Properties, Enumerated Lists and Relationships 4-5
Property Types
Property types define the set
of possible values for a <<PropertyDef>> <<ScopedBy>> <<StringType>>
PropertyDef. DocTitle String32
Basic varieties of property types in the SmartPlant schema include the following:
Boolean – Specifies that the property can have only one of two values: True
or False.
Double – Specifies that the property is a double-precision floating point
number.
String – Specifies that values for the property can contain alphanumeric
strings with some punctuation, such as periods (.), underbars (_), question
marks (?), and so on.
YMD – Specifies that the property value is a date (year, month, day).
EnumListType – Specifies that property values are defined by an enumerated
list.
UoMList – Specifies that values for the property can be a numeric value
(double) combined with a unit of measure from the appropriate unit of
measure list, along with some optional criteria.
Creating Properties, Enumerated Lists and Relationships 4-7
New Object – The Excel Import Pump Step 4 – Create new interfaces and properties for specifically
needed parts of the new item not covered by the schema,
separate them out into multiple interfaces for maximum reuse
i.e if a group of properties will be used elsewhere it needs its
Excel Spreadsheet own interface
Want to map a class EIPump for Storage in SPF: <Comp Schema> SPFExcelImportComponent
New Object – The Excel Import Pump Step 4 – Create new interfaces and properties for specifically
needed parts of the new item not covered by the schema,
separate them out into multiple interfaces for maximum reuse
i.e if a group of properties will be used elsewhere it needs its
Excel Spreadsheet own interface
New Object – The Excel Import Pump Step 4 – Create new interfaces and properties for specifically
needed parts of the new item not covered by the schema,
separate them out into multiple interfaces for maximum reuse
i.e if a group of properties will be used elsewhere it needs its
Excel Spreadsheet own interface
New Object – The Excel Import Pump Step 4 – Create new interfaces and properties for specifically
needed parts of the new item not covered by the schema,
separate them out into multiple interfaces for maximum reuse
i.e if a group of properties will be used elsewhere it needs its
Excel Spreadsheet own interface
<interface> IEI_HeldItem
© 2005. Intergraph Corp.
All Rights Reserved. <property def> Hold Status
Creating Properties, Enumerated Lists and Relationships 4-9
1. Open the Schema Editor, and click the Startup file button to find your
configuration file to open.
3. Using the tabs along the left-hand side of the window, open the Schema tab.
Then using the tabs along the top of the window, open the Editor view. Note:
You may need to select an object in the tree (bottom of left-hand pane) to
populate the Create, Environment, and Select lists in the Editor view.
4. From the ClassDef list, find the EIPump, and drag and drop it into the UML
window.
5. When prompted, click Yes to create a default view of the class def.
6. From the Create list, find InterfaceDef. Drag it into the UML window.
8. Click the browse button beside the Realized by class definitions field, and
choose the EIPump class def from the list. Click OK to close the dialog box.
9. Click the browse button beside the Implies interface definitions field, and
choose IObject from the list of interfaces. Click OK to close the dialog box.
10. Click the browse button beside the Implied by interface definitions field, and
choose the IEI_Pump interface from the list. Click OK to close the dialog box.
11. Next, click the browse button beside the Exposed property definitions field.
12. The list of available properties is empty. Click the New button to create a new
property.
15. Start typing “string” in the Starts with field until you can see the string value in
the list. Choose the string (string) option.
16. Once you have defined the new property, click OK to create it.
17. The new property appears in the list of properties. Click New to create another
new property.
20. The new property is added to the list of available properties. Click New to
create another new property.
23. When all three of the new properties have been created, make sure they are all
selected in the list, and click OK.
24. You will see the three new properties on the form where you provided
information about the new interface. Click OK to finish creating the
IEI_TaggedItem interface definition.
25. The new interface and its relationships, with the other items already displayed,
is added to the UML display.
26. Create another interface to expose more custom properties. Drag the
InterfaceDef option from the Create section of the Editor view into the UML
view.
29. No properties are available for selection. Click the New button to create a new
property.
32. From the list find the PressureUoM property type, and click on it.
34. Click the New button, again, to create another new property.
37. From the list of property types, find and click on the TemperatureUoM option.
39. Make sure both new properties are selected, and then click OK.
<<EnumEnum>>
Released
Enumerated lists may be combined to form an enumeration hierarchy. When this happens,
a special property type (enumerated list level type) is used to describe all of the
enumerations at a given level in the enumeration hierarchy.
Creating Properties, Enumerated Lists and Relationships 4-39
For example, the typing of equipment consists of a multi-level hierarchy, where each level
down the hierarchy provides a more specific definition of the equipment. Every branch
node in a hierarchy is itself an enumerated list, as well as an enumerated value. Only the
topmost node in the hierarchy is not an enumerated value (just an enumerated list) and
only the leaf nodes in the hierarchy are not enumerated lists (just enumerated values).
4-40 Creating Properties, Enumerated Lists and Relationships
The following UML diagram presents the SmartPlant schema model for enumerated lists
and enumerated entries.
The EnumListType class definition is used for enumerated list property types.
EnumListType realizes IPropertyType. EnumListType also realizes IEnumListType, the
interface definition that supports enumerated list behavior.
IEnumListType has a Contains relationship definition to IEnumEnum. Instances of this
relationship are used to indicate the enumerated entries contained within the enumerated
list.
Leaf nodes within an enumerated list hierarchy are instances of the EnumEnum class
definition. This class definition realizes IEnumEnum, the interface definition that supports
enumerated entry behavior, and IObject, the interface that contains the short (Name) and
long (Description) text values for the enumerated entry.
Branch nodes within an enumerated list hierarchy are instances of the EnumListType
class. EnumListType has an optional realizes relationship to IEnumEnum, which means
that an enumerated list may or may not be an enumerated entry as well. For branch nodes
within an enumerated list hierarchy, the EnumListType object will realize this optional
interface.
Creating Properties, Enumerated Lists and Relationships 4-41
<<EnumListType>> <<EnumListType>>
3D Documents WBS Documents
<<EnumListType>> <<EnumListType>>
Dimensional Data Purchasing
<<Contains>> <<Contains>>
Documents Documents
<<Contains>>
<<EnumListType>>
<<EnumListType>> <<Contains>>
Project
Electrical
Engineering
Documents
<<Contains>> Documents
<<Contains>>
<<EnumListType>>
<<EnumListType>> <<EnumListType>> Process
<<Contains>> <<Contains>>
PCE Documents DocCategories Secure
Documents
<<Contains>>
<<Contains>>
<<EnumListType>>
<<EnumListType>>
<<Contains>> Process
P&ID Documents
<<Contains>> Documents
<<Contains>>
<<EnumListType>> <<EnumListType>>
General Process Control
<<Contains>> <<Contains>>
Documents Documents
<<EnumListType>>
<<EnumListType>> <<EnumListType>>
Equipment
PBS Documents Piping Documents
Documents
Each EnumListType in the DocCategories enumerated list either contains enumerated list
entries (EnumEnum) or other nested lists (EnumListType). An example of each of these
cases appears below.
4-42 Creating Properties, Enumerated Lists and Relationships
<<EnumListType>>
DocCategories
<<Contains>>
<<EnumListType>>
Equipment
Documents
<<Contains>> <<Contains>>
<<EnumEnum>>
<<EnumEnum>>
Equipment
Equipment List
Datasheet
<<EnumListType>>
DocCategories
<<Contains>>
<<EnumListType>>
PBS Documents
<<Contains>>
<<EnumEnum>>
PBS Document
Number – Specifies a number that can be used as a secondary key to identify the
enumeration.
Metadata for enumeration – Defines a relationship between the enumerated entry
and another object or objects in the schema that provide more information about that
enumeration. This is frequently used to relate enumerations to interface definitions for
type hierarchies.
Contained in – Identifies the names of other enumerated lists that contain this
enumerated list.
Contains – Identifies the names of other enumerated lists and enumerated list entries
that this list contains.
Scoped property definitions – Identifies the property definitions that have a
ScopedBy relationship with this enumerated list type.
New Child List – Creates a new child list (EnumListType) under the selected node in
the enumeration hierarchy. When you select an enumerated entry and create a new
child list under it, it becomes an EnumListType object.
New Child Entry – Creates a new child enumerated list entry (EnumEnum) under the
selected enumerated list in the hierarchy.
Import Lists from Clipboard – Imports enumerated lists that you have copied from a
spreadsheet to the Clipboard into the Schema Editor. When you import lists, the
Schema Editor tries to map the contents of the Clipboard to the appropriate
enumerated list properties based on the imported values. You can change this mapping
manually in the Import from Clipboard dialog box.
Import Entries from Clipboard - Imports enumerated list entries that you have
copied from a spreadsheet to the Clipboard into the Schema Editor. When you import
entries, the Schema Editor tries to map the contents of the Clipboard to the appropriate
enumerated entry properties based on the imported values. You can change this
mapping manually in the Import from Clipboard dialog box.
New Sibling – Creates a new enumerated list or enumerated list entry at the same
level as the list or entry selected in the Enumerated entries tree.
Delete – Deletes the selected node in the Enumerated entries tree.
Creating Properties, Enumerated Lists and Relationships 4-45
For example, the given unit (x) is multiplied by A and then B is added to that value to
determine the SI value (y = Ax + B).
NOTE: SI stands for International System of Units and is the modern metric system of
measurement. Long the language universally used in science, the SI has become
the dominant language of international commerce and trade. SI is the basis used
for the conversion of UOM’s.
an associated enumerated list that identifies whether the pressure value is absolute or
gauge (@ Gauge).
A PropertyDef that is typed as unit of measure has a double precision floating point value
in the SI unit for that list. It can also have a preferred display unit of measure, a number of
significant digits, and uncertainty.
Creating Properties, Enumerated Lists and Relationships 4-47
Scopes property definitions – Lists the property definitions that are scoped by this
unit of measure list.
4-48 Creating Properties, Enumerated Lists and Relationships
Unit of measure entries – Displays the unit of measure entries for this list in tabular
format.
UID – Displays the unique identifier for the selected entry in the list. The UID is
automatically assigned by the Schema Editor, but you can change it.
Short description – Specifies a short description for the unit of measure list entry.
The short description is used as the name for the entry throughout the Schema Editor.
Long description – Specifies a long description for the unit of measure list entry.
A conversion factor – Specifies the multiplier used to convert from this unit of
measure to SI units. Conversions are done using y = Ax + B, where x is the value in
this unit of measure and y is the value in SI units.
B conversion factor – Specifies the addend used to convert from this unit of measure
to SI units. Conversions are done using y = Ax + B, where x is the value in this unit of
measure and y is the value in SI units.
Is default SI unit of measure? – Specifies whether this unit of measure is the default
SI unit of measure for this list.
New – Adds a new unit of measure entry to the list.
Delete – Deletes the selected unit of measure entry from the list.
Test – Allows you to test conversions among units of measure in this list using the A
and B conversion factors defined for each unit of measure and any specified
conditions for each unit of measure.
Creating Properties, Enumerated Lists and Relationships 4-49
New Object – The Excel Import Pump Step 6 – Scope the design status property using a “picklist”,
an enum list type and enum enums (entries)
Excel Spreadsheet
<interface>
IEI_Pump
<exposes>
Want to map a class EIPump for Storage in SPF:
Maximum Pressure
<contains>
Maximum Temperature
New Object – The Excel Import Pump Step 6 – Scope the design status property using a “picklist”,
an enum list type and enum enums (entries)
Excel Spreadsheet
<interface>
IEI_HeldItem
<exposes>
Want to map a class EIPump for Storage in SPF:
Maximum Pressure
<contains>
Maximum Temperature
1. In the tree, in the left-hand pane, find the IEI_Pump interface definition.
2. Click the browse button beside the Exposed property definitions field.
7. From list of property types that can be created, find and click on
EnumListType.
9. If you want, you can also replace the default UID value with a unique, but
more user-friendly value. This value will be used throughout the software to
indicate the list that scopes the property.
UID – PumpTypes
10. When you have finished providing information about the list itself, you are
ready to start creating the values in the list. Click the New Child Entry button.
11. A new object appears in the tree, as a child of the new list.
12. Provide a name, description, and unique UID for the list value, and then click
New Sibling to create another. The number field is optional, but may be used
to specify the order of the values in the list box.
Name – Horizontal
Long description – Horizontal Pump
UID – HorizontalPump
Number – 1
NOTE: The number value for list entries is used specifically by SmartPlant 3D when
publishing and retrieving the property values. This use will be covered in the mapping
section of this course.
13. Create a second value for the list with the following information:
Name – Vertical
Long description – Vertical Pump
UID – VerticalPump
Number – 2 (This value will appear automatically, if you gave the previous
item a value of 1.)
14. Click OK to create the list.
15. The new list now appears as a option in the list of property types. It should be
selected automatically. Click OK to choose it.
18. Click OK, again, to save the changes you made to the IEI_Pump interface.
19. Next, create a new interface that will also have a property defined by an
enumerated list. Find the InterfaceDef option in the Create section of the
Editor view, and drag and drop it into the UML view.
25. Click the New button to create a new property type. When prompted, choose
the EnumListType as the new kind of property type you will be creating.
32. From the list of property types, find the new enumerated list. It should be
selected automatically. Click OK to choose it.
Review of the EIPump shows that we have now modeled all the requirements for our new
class of pump.
Tag Prefix
Tag Sequence Number
Tag Suffix
Maximum Pressure
Maximum Temperature
The following graphic is an illustration of all the pieces modeled so far in Chapters 3 and
4.
4-74 Creating Properties, Enumerated Lists and Relationships
Relationship Definitions
Relationship definitions (RelDef) are associations between
interface definitions. A RelDef will define two object instances
that fulfill the roles on each end of the relationship.
Relationship definitions also define cardinalities on each end
of the relationship.
The following is an example of a relationship showing
equipment components that can be associated with equipment
e.g. nozzles on a vessel.
Cardinality Relationship Name Cardinality
on End 1 on End 2
represents 2 represents a
or more Roles on Each End vessel
nozzles
© 2005. Intergraph Corp.
All Rights Reserved.
Cardinalities provide the constraints for relationships by defining the minimum and
maximum numbers of participants at each end of a relationship. For example, in the
EquipmentComponentComposition relationship there can be zero to many (0..*) objects
that have the role of Equipment Components but only zero or one (0..1) object that can
have the role of Equipment in each instance of the relationship. For example there could
be many nozzles and some may be associated to a vessel but that nozzle instance would
not be connected to more than one (i.e. multiple) vessel.
Creating Properties, Enumerated Lists and Relationships 4-75
Relationship Definitions
re
s ali
ze ze
ali s
re
<<Class>>
<<Class>> <<Class>>
<<Class>>
Rel
Rel
Instance
Instance
Object
Object UID=XX
UID=XX Object
Object
Instance
Instance Instance
Instance
UID=01
UID=01 UID=02
UID=02
Rel Obj1 Obj2
<<Rel Type>> Relationship
UID UID UID Properties
XX 01 02 EquipmentComponentComposition
Relationship Definitions
Engineering tools can publish objects at different times.
Users can publish nozzles ahead of equipment.
The software has to decide “can this relationship be
resolved”? An example would be P&ID could publish
nozzles first and then vessels are published later. The
software would suppress errors because there is no harm
in doing this since the vessels CAN be published at a later
time.
When defining a relationship definition, End 1 and End 2
interfaces depends on which way users are going to
query.
The locality of reference, which is shown as part of the role name, shows how this
relationship will be instantiated:
“I’ve got to publish.”
“You have to publish.”
“Someone will publish someday.”
Relationship Definitions
Locality of Reference
sequence of the related objects is important. For example, the order of the
piping ports for a piping connector is important in understanding the logical
connectivity. Conditional ordering is not currently supported in SmartPlant.
Abstract relationship – Indicates that the relationship definition is abstract.
An abstract relationship cannot be directly instantiated (no Rel objects can use
the abstract relationship definition). Abstract relationship definitions are used
for generic traversal operations. An abstract relationship definition must be
specialized by one or more concrete (standard) relationship definitions. (Note:
Do NOT publish abstract relationships.)
Standard relationship – Indicates that the relationship definition is a standard
relationship. Standard relationships are also called concrete relationships.
Standard or concrete relationship definitions can be used for instantiated
relationships. A relationship definition can be either abstract or standard, but
not both.
Specialization of abstract relationship definition – Specifies the name of
the abstract relationship definition of which this standard relationship
definition is a specialization. Any standard (concrete) relationship that is a
specialization of an abstract relationship is also treated as an instance of that
abstract relationship. For example, the PipingEnd1Conn, PipingEnd2Conn,
and PipingTapOrFitting concrete relationship definitions are all specializations
of the Connections abstract relationship definition. Therefore, a connection at
end 1 is a PipingEnd1Conn relationship and also a Connections relationship
(one Rel that is a specialization). A connection at end 2 is a PipingEnd2Conn
and also a Connections relationship; a tap/fitting connection is a
PipingTapOrFitting relationship and also a Connections relationship.
End 1
• Interface definition – Identifies the interface definition at end 1 of the
relationship definition.
• Role – Specifies the name of the role for end 1 of the relationship.
• Minimum cardinality – Specifies the minimum number of participants allowed
on end 1 of the relationship. Possible values are 0, 1, and 2.
• Maximum cardinality – Specifies the maximum number of participants allowed
on end 1 of the relationship. Possible values are 1, 2, or * (many).
• Object at end 1 – Specifies whether hanging relationships are allowed for the
object at end 1 of the relationship. Objects can be required to be located in the
same container (typically a document) as the other object in the relationship, to be
published by the same authoring tool as the other object, or to be published by
another component.
• Filter out edge in display – Specifies whether you want to see the relationship
edge automatically created from end 1 to end 2 of this relationship in the Schema
Editor user interface. If this option is set to True, user access for this edge
definition can be controlled in the SPF client by user group security.
Creating Properties, Enumerated Lists and Relationships 4-79
End 2
• Interface definition – Identifies the interface definition at end 2 of the
relationship definition.
• Role – Specifies the name of the role for end 2 of the relationship.
• Minimum cardinality – Specifies the minimum number of participants allowed
on end 2 of the relationship. Possible values are 0, 1, and 2.
• Maximum cardinality – Specifies the maximum number of participants allowed
on end 2 of the relationship. Possible values are 1, 2, or * (many).
• Object at end 2 – Specifies whether hanging relationships are allowed for the
object at end 2 of the relationship. Objects can be required to be located in the
same container (typically a document) as the other object in the relationship, to be
published by the same authoring tool as the other object, or to be published by
another component.
• Filter out edge in display – Specifies whether you want to see the relationship
edge automatically created from end 2 to end 1 of this relationship in the Schema
Editor user interface. If this option is set to True, user access for this edge
definition can be controlled in the SPF client by user group security.
Delete object 2 when object 1 is deleted? – Indicates whether you want the
software to delete the object on end 2 of the relationship when the object on
end 1 is deleted.
Delete object 1 when object 2 is deleted? – Indicates whether you want the
software to delete the object on end 1 of the relationship when the object on
end 2 is deleted.
When object 1 is copied – Specifies what you want the software to do when
the object on end 1 of the relationship is copied. You can choose whether to
copy the object on end 2 as well, copy the object and relationship, leaving the
relationship pointing to the same object that the first relationship pointed to, or
not to copy the object or relationship at all.
When object 2 is copied – Specifies what you want the software to do when
the object on end 2 of the relationship is copied. You can choose whether to
copy the object on end 1 as well, copy the object and relationship, leaving the
relationship pointing to the same object that the first relationship pointed to, or
not to copy the object or relationship at all.
4-80 Creating Properties, Enumerated Lists and Relationships
4. Add the ISPFDocumentVersion interface to the UML view. Find the interface
in the tree on the left-hand side of the window, and drag and drop it into the
UML window.
The interface will appear in the UML view, but at this point, it has no relationships to any
of the other items in the display.
5. In the Create section of the the Editor view, find the RelDef option. Drag and
drop it into the UML display.
12. Specify the way the relationship should be managed and then click OK.
At the front end of the engineering process, not a lot of information is known about the
pump other than the following:
Some kind of pumping function is required.
The pump is connected to streams.
The streams have a certain fluid code running through them.
The pump needs to pump at a certain volume.
When the PFD is defined, the user does not know how the pumping function with these
general requirements will be accomplished. That information is left up to the P&ID
portion of the workflow. In the PFD, the user sees some interfaces and properties of the
pump, but not everything that defines the pump in SmartPlant.
Creating Properties, Enumerated Lists and Relationships 4-91
In SmartPlant P&ID, engineers start adding value to the design by adding more and more
information, such as the type of pump needed and so on. When SmartPlant P&ID
publishes the document containing the same pump (P100) as part of the workflow, the
users see more interfaces because the pump object is being enriched as it moves through
the design process. When the engineer updates the Equipment Data Sheet in Zyqad, there
are thousands of properties describing the same object, further enriching it.
In each tool, the pump (P100) is published with a different class definition, including
PFDProcessEquip, PIDProcessEquip, and EQDCentrifugalPump. However, a
SharedObjDef indicates that these three classes definitions all define the same object in
SmartPlant. The three class definitions coexist in a sharing relationship. The
SharedObjDef collects information to indicate this sharing relationship. If you look at the
realizes relationship for each class definition, you can see many of the same properties
because as the object moves from one tool to another, properties are updated and the
information is enriched.
When an object is created in the PFD, it has a unique identifier for the object (UID). For
example, PFD UID AA1 (P100) gets published. Then, SmartPlant P&ID retrieves P100,
some additional work is done, and it gets published as PID UID AA2 (P100).
The two publishes establish a “same as” relationship. The same as relationship indicates
that object AA1 is the same as object AA2.
4-92 Creating Properties, Enumerated Lists and Relationships
Model definition – Specifies the model definition to which the shared object
definition belongs. Objects can only be shared if they exist in the same model.
Shared by class definitions – Specifies the class definitions that have a sharing
relationship with this SharedObjDef.
Creating Properties, Enumerated Lists and Relationships 4-93
Edge Definitions
Edge definitions (EdgeDef) are
single or multiple relationship A
definitions with direction. In 1
the schema, an edge definition Re
+Rel1
Discrimination criteria that can be applied to objects at the end of the path
Position criteria that can select a specific object from the set of objects that
satisfy the discrimination criteria at the end of the path
When you create an interface definition in the Schema Editor, the software automatically
creates a corresponding edge definition. This edge definition is given a UID and name that
is a combination of + and the UID for the interface definition. When you create a
relationship definition in the Schema Editor, two edge definitions exist: one for traversing
from end 1 of the relationship to end 2 and the other for traversing from end 2 to end 1.
In addition to these automatically generated edge definitions (implicit EdgeDefs), you can
explicitly define edge definitions for a variety of purposes in the Schema Editor. Explicit
edge definitions may be used to traverse across multiple relationships, to select only
certain objects from the destination end, or to do multiple relationship traversal and
selective discrimination.
Creating EdgeDefs, Graph Defs and View Defs 5-5
Edge Definitions
EdgeDefs collect one or
more relationship edges. A
1
EdgeDefs can specify Re
l1
+
EdgeDef 1
discrimination criteria, +Rel1, -Rel2
including position, to help 2
you filter the objects at the B
end of the path defined by 2 -
the EdgeDef.
Rel2
1
C
Path – Allows you to select the relationship edges that you want to include in
the edge definition. The set of edge definitions that appear here are the set of
interface definitions that apply to the end interface definition. As you click
nodes in the tree, the path for the edge definition updates beside the Path label
at the bottom of the dialog box. The UI allows you to include interface
definitions that are implied by the end interface definition in your edge
definition. Every edge definition starts at an interface definition and traverses
through one or more relationship definitions to another interface definition at
the other end. When you define a path for an edge definition, the set of edge
definitions that appear in the Current edge definition window are the set of
interface definitions that apply to the end interface definition. For example, if
you traverse the relationship definition from equipment to equipment
components, you will see the edge definitions that apply to the role of
equipment components. However, if you want to continue the path using
nozzles, which are a specialization of equipment components, then you can
select INozzleOcc from this list. Selecting INozzle for example, will allow
you to continue the path using the more specific nozzle edge definitions.
5-8 Creating EdgeDefs, Graph Defs and View Defs
The following UML diagram shows an EdgeDef that navigates from a piece of equipment
to the P&ID on which the piece of equipment appears:
In SmartPlant Foundation, edge definitions are custom relationship expansions that appear
on the shortcut menu when a user right-clicks an object that exposes the relationship
referenced by the edge definition. Instead of requiring the user to go directly from Object
A to Object B in the tree view, an edge definition can be created to allow the user to
traverse through multiple intermediate objects and display an object at the end of the
relationship that meets specific criteria. For example, an edge definition could be created
to expand to only the first nozzle on a vessel.
System administrators might also create an edge definition to traverse directly from a
plant to a unit. In SmartPlant Foundation, units are directly related to functional areas.
However, a custom edge definition would allow the user to expand the plant to see the
units without expanding a functional area first.
Creating EdgeDefs, Graph Defs and View Defs 5-9
The following UML diagram can be used to show what an edge definition might look like:
5-10 Creating EdgeDefs, Graph Defs and View Defs
Edge Definitions
Select the starting interface for the new EdgeDef
(IEquipment
IEquipment) and click the Path tab.
From the Path tab, use the right-hand side of the window to determine a path. The top
pane shows you the current positions (in thise case the starting point) and allows you to
navigate implies relationships. The middle pane shows the roles on the end of reldefs
available to the interface where you are currently located, and the bottom pane will
display the relationships used to navigate to the roles selected in the middle pane.
Edge Definitions
Select the
Equipment
Components
role from the
roles displayed
in the middle
pane.
Edge Definitions
Zoomed in view of the New Edge
Definition dialog box.
Click on the Equipment Components role in the middle pane, and click Add to Path.
Edge Definitions
Select the Add to Path button to add the
Equipment Components role to the edge
definition.
The path to the selected role appears in the large window on the left.
Edge Definitions
The Equipment Components role will be displayed in a UML
view in the left pane.
The top right pane will now show the current location (the interface on the other end of
the reldef displayed in the path window). You may also navigate using implies
relationships, as illustrated below.
Edge Definitions
Expand the IEquipmentComponent tree and display the
implied relationships.
Edge Definitions
Select the implied interface and then the
ending role for this new EdgeDef
(Process
Process Data (Points)).
(Points)
The middle pane now shows roles at the other end of reldefs from the interface selected in
the top pane. Choose the role you want, and click the Add to Path button.
Edge Definitions
Select the Add to Path button
to add the Process Data
(Points) role to the edge
definition.
The path appears on the left. Gaps in the path represent navigation through implies
relationships.
Edge Definitions
Click OK to create the new EdgeDef..
You can also define discrimination criteria for edge definitions using the options on the
Filter tab.
Edge Definitions
EdgeDef
Filter tab
Property – Allows you to select properties exposed by the starting interface to use as
criteria to limit the objects at the end of the path for the edge definition.
Operator – Specifies whether you want objects at the end of the path for the EdgeDef
to be equal to (=), less than (<), greater than (>), or not equal to (<>) the value in the
Comparison value box.
Comparison value – Specifies the value that you want to use with the specified
comparator to limit objects at the end of the edge definition If you select a property in
the Property list that has an enumerated list associated with it, you can click the
button here to select a value from the enumerated list to use as the comparison value.
Any position – Specifies that objects at the end of the path for the edge definition can
be in any position.
Numeric position – Specifies that objects at the end of the path for the edge definition
must be in a particular numeric position. For example, if you want to return the fifth
nozzle on a piece of equipment, the numeric position would be 5.
End object must support the following interfaces – Allows you to further define the
objects at the end of the path for the edge definition by specifying an interface that end
objects must support. For example, if you want to create an EdgeDef to display the
P&ID an object is on, you could select IPIDDrawing in this list to make sure that only
P&IDs and not other objects that participate in the DwgRepresentationCompostion
relationship are returned by the EdgeDef.
Creating EdgeDefs, Graph Defs and View Defs 5-17
2. With the new selection made, click the Find button below the field to refresh
the view of the tree.
3. Find the EdgeDef option in the Create list, and drag and drop it into the UML
window.
6. In the middle pane, find the Document Versions (Design) role. Select it, and
click the Add to Path button.
The path will appear in the large pane on the left-hand side of the window.
7. From the middle pane, find the Folders role. Select it, and click the Add to
Path button.
The second step of the path will also appear in the window on the right.
Next, we will create another edge definition. This edge def, however, will include a filter
to display only objects on the end that meet a specified criteria
5-24 Creating EdgeDefs, Graph Defs and View Defs
9. Create another edge def by dragging and dropping the EdgeDef from the
Create section of the Editor view into the UML view.
12. From the list of roles in the middle pane, find Pump (Excel). Select it, and
click the Add to Path button.
Edge Definitions
Select the Pump (Excel) role and
then click the Add to Path button
to add this section of the path to
the edge definition.
13. The path will appear in the large window on the left-hand side of the form.
Next, go to the Filter tab.
14. From the Filter tab, we will specify a criteria that pumps (the end point) must
meet in order to be returned by this edge def. Click the Add Filter button.
16. Specify the property on which you want to filter. We will filter on the type of
the pump, so choose the EI_PumpType property def.
17. Choose the Operator to be used in the criteria, and then click the browse
button beside the Comparison value field.
18. Choose the value that must be set for the EI_PumpType property of a pump in
order for it to be returned by the edge definition. As our example is for a
command to return vertical pumps, choose the Vertical option, and click OK.
19. When you have finished creating the criteria for the edge definition, click OK.
Graph Definitions
Graph definitions (GraphDef) are a set
of edge definitions with structure. A
1
1
Each GraphDef starts at an interface Ed
ge
Re De
definition and branches out from that
Rel3
l1 f 1 GraphDef 1
interface definition to related interface +Rel1, -Rel2, +Rel3
definitions. 2
2
B
Any edge that is tied to the starting D
2
interface definition or to any interface
definition implied by that interface
Rel2
definition can be used as part of the
GraphDef. 1
You can also define alternate expansions for class definitions. For alternate expansions to
show up on the shortcut menu when you right-click an object in the SmartPlant
Foundation client, you must create a new method that uses the GetObjsbyGraphDefName
client API and references the appropriate graph definition. Default expansions created
using graph definitions show up in the method section of the shortcut menu that appears
when you right-click an object that exposes the starting interface defined in the graph
definition.
The following UML diagram shows a GraphDef that goes through the plant, area, and unit
to a piece of equipment and then to the P&ID on which the equipment appears.
5-34 Creating EdgeDefs, Graph Defs and View Defs
Layout – Displays a tree containing all the possible relationship edges that can be
expanded from the selected interface definition and all the interfaces that it implies.
To add an edge definition to the graph definition, you can click it in the tree view, and
then click Add to Graph.
Add to Graph – Adds the selected edge to the graph definition.
Current graph definition – Displays the current graph definition in a tree view.
Graph definition – Displays the current graph definition in UML format.
Relationships have a + or – in front of them to indicate direction, followed by the
relationship name. Commas separate relationships traversed in the GraphDef.
5-36 Creating EdgeDefs, Graph Defs and View Defs
4. Click the ExcelPumpToFolder edge def in the middle pane, and click the Add
to Graph button.
5. The relationship or edge def will appear in both the top and bottom panes on
the left-hand side of the menu.
6. From the middle pane, select the Document Versions (Design) role. Click the
Add to Graph button to add to to the path on the left.
7. Finally, select the Contract role, and use the Add to Graph button to add it to
the path.
View Definitions
View definitions (ViewDef) are properties extracted from possible
properties that a graph definition exposes. A view definition is
used to provide a different view of data from that provided by the
underlying schema.
1 A Properties
1 Name
GraphDef 1
Re Prop2
Rel3
l1 Prop3
2 Properties
2
Name
D B
PropB
2
Properties PropC
Rel2
Name
Prop2A
Prop3A Properties
1
OtherProp
C
Prop22
View Definitions
ViewDefs are SmartPlant equivalents of relational
database views. A relational database view is a
combination of joins and projects where the joins are
used to retrieve the desired objects and the projects are
used to determine which properties (columns) to include
and what to call those properties.
Current view definition - Displays the current view definition in text format. You
can edit the view definition manually in this box.
Name – Specifies the name of the selected property when it appears in the view
definition. After you select the property that you want to add you can type a new
display name here.
Creating EdgeDefs, Graph Defs and View Defs 5-45
5-46 Creating EdgeDefs, Graph Defs and View Defs
Note: If you do not provide a description for the view def, as illustrated above, the view
def will appear as a blank link in the New Report dialog box in the Desktop Client.
4. Expand the IEI_Pump interface definition in the top, right-hand pane. Select
the Identification property category to populate the bottom pane with a list of
properties.
5. Activate the check boxes for the Name and Description fields to add those
properties to the view definition.
6. To change the display name of a property, select the row with the applicable
property, and modify the value in the Name field at the bottom of the left-hand
side of the dialog box.
7. Click the Category field to apply the name change to the property.
8. Select Contract in the top right-pane, and add the Name property to the view
def. Rename the property to reflect that the property is the name of the unit
associated with the pump, not the pump itself.
9. Expand the Document Versions (Design) role in the top, right pane, and add
the Name property. Modify the name of the property to reflect that this is the
name of a document version associated with the pump.
10. Expland the ExcelPumpToFolder edge definition, and find the Name property
to add to the view def. Modify the display name of the property to indicate that
this is the name of the folder associated with the pump.
11. From the No category property category under the IEI_Pump interface, find
the custom properties you created to describe the new pumps. Add the custom
properties to the view def and modify their names, as necessary.
12. To change the order of the properties in this new def, select the row or rows
that you want to move. Right-click on the selection, and use the Cut command.
13. Select the row above which you want to place the cut rows, right-click, and
choose the Paste Insert command.
14. At this point you can click OK to create the view definition. Alternately, if you
want, you may first click on the UML tab to review the view def in a different
format before clicking OK.
The UML diagram below shows all the changes that have been made to the schema.
5-60 Creating EdgeDefs, Graph Defs and View Defs
C H A P T E R 6
Viewing and Finding Data
6-2 Viewing and Finding Data
Viewing and Finding Data 6-3
The data that can be viewed by the schema editor is the contents of the XML container
that gets created as a result of performing a Publish operation from one of the engineering
authoring tools.
For example, if drawing 128-5001 gets published from SmartPlant P&ID, the instantiation
of the objects can be viewed in the SmartPlant Foundation Desktop Client browser.
Published Data
List View of P&ID drawings that have been published.
Using the Show Equipment command will show the published equipment objects.
Published Data
List View of related equipment that has been published.
Using the Show Instruments command will show the published instrument objects.
Published Data
List View of related instruments that have been published.
Using the Show Lines command will show the published pipeline objects.
Published Data
List View of related pipelines that have been published.
XML Files
When a set of objects, grouped by document, are published or
retrieved, an XML file container is used to house those objects
in XML format.
Each publish includes at least data and metadata containers
and may also contain an instructions (tombstones) container.
In XML files, the <class> elements identify objects of a particular class. Within each
<class> element, there are the interfaces for that class. The <interface> elements expose
the properties for the class. The property type for each property defines the acceptable
values for that property in the XML file.
Viewing and Finding Data 6-7
Using the File > Open > Starting File command, open the EFSchema.cfg file.
This file can be found in the following location: D:\SmartPlant Foundation 2009 Server
Files\Web_Sites\SPFTRN\EFSchema\03.08.
Click any of the related objects in the UML view to display the details for that object.
Once the Options dialog appears, activate the Table (Vertical) display. If you wish, you
may also de-activate the Table (Horizontal) view, but this is not necessary. Click OK to
close the Options dialog box, and again to close the View Data dialog box.
The vertical table displays row headers along the left side of the table and data in vertical
columns. In the following example, a Vertical table display is used.
Select the object that you want to see in the Properties view.
Finding Data
On the Find tab of the View Data dialog box, click the
browse button to display a list of classes.
Finding Data
Select one or more classes and click OK.
OK
Finding Data
Enter the necessary search criteria, and then click OK.
A Data Tree/Properties view displays the results of the search. Expand the tree to see
related data.
Finding Data
Click the + next to PIDPipingConnector to view the related
data.
Finding Data
Expanding nodes in the tree shows related data objects.
In the following example, the Find button in the Workflows dialog box is used to find
objects.
Finding Data
In the Workflows dialog box, click the Find button to search
for data in the open file.
Finding Data
Zoomed in view of the Workflows dialog box.
On the Find tab and enter the search criteria to locate the desired data.
Finding Data
Enter the necessary search criteria, and then click OK.
In this example, the software searches for all objects that that have *10* in the Name from
All classes. A Data Tree/Properties view displays the results of the search.
Finding Data
Expanding the tree shows related data objects.
Comparing Files
There are three types of comparisons in the Schema
Editor:
Full Comparison
Detection of Tombstones
Comparison Using Views
Full Comparisons
A full comparison compares every object, relationship, and property in one file with the
file you select. When you do a full comparison, you can choose whether the software
displays the full results of the comparison, the comparison instructions only, or both the
comparison results and instructions.
After you perform a full comparison between files, you can view the modification
instructions generated by the software. These modification instructions define the changes
required to go from the objects in the file you selected for comparison to the objects in the
original file. For example, you can see which objects would be deleted, which ones would
be updated, and which ones would be created.
Detection of Tombstones
This type of comparison will be discussed in detail in a later section.
6-30 Viewing and Finding Data
Comparison results appear in Notepad for viewing. The comparison results list the objects
that appear in one file, but not the other, and the objects that are different in the two files.
The output will display any new or changed objects in the compared XML file.
After you review the comparison results, you can close Notepad by clicking File > Exit.
The text file containing comparison results is stored in the location you specified earlier.
You can also choose to view on the comparison instructions generated when you compare
two files. These comparison instructions are a set of instruction objects that define the
changes necessary to go from the file you selected for comparison to the file you opened
first in the Schema Editor.
When you choose to view comparison instructions, the View Data Instructions dialog
box appears to allow you to select the view in which you want to display the comparison
instructions.
Click OK.
OK
Another way to view the results is by selecting the Comparison Results View button. This
button is available only after you compare two files, as shown previously.
Click OK.
OK
When comparing data files, the option to Display Results or Display Instructions have
been demonstrated. In the following example, comparison of two file xml’s are shown
with the option to Display Both (results and instructions).
Selecting the Display Both option will show results and instructions. Choose the XML file
version to be used to compare against.
Click OK.
OK
Detect Tombstones
In the Workflows dialog box, click the Open button to open
an XML data file.
Detect Tombstones
In the Open Data File dialog box, select an XML data file
and click Open.
Open
Detect Tombstones
Click Compare > Detect Tombstones in the Workflows
dialog box.
Detect Tombstones
In the Open Compare With Data File dialog box, select an
XML data file for comparison and click Open.
Open
Detect Tombstones
Click the view in which you want to display the comparison
results.
Click OK.
OK
A Data Instructions Tree/Properties window displays. The Schema Editor identifies items
as tombstones when they do not exist in one file you opened in the Schema Editor but do
exist in the other file you selected for comparison.
Detect Tombstones
Click Delete_F-
Delete_F-12830LP to view the details in the right
pane.
Tool
Meta-Data
Mapping
Tool Map
Schema
SmartPlant
Schema
Delivered by tool
installation SPF
Database
Delivered by SmartPlant
Foundation installation
© 2005. Intergraph Corp.
All Rights Reserved.
Data originating from an authoring tool’s database (metadata) can now be manipulated
from the Schema Editor using a metadata adapter delivered with each individual
authoring tool.
EF
Schema
Schema
Editor
SPPID SPPID
Metadata Map
Schema
Adapter
SPPID
© 2008. Intergraph Corp.
All Rights Reserved.
The metadata adapter can be used to read the data definitions in the tool meta-schema. If
new definitions are found in the authoring tool database, the metadata adapter can extract
these new definitions and automatically add them to the tool map schema. This is called
synchronizing the tool meta-schema and the tool map schema and occurs when the
Schema Editor connects to SmartPlant and the tool map schema is opened.
After the tool meta-schema and tool map schema have been synchronized, new definitions
can be added to the SmartPlant schema (EFSchema) and then mapped via the Schema
Editor.
7-8 Introduction to Schema Mapping
SPEL
Map SP3D
EF Schema
Map
Schema
SPEL Schema
Metadata
SPI Adapter
Map
Schema
SPI SP3D
Schema
Metadata Metadata
SPI Adapter
Editor
Adapter
SP3D
App X
Metadata
Adapter SPPID
SPPID
App X Map
Metadata
Map Schema
Schema Adapter
App X
SPPID
© 2008. Intergraph Corp.
All Rights Reserved.
Introduction to Schema Mapping 7-9
Add enum
extension to Tool
Map Schema Add enum
extension to
SmartPlant
Schema Map enum
2 extension in Tool
Schema
Another possibility is to use the schema editor and the metadata adapter to add any new
needed definitions to the schemas and the tool meta-schema from a single user interface,
the Schema Editor Map Environment.
Add enum
extension to Tool
Map Schema Add enum
extension to
SmartPlant
Schema Map enum
extension in Tool
Schema
Configurable mapping, in which the authoring tool supplies a tool schema that defines the
mapping between the tool schema and the SmartPlant schema and back, is not required for
all tools that participate in SmartPlant. Authoring tool developers can hardcode the tool
mapping in the tool adapter, although doing so is not recommended. The example in this
chapter is only relevant for tools that implement configurable mapping.
Introduction to Schema Mapping 7-11
In the Select Entry list, scroll to the bottom of the list to the empty row, and add an entry.
Type Corrosive as the Value and Short Value.
The Fluid Code select list is dependent upon the Fluid System select list. Next, add new
fluid code values that will be available when the fluid system is Corrosive.
Select the Fluid Code select list and open the Select Entries view. Scroll to the bottom of
the window to the empty row and add the new fluid code values.
Click the Add Row button, and then add the next fluid code value.
When you finish adding your new fluid codes, save your changes.
Once the changes have been saved, close the Data Dictionary Manager.
Once you find the file, use the standard Edit > Check Out command from the shortcut
menu.
Once you have checked out the file and copied the CMF file locally, right-click the
checked out version of the CMF file and use the Launch Schema Editor command to
open the Schema Editor, with the applicable connection information for this site.
This command opens the CMF file in the schema editor using a new session file. You can
save the session file at any time. Once it is saved, you can close the Schema Editor and
reopen it using that session file until you check the CMF file back into SPF.
When you launch the session file in the Schema Editor, you reopen that tool with the same
connections and interfaces active as when you saved the file. For example, using the
Launch Schema Editor command opens the schema editor, but it also connects to the
appropriate schema files for the site in which you are working. Reopening the session file
reconnects to that schema.
7-20 Introduction to Schema Mapping
The Set Active Configuration dialog appears. The CMF file contains a number of
different schemas. You must indicate which of these schemas you want to open and work
with.
Since we are using tools that are version 2009, we want to open the 2008 schema rather
than the 2007 version of the schema.
Note:
• You may select multiple schemas, if you wish, but remember that
you will see only those objects that exist in ALL the schema
selected. Objects that appear in some but not all of the selected
schemas will not be displayed by the software.
• By default, the software saves all your changes to all the SmartPlant
Schemas. If you want to change that for some reason, you can click
the Advanced button and deactivate one or more schemas to which
the changes will be made, or you will be prompted where to save
changes when the save occurs. However, it is recommended that
you save your changes to all schemas, as this will simplify later
upgrades.
Introduction to Schema Mapping 7-21
The following warning message will appear once you have dismissed the Set Active
Configuration dialog box.
Once you have launched the Schema Editor tool, you may close the SmartPlant
Foundation Desktop Client if you wish.
7-22 Introduction to Schema Mapping
When the Scheme Editor application opens, click File > Session Files > Save Session
File to save the session file with the following configuration. In the future, until you check
the CMF file back into SPF, you will be able to launch the Schema Editor and use this
session file to connect to the appropriate schema files without having to launch the file
from the Desktop Client again.
In addition to the information necessary to connect the Schema Editor tool to the site’s
CMF file, the session file also contains information for connecting to the metadata
adapters and tool map files for authoring tools with plants registered with plants in the site
from which you launched the CMF file.
Dismiss the warning message that tells you about applications for which there are not
metadata adapters.
On the Engineering Applications dialog box, a list indicates the tool map schemas and
metadata adapters that are available for this SmartPlant site. Choose the tool for which
you want to open the metadata adapter. Also check the Load map schema check box to
indicate that you want to load the tool’s map file. The Connect to application schema
check box is automatically activated for you. This option connects to the tools database
structure to compare it with the tool map file.
You may activate the Automatically synchronize schemas check box if you want the
metadata adapter to synchronize the tools metaschema (database structure) and tool map
schema without providing you with a list of the changes prior to making the changes.
The Synchronize dialog box shows the differences found between the tool meta schema
and the tool map schema. Click OK to synchronize the tool schema and the map file.
Find the Fluid System list, and select it. Click the Edit Form tab, and then click the
Publish tab.
Choose a value of the Fluid System list on the SmartPlant side of the dialog box. Right-
click the value, and choose the Create EnumListType command to create a new list.
Create the new Corrosive list, providing a name and long description for the list.
You can create the list entries (enum enums) manually, or you can copy the applicable
information to the clipboard and use the Import Entries from Clipboard button to
automate the process.
The following charts show you the mapping icons that are available in the middle pane
and define their use.
VBC1
Confirm that the mapping was created successfully by checking the bottom window.
While the previous steps mapped the Corrosive value for the Fluid System list, we still
need to map the new values for the Fluid Code list.
Introduction to Schema Mapping 7-37
From the Map Environment, scroll up the SmartPlant P&ID Map Enumerated Lists to
the Fluid System option. Again, open the Edit Form view, and go to the Publish tab.
Select the new values on each side and use the map button to map them.
Repeat that last step for each value, as each enum enum must be mapped one at a time.
Confirm that all the fluid codes are mapped.
You are first prompted to save the changes to the CMF file. These changes include the
addition of the new enum list type and enum enums to the SmartPlant Schema, so you
click Yes to save the changes.
A warning message appears if you have not run validation on your changes. Validation
will be discussed in a later section of this guide. For now, click Yes to continue.
You are next prompted to save the changes to the P&ID map file. The changes to this file
include the additions made by the metadata adapter during the synchronization process
and the mapping information. Click Yes to continue.
Again, a warning message appears if you have not run validation on your changes.
Validation will be discussed in a later section of this guide. For now, click Yes to
continue.
The way you will extend the SmartPlant Schema will be determined by what changes you
need to make. For example, we have just seen an example of extending an existing list.
However, if you want to create whole new classes of objects, you need to plan how to
model the new class – what interfaces should it realize, what properties should be
available, what objects should it have relationships to.
If you are extending an existing enumerate list, you need to find the existing list in the
SmartPlant Schema, and if you are adding custom properties to be shared, you need to
analyze the schema to determine what interface should expose the properties.
Schema Analysis
In the remaining chapters, we will be adding
custom properties to SmartPlant Enterprise tools
and creating mapping to get that information into
SPF.
In the following chapters, we will see how to extend the SmartPlant Enterprise tools to
publish and retrieve custom properties. Before we can do that, we will need to determine
the best way to model those new properties in the SmartPlant Schema.
Two basic options are available: we can add the custom properties to existing interfaces or
we can create custom interfaces for our properties.
7-44 Introduction to Schema Mapping
In the first option, we would need to find an interface that is either already realized by the
class definitions for the objects we want to use the properties, or that can be added to any
of these class defs.
Schema Analysis
Existing/Delivered Interface –find an existing interface
that is already realized by all the class definitions that you
want to have access to this property.
Method:
1. Create a list of all the objects that should have this
property and find the correlating class defs. Remember
that an object shared across multiple tools will have
multiple class defs: For example, an instrument from
SPPID is a PIDInstrument, but an instrument from SPI
is an INDXInstrument.
2. Compare the interfaces realized by each of these class
defs until you find an interfaces common to all. Add
the custom property to that shared interface.
With the second option, we can create a custom interface for our new properties and can
then add it to all the class defs to which we want to add those properties.
Schema Analysis
New Interface –create a custom interface just for the
custom properties you are adding to the system.
Method:
1. Create a list of all the objects that should have this
property and find the correlating class defs. Remember
that an object shared across multiple tools will have
multiple class defs: For example, an instrument from
SPPID is a PIDInstrument, but an instrument from SPI
is an INDXInstrument.
2. Create a custom interface and make sure that it is
realized by all the class defs from the list above.
Note: You will also want to make sure that the primary
interfaces of those class defs imply your new interface.
For our activities, we will use the second option and create a custom interface with the
sole purpose of exposing our new properties. For this method to work, we need to make
sure that our interface is realized by all the class defs of objects that will use this property
and also be implied by all the primary interfaces of those class defs.
7-46 Introduction to Schema Mapping
Find the session file that you save when you first launched the CMF file from the Desktop
Client.
You will be prompted to choose which schema or schemas you want to view in the
Schema Editor. Choose one or more of the available schemas.
Use the Workflows menu to choose the user interface you want to use.
From the Standard Workflow, click the open the Editor view of the Schema tab.
For now, we only want to create the new interface. Later we will make sure it is realized
by the class defs using the properties and implied by the appropriate interfaces. Provide
the necessary information to create the interface – a name and implied interface definition
(IObject).
Save your changes to the file and save the session file so that you can connect with it
again later.
Introduction to Schema Mapping 7-51
SPPID
EF Schema Map
Schema Editor Schema
SPPID
Metadata
Adapter
SPPID
In this case, the new custom property will first be made in the SmartPlant P&ID
application using the Data Dictionary Manager tool. There is a specific reason for
approaching the problem in this manner. The property to be added could be used by
several different types of objects in SmartPlant P&ID: instruments, instrument loops,
nozzles, pipe lines, and so forth. Since the new property will be used as a “global” Plant
Item item type property, it can be added to the Plant Item table in the data dictionary,
which makes it available to other classes through inheritance. The PlantItem item type is a
classification that provides common relationships and attribution for all the types of
objects that may exist independently of any other object. This item type is derived from
the ModelItem class. The subclasses of ModelItem include all those types whose
existence is not dependent on another.
Once the new property has been added with the Data Dictionary Manager, the schema
editor is used to read this new property from the application, also called the tool meta
schema. This is accomplished by a part of the software known as the metadata adapter.
8-4 Mapping with SmartPlant P&ID
The task of the metadata adapter is to extract information from the meta schema and
automatically update the contents of the tool map schema so that the meta schema and the
tool map schema are synchronized.
SPPID
Meta-Schema
SmartPlant
Schema
Mapping
SPPID Map
Schema
SPF
Database
• Changes are added to the SPPID Meta schema via the Data Dictionary Manager
(new property defined).
• Any changes are automatically added to the SPPID Map Schema when the
schema editor synchronizes the schema files.
• The same changes are added to the SmartPlant Schema using the schema editor
Map Environment.
• Any unmapped changes to the schemas can be mapped using the schema editor in
preparation for publish/retrieve operations.
This allows for the smooth flow of published data from SmartPlant P&ID into the
SmartPlant Foundation database.
Mapping with SmartPlant P&ID 8-5
After you select the table that you want, you can add a property to that table.
The Add Property dialog box appears. Define information for the new property on the
Add Property dialog box.
When you click OK, the list of properties for the Plant Item table updates with the new
property.
After you add the property, save your changes to the SmartPlant P&ID meta schema.
Click the File > Exit command to close out of Data Dictionary Manager.
Add a Property
to Tool Map
Schema
Add a Property
to SmartPlant
Schema
In the previous activity, we checked the CMF file out of SmartPlant Foundation and
launched the Schema Editor from that tool. Once it was open, we saved the session file so
that we could reopen it again later.
8-10 Mapping with SmartPlant P&ID
To reopen the session file, open the schema editor application in the Developer mode.
Using the Session Files button at the bottom of the window, open the session file you
saved early. Typically, this .eds file is stored in the My Documents folder.
With the session file open, move to the Metadata Adapter tab of the window. Click the
SmartPlant button, and choose the Edit Engineering Tools Options command.
A information message may appear. This message just notifies you whether you have any
tools registered with your plant that do not have metadata adapters. Click OK to continue.
Choose the SmartPlant PID metadata adapter, and turn on the check boxes for loading the
map schema (tool map file) and connecting to the application schema (tool meta schema).
Note:
• If you wish, you can also select the Automatically synchronize
schemas command to skip the Synchronize dialog box. However,
with this selection, the software will not show you what changes
will be made, and you will not get to choose whether the changes
are made to the application schema or the map file.
Mapping with SmartPlant P&ID 8-13
Another information message appears. This message indicates that the metadata adapter
may let you push changes to the tool database without going through the software
designed to manage tools database changes.
The Synchronize dialog box displays the differences between the tool meta schema (tool
database) and the tool map schema (tool map file). Where differences are found, the
software shows you the name of the object that exists in only one of the two locations, and
it gives you up to two options of what you want to do to synchronize.
Two columns represent the database and the map file. When an object is found in the
database, you can choose whether to add it to the map file or to remove it from the
database. Similarly, if the object is found in the database but not the map file, you can
choose to add it to the database or remove it from the map file.
For our example, the metadata adapter finds the System Code property in the tool
database, but not in the map file. We will choose the options to add the new properties to
the map file.
Click OK to accept the selections.
However, we are not ready to set up the mapping. We need to add our new property to our
new custom interface, but we first need to make sure that our custom interface is defined
so that the properties we expose with it are available to our class defs.
Once we have a list of the objects that we want to have our property, we need to perform
some research in the SmartPlant Schema to determine what class defs define those
objects.
Mapping with SmartPlant P&ID 8-17
Find the map class of the type of object and, using the Properties view, find the
SmartPlant class defs to which the map class is mapped.
Then, from the Schema tab on the left side of the window, find those class defs and
determine the primary interface for each applicable class def.
Once you have found the applicable class defs and primary interfaces, we are ready to
update the custom interface for our custom properties.
From the Edit Form view of the ICustomInterface object, add the class defs that should
realize the interface and the primary interfaces that should imply the interface.
The information below includes the list of relationships to create for the interface.
Once you’ve made the necessary changes to the custom interface, we are ready to return
to the tool map file, but returning to the Tool tab of the Map Environment. We can
actually add the new properties from the same GUI that we use for creating our mapping
relationships.
Find the map class for which you want to map the new property. Open the Edit Form
view for that map class, and go to the Publish tab.
The new property is found in the tool map file, but not in the SmartPlant Schema.
Create the new SystemCode property, being sure to expose it on the ICustomInterface.
Map Property in
Tool Map
Schema
To create a map relationship between two properties, select the property on each side – the
tool map file (left) and the SmartPlant Schema (right) – and click the Map button.
After mapping, check the control at the bottom of the dialog box to confirm the map.
Confirm the mapping before repeating the process for other map classes.
Once the modified files have been saved, you can close the Schema Editor.
Next, define a property that has a select list associated with it. Before you create the
property, create the select list for association with the property.
Mapping with SmartPlant P&ID 8-33
You can add a new select list by typing the name of the list in the blank row at the bottom
of the Select List table.
All that is required to define a new select list is the name of the select list. To define
entries for the new select list, click the Select Entry button. Add the first select entry to
the list by typing it in the first row of the table.
1
© 2008. Intergraph Corp.
All Rights Reserved.
After you add the last entry to the select list, create the property with which you want to
associate the select list. To create the property, click the Database Tables button then
select Plant Item in the list of database tables.
Mapping with SmartPlant P&ID 8-35
This adds the new EngSystem property to the Plant Item table. Choosing Select List as
the data type allows you to select the appropriate list in the Select List box.
The new property will use the custom select list, EngSys, defined earlier.
8-36 Mapping with SmartPlant P&ID
When you click OK, the list of properties for the Plant Item table updates with the new
property.
Mapping with SmartPlant P&ID 8-37
After adding the property, save the changes to the SmartPlant P&ID meta data.
Find your saved session file to connect to the SmartPlant schema for the plant for which
you are mapping.
With the session file open, go to the Application Metadata tab and click the SmartPlant
button. On the menu that appears, click the Edit Engineering Tool Options command.
Choose to open the SmartPlant P&ID tool map file and connect to the SPPID schema.
On the Synchronize dialog box, push the changes from the Data Dictionary Manager to
the SPPID tool map file.
Click the New SmartPlant Enumerated List with Correlated Entries button to create a
new list in the SmartPlant Schema that matches the select list from SPPID.
The new list has the same name and entries as the new select list from SPPID, and both
the list and the values are automatically mapped by the software. However, if you intend
to integrate this property with SmartPlant 3D, you will need to modify the number
assigned to the enum enums.
From the Publish tab, which is now available for the map enumerated list, right-click the
enum list type on the SmartPlant schema side. On the shortcut menu, choose the option to
edit the list definition.
Note: If you are not going to publish this list to or from SmartPlant 3D, this step is not
necessary.
For each of the enum enums, change the number to a value greater than 10,000.
The new property can be found in the tool map schema, but not the SmartPlant schema.
The Auto-create button creates a new property in the SmartPlant schema and maps it to
the property selected in the tool map schema.
The system creates a new property with the following default values:
Interface Definition – the primary interface of the class def to which the active map class
is mapped. In our example, the default value for this field would be IInstrumentOcc, but
we will change that value to the interface we created to expose our new properties,
ICustomInterface.
Property Name – the name of the property from the tool map file with a prefix that is the
active map class. In this case, the default value for this field is Instrument_EngSystem, but
since this property will be used for other types of objects besides instruments, we will
change the value to EngineeringSys. The name of the property in the tool map file and the
name of the property in the SmartPlant schema do not have to match for a mapping
relationship to be created.
Property Type – the name of the select list that was used for the original property from
the tool. In this case, since we have an enumerated list type in the SmartPlant schema with
the same name as the select list used for the property in the tool, the system provides that
list as a default property type for our new property in the SmartPlant schema.
Once you have modified the applicable information and clicked OK, the software creates
the new property and automatically maps it to the property in the tool map file.
Note:
• The name of the new property in the SmartPlant schema is not
displayed in the Mapped Properties control initially. However, the
name will appear during the next Schema Editor session. For the
remainer of the current session, the name displays as <<Not in
ViewDef>> for this map class, indicating that the property has not
yet been added to the on-the-fly view def displaying available
properties in the SmartPlant schema.
Find the next map class for which you want to map the property, and open the Publish tab
of the Edit Form view.
Find the new property in both the tool map file and the SmartPlant schema. Use the map
button to create the mapping relationship.
Confirm the mapping relationship, and repeat the process for all applicable map classes.
When prompted, save the changes to the SmartPlant P&ID tool map file.
When prompted, select the schema that will be the active schema.
The Schema Editor will open. Use the Tools > Schema > Validate > Display Results
command to validate just the active schema and check for errors that may not have been
found during the process of extending the schema.
Use the dialog box that appears to review all information messages, warnings, and error
found in the files. You can modify information from this window, as well.
If you want to save out a copy of the findings, specify where you want to write the results
file.
When you have finished reviewing the results, close the Schema Editor. Then, from the
Desktop Client, launch the CMF file and the Schema Editor again, but this time, choose
the other schema. The validation process validates only the active schema, so if you have
been writing your changes to both schemas, you should run the validation process twice,
once for each schema, before loading the changes.
Repeat the process for all schema files to which you have written changes.
During the check in process, you may remove the local copy of the CMF file, if you wish.
Removing the local copy will prevent confusion that might result from multiple copies of
the file. The session file you created will remain on your system and is not affected by the
check in process.
9-10 Loading and Testing the Schema Changes
When you use this command, the system will create a new task for the scheduler and will
begin this process immediately – without any information or confirmation dialog boxes. If
you want to check to ensure the task has started, review the scheduler tasks, as illustrated
below.
Click Finish.
From the scheduler tasks list, find the task called Generate Schema Files and make sure it
has a status of Processing.
This command launches the Build Support window. Because this is SPF version 2009, we
will choose the latest version of the CMF file. Note the location where the XML file will
be placed. Click Export to begin creating the file.
Specify that you want to compare the contents of the selected file against the database,
and find the file you just created to use for the comparison.
The Comparison window shows the differences found between the XML file and the
current SPF database. Select the changes you want to make, and click Next.
The Review Changes window shows the changes that have been loaded into the database.
The SmartPlant P&ID Open window will appear. The registered plant to be used for the
publish operation is SPFHSV. Select the area and unit beneath that plant, and find the
Aberrant.pid drawing in the right-hand pane.
Repeat the process for other objects in the drawing, such as nozzles.
Once you have modified the values multiple objects, save your changes to the drawing.
In some cases, this command will require that you log into SmartPlant Foundation.
Provide a valid username for SPF.
The standard Publish dialog command appears. Click OK to begin the publish process.
When the publish process is complete, the following message will appear.
Once you have found the published P&ID drawing, right-click on it and use the Files >
Save Target As command.
Choose which of the four attached files you want to copy out. You need only copy the
FileToolData XML file. Be sure to note where the file will be placed.
You can open the data XML file and check to make sure you new data was published.
Open the file in an Internet Explorer window or another XML viewing application.
Since the System Code property is a string value, you should find the value you provided
in SPPID. The EngineeringSys (name in SP schema) property is scoped by an
enumberated list; you will see the UID of the selected enum enum in the XML file.
SmartPlant
SmartPlant P&ID
Instrumentation
SmartPlant Foundation
© 2005. Intergraph Corp.
All Rights Reserved.
10-4 Mapping with SmartPlant Instrumentation
SmartPlant P&ID
2
SmartPlant
Instrumentation
In this example, two authoring tools are being extended so both will be modified in order
to complete the extensions.
Mapping with SmartPlant Instrumentation 10-5
The Data Dictionary Manager application window will appear. Choose the Select Entry
list.
Select the last entry in the list view and type “Preconstruction” as the Value and Short
Value.
These steps will all be accomplished in the Schema Editor. If you currently have the CMF
file checked out, launch the Schema Editor and open the existing session file.
If you do not currently have the CMF file checked out, launch the SmartPlant Desktop
Client, and check out the CMF file. Then launch the Schema Editor from the shortcut
menu of the checked out CMF file.
10-10 Mapping with SmartPlant Instrumentation
Once in the Schema Editor and viewing the applicable session file, launch the Overall
Workflows and go to the Application Metadata tab. Click the SmartPlant button and
choose the Edit Engineering Tool Options command.
Choose the SmartPlant P&ID map file and specify that you want to open the map file and
connect to the tool application schema. Click OK to begin the synchronization process.
The differences between the two schemas are displayed in the Synchronize form. For
each difference the user must select (each one has a system-determined pre-selection)
which synchronization action to perform.
Find an existing enum enum, right-click on it, and use the Create New EnumEnum
command.
Provide information about the new enum enum that will be contained in the New
EnumListType.
Once all the modified files have been saved, close the Schema Editor.
The logon dialog box will appear. Log in as DBA with a password of DBA.
When the Open window appears, choose a plant/unit from the displayed tree.
From the SmartPlant Instrumentation application window, open the Instrument Index
module.
The Instrument Index Module window will appear. Click Tables > Instrument Statuses.
The Instrument Statuses dialog will appear. Click the New button to create a new row.
Enter the new picklist information in the new row at the bottom of the dialog, and click
OK.
Launch the Schema Editor application in the Developer mode. Again, this is assuming that
you currently have the CMF file checked out of the Desktop Client and an existing session
file available.
From the Overall Workflows, and use the Session Files button to open the existing
session file for the plant.
Go to the Application Metadata tab, and click the SmartPlant button. From the shortcut
menu, click the Edit Engineering Tool Options command.
From the list of available tool map files, choose the file for SmartPlant Instrumentation
(INtools). Use the check boxes to open both the tool map file and the tool application
schema.
The Synchronize dialog box shows the differences between the tool map file and the tool
meta schema. Click OK to update the tool map file.
Confirm that the status was mapped properly in the bottom of the window.
Verify the mapping relationship was created properly for the retrieve.
Open the Filter menu, and use the Select option to have the tree display Graph defs and
View Defs.
Drill down under ViewDefs, and find the view def called PIDInstrument.
Go to the Layout tab. Find the ConstructionStatus2 property from the IInstrumentOcc
interface, and activate the check box by it to add it to the view def.
If you want to also add the new properties – SystemCode and EngineringSys – select
those properties as well.
When prompted, save your changes to the SPI tool map file. This file is where mapping
relationship information is stored.
When prompted, save the changes to the CMF file. If you did not extend the view defs,
you will not be prompted to save this file.
Once the modified files have been saved, you can close the Schema Editor.
Once the file is checked in, right-click the object, and choose the Launch CMF File
Manager (XML) command to create an XML of the CMF.
On the Build Support dialog box, choose the SPF 2008 CMF file, and be sure to note
where the system will place the XML file it will create.
Return to the Desktop Client and start the Schema Import Wizard by clicking
Administration > Schema Import Wizard.
Specify that you want to compare a selected file to the database, and then find the XML
just created.
The Comparison screen shows you a list of the changes between the XML file and the
SPF database. Choose which changes you want to incorporate, and click Next.
The results screen shows you the changes that have been loaded into the database.
Reminder
• After this import process, the system will regenerate the
component schemas. If you want to test the mapping
immediately, you can regenerate the component schemas
manually.
Use the File > Open command to open a list of P&ID drawings.
The SmartPlant P&ID Open window will appear. The registered plant to be used for the
publish operation is SPFHSV. Drill down beneath that plant\area\unit, and find the
Aberrant.pid drawing.
Locate an instrument that has been placed in this drawing. Update this existing instrument
by using the new value for the construction status.
Save the change that has been made before publishing this document to SPF. To perform a
publish operation, use the Publish command from SmartPlant P&ID.
In certain situations, you may be prompted to log on to SPF. If prompted, provide a valid
SPF username and password.
A dialog box appears after some time to report success or failure of the publish operation.
Now that the document has been successfully published, exit from SmartPlant P&ID. In
the next section, this document will be retrieved into SmartPlant Instrumentation.
When the Open window appears, choose a plant/unit from the displayed tree.
The SmartPlant Foundation login dialog will appear in some cases, if the system user does
not have an account in SmartPlant Foundation.
When the retrieve dialog appears, enable the toggle box next to the previously published
document (from SPPID) to be retrieved by SmartPlant Instrumentation.
A dialog box will appear after some time to report success or failure of the publish
operation.
The instrument changes are not automatically applied by SmartPlant Instrumentation. You
must display the To Do List, which contains a list of all the changes needed to incorporate
the information from the publish operation into the SPI database.
To apply changes to the database, select the changes to be made, and click the Run
command.
A status icon will be displayed in the left most column as tasks are completed.
Once the tasks have been executed, use one of the browser windows to view the results.
Now that the document has been successfully retrieved and the selected tasks executed,
exit from SmartPlant Instrumentation.
The Open Administration Module dialog will appear. Select the radio button to access the
tool as a Domain Administrator and choose the access the SPF42_IN domain.
Use the Fields button to display the Custom Fields dialog where new UDF’s can be
added.
10-66 Mapping with SmartPlant Instrumentation
In the following example, the property SystemCode that was added to SPPID will be
added as an SPI UDF for the Instrument class.
Repeat the process to add the SystemCode UDF to the Instrument Loop class.
After the SystemCode UDF has been added, exit from the Administration module.
Display the Instrument Index browser in order to add the new UDF.
When the browser view appears, use the Manager button to change the default
configuration.
The Browser Manager window will appear. Expand the Instrument Index Standard
Browser, and select Default View. From the Default View window, select Style.
The available fields for this view will appear in the bottom portion of the window. Scroll
down to find the new System Code UDF, and click the Edit button.
Activate the View option for the System Code property to indicate that it should be
displayed in the Instrument Index Browser view.
Once the UDF has been added to the view, save the change.
Once the change has been made and saved, display the browser view and verify that the
new UDF has been configured correctly.
The Instrument Index Browser View will now include the new property.
You are now ready to exit SmartPlant Instrumentation and configure the mapping.
The Synchronize screen lists the differences between the two schemas.
In the Edit Form view, open the Retrieve tab. Find the custom property in both the tool
map file and the SmartPlant Schema, and click the Map button.
To create the mapping to publish the SystemCode property back out of SmartPlant
Instrumentation, return to the list of map classes and find
TEFPublish_InstrumentIndex_Instrument.
This time, from the Edit Form view, open the Publish tab. Find the SystemCode property
in the tool map file and the SmartPlant schema, and use the Map button.
Even though we were able to create the mapping relationship because of the Implies
relationships that already existed, we still have to make some modifications to the
ICustomInterface and update the applicable component schemas if the SPI adapter will be
able to process the integrated data.
Compare this list of objects to the SmartPlant Schema to determine which class defs they
correspond with, and for each class def determining the primary interface. Actually, the
Implies interface relationships already exist, but you must make sure that the involved
SmartPlant schema class defs realize the ICustomInterface.
Once the custom interface is modified, save the changes to all modified files.
Save the new property and the mapping relationships to the SPI map file.
Once your changes have been saved, close the Schema Editor.
On the Retrieve dialog box, find the P&ID drawing and activate its check box. You may
have to select the All documents radio button in the Show section of this dialog to see the
P&ID drawing in the list.
Review the list of updates and find the instrument for which you published a SystemCode
value.
Cancel the Properties window, and run the tasks in the To Do List.
Provide new values for System Code for one or more instruments.
From the bottom toolbar of the Report Preview window, click the Revisions button.
On the Revisions dialog box, click New to create a new revision of Instrument Index
Report.
On the Revise form, choose a revision scheme and a starting major revision. Click OK to
reserve the revision in SmartPlant Foundation.
Once the revision has been reserved, use the SmartPlant > Publish command to publish
the report.
Confirm the information as it appears on the Publish dialog box, and click OK.
Find the Instrument Index document published from SPI. Use the File > Save Target As
command from the shortcut menu to save out a decrypted copy of the file for viewing.
From the Save Target As dialog box, select only the check box of the FileToolData XML
file. Be sure to note where the file will be placed when copied locally.
10-98 Mapping with SmartPlant Instrumentation
Open the checked out data file in Internet Explorer or another XML viewer.
SPEL
EF Schema Map
Schema Editor Schema
SPEL
Metadata
Adapter
SPEL
As in the previous examples, the desired change will first be made in the SmartPlant
SPEL application using the Data Dictionary Manager tool. There is a specific reason for
approaching the problem in this manner. The property to be added could be used by
several different types of objects in SmartPlant SPEL; Electrical Motor, Cable, Wire,
Instrument, etc. Rather than add the same property multiple times, if the new property will
be used as a “global” Plant Item item type property, then it can be added to the Plant Item
table in the data dictionary but be available to other classes through inheritance. The
PlantItem item type is a classification that provides common relationships and attribution
for all the types of objects that may exist independently of any other object. This item type
is derived from the ModelItem class. The subclasses of ModelItem include all those types
whose existence is not dependent on another.
Once the new property has been added with the Data Dictionary Manager, the schema
editor will be used to read this new property from the application database, which is also
called the tool meta schema. This is accomplished by a part of the software known as the
metadata adapter. The task of the metadata adapter is to extract information from the meta
schema and automatically update the contents of the tool map schema so that the meta
schema and the tool map schema are synchronized.
Mapping with SmartPlant Electrical 11-5
The following example describes how to add a new simple property to the SmartPlant
SPEL data model.
When you open Data Dictionary Manager, the Database Tables view is already selected.
To select the database table to which you want to add a property, click the name of the
table in the list.
After you select the table that you want, click Edit > Add Property to create a property in
that table.
The Add Property dialog box appears. Define information for the new property you want
to create.
In this example, we will be adding a new property called SystemCode1, because the
SmartPlant Electrical database already contains a property called SystemCode.
Provide a name, a description, data type, and maximum length. Additionally, you can
specify a category to make it easier to find out property in the authoring tool.
Click the File > Exit command to close the Data Dictionary Manager.
Add a Property
to Tool Map
Schema
Add a Property
to SmartPlant
Schema
To synchronize our tool map file with our tool meta schema, we will use the metadata
adapter and the schema editor.
Even though our System Code property aleady exists in the SmartPlant Schema, we will
need to make changes to ICustomInterface. So we need to check out and launch the
plant’s CMF file from the SmartPlant Foundation Desktop Client.
In the following example, we have already been working with the checked out CMF file
and will open the Schema Editor in the Developer mode and launch the saved session file.
11-12 Mapping with SmartPlant Electrical
From the Overall Workflow, and use the Session Files button to access the Open Session
File command.
Launch the session file with the applicable connection information to the plant schema.
From the Application Metadata tab, click the SmartPlant button, and choose the Edit
Engineering Tool Options command.
Select the SmartPlant Electrical tool map file, and indicate that you want to connect to
both the tool map file and the tool application schema.
The Synchronize screen shows the differences in the two schemas and allows you to
choose what changes you want to make to correct these discrepencies.
We want to add the system code property to the following objects in SPEL.
From the Map Environment, go to the Schema tab on the left window. Under
InterfaceDefs, find the ICustomInterface. Open the Edit Form view.
Using the list below, make sure the interface is realized and implied by the class defs and
interface defs for the SPEL objects.
From the Map Environment window, expand the SmartPlant Electrical tool map file,
and find the Cable map class. Open the Edit Form. On the Edit Form, click the
Graphical Publish Mapping button to open another interface for creating mapping
relationships.
Use a drag and drop operation to create a relationship between the property in the
SmartPlant Electical map file and the property in the SmartPlant Schema. You can drag in
either direction.
Confirm the mapping. In the top portion of the window, you should see the mapped
properties connected by a line. The bottom portion of the window displays the same
information, only in a tabular format.
Repeat the process for other map classes where the property will be used – like
SignalRun.
You will be prompted to save the changes to the tool map schema.
If you saved your changes to the CMF file when you finished extending the
ICustomInterface, you will not be prompted to save the CMF file again, as the mapping
relationships are stored in the tool map file.
However, if you did not save your changes earlier, the following prompt will appear.
Once the schema file has been saved exit the Schema Editor.
Before we can create our new property, we must first define the new pick list that it will
use as its data type.
11-32 Mapping with SmartPlant Electrical
You can add a new select list by typing the name of the list in the blank row at the bottom
of the Select List table.
Mapping with SmartPlant Electrical 11-33
All that is required to define a new select list is the name of the select list. To define
entries for the new select list, click the Select Entry button. Add the first select entry to
the list by typing it in the first row of the table. Click the Add Row button at the top of the
window to add a new empty row and continue adding your new entries until you have
defined them all.
When you have defined all your entries, click the Database Tables button to return to the
screen where you will add your new property that will use the select list you just created.
To create the property, select Plant Item in the list of database tables, and click Edit > Add
Property.
Add the new EngSystem property to the Plant Item table. Choose Select List as the data
type and then choose the appropriate list in the Select List box.
The new property will use the custom select list, EngSys, defined earlier.
When you click OK, the list of properties for the Plant Item table updates with the new
property.
Mapping with SmartPlant Electrical 11-37
After adding the property, save the changes to the SmartPlant Electrical database.
Then click File > Exit, to close the Data Dictionary Manager.
The Synchronize dialog box shows the discrepencies between these two schemas and
allows you to indicate what changes to make to synchronize the files.
On the Overview tab, click the Browse button beside the Publish to field to select the
enumerated list in the SmartPlant schema to which you want to map the new list.
Find the EngSys enumerated list in the SmartPlant Schema, select it, and click OK.
Map the first value in the picklist by dragging and dropping the value from one column to
the other.
Repeat the same steps to map the other values in the picklist.
The interface that opens works just like the interface illustrated earlier in this chapter,
except that it allows you to view publish and retrieve mapping in the same dialog box. The
columns on the left and right-hand sides of the dialog box represent the tool map file,
while the column in the middle represents the SmartPlant Schema.
Drag and drop properties between the left and middle columns to create publish mapping,
or drag and drop properties between the middle and right columns to create retrieve
mapping.
Both types of relationships are also displayed in the tabular view at the bottom of the
dialog box.
Mapping with SmartPlant Electrical 11-45
Drag and drop the EngSystem property from the left column to the middle column to
create publish mapping for the property.
Repeat these steps for all the map classes where you want to publish the new property.
When prompted, save the changes to the SmartPlant Electrical Map file.
Since you made changes to the SmartPlant schema, you are not prompted to save the CMF
file.
You can now exit the Schema Editor.
Open SmartPlant Electrical, and retrieve a document that was published by SmartPlant
P&ID.
The progress message box will appear, followed by another information window when the
retrieval process is complete.
Open the To Do List and run the updates required as a result of the retrieve.
The new signals appear in the tree beneath the associated motor.
Click the browse button by the report template field to select a template to use.
11-54 Mapping with SmartPlant Electrical
When you return to the Register Report Common Properties dialog box, click the
browse button beside the Filter field.
Provide a name for the report, and make sure the Enable document for publishing check
box is checked.
Click New on the Document Properties dialog box to open the Revise dialog box.
On the Revise dialog box, select a Revision Scheme and specify the first major revision.
A message dialog box will indicate the progress of the publish process.
11-60 Mapping with SmartPlant Electrical
Confirm that the new information was published in the XML file.
12.1 Adapters
Each authoring tool has an adapter that processes information during the publish and
retrieve operations. One of the adapter's functions is to map information between
SmartPlant and the particular authoring tool. SmartPlant 3D currently has two
adapters: one for retrieving and another for publishing. The retrieve adapter for
SmartPlant 3D requires that each document type have a registry entry present. These
registry entries define the map file used and define callback objects that perform
additional processing. It is possible that each document type could have its own map
file. The retrieve adapter uses a map file, which is defined by tool schema files. The
publish adapter uses a tool schema file (generated from the SmartPlant 3D Catalog
Schema and supplemented with mapping information) and a schema called the
P3DComponent Schema, which is derived from the SmartPlant Schema.
When you work in an integrated environment with SmartPlant Enterprise, you must
publish documents containing the drawing data and relationships before other
authoring tools can share this information. You can publish your documents within
the Drawings and Reports task.
12-10 Mapping with SmartPlant 3D
Open the spreadsheet, locate the Fluid Code tab, and then locate the Gas Fluid
System. Insert a row under this Fluid System, add the information that was added to
the Schema files, and then add an “A” to add this value during bulkload. Save the
file.
This adds the updated entries for Corrosive to the load file for loading.
Next, create a Custom Interface XLS file to load the new custom properties into
SP3D.
The file D:\SPF_Training\SP3D\EFCustomProps.xls file will contain the
SystemCode and EngineeringSystem properties. Open this file to verify the
properties.
Specify the class defs that use will use the new custom interface.
The first step is to load the data using the Bulkload utility from SP3D. To do this
select All Programs > Intergraph SmartPlant 3D > Database Tools > Bulkload
Reference Data.
Mapping with SmartPlant 3D 12-21
Once the dialog is opened, you will need to select the codelists you wish to input into
SP3D. Click the Add button next to the codelist section. Browse to the directory
where you codelist xls files are located. The file names are AllCodeLists.xls (which
contains your new fluid system and fluid code values) and EFCustomCodeLists.xls
(which contains the new Engineering System enumerated list and values). Provide the
necessary connection information, and the name and path of the log file.
Click the Load button to start the bulkload process.
After the first load is complete, re-run the bulkload utility to load the custom
properties file. Remove the two codelist files from the list and add the property file to
the top section in the dialog. Change the Add, Modify, delete records in existing
catalog to Append to catalog. The other settings will be the same as the first load.
Once you have used the bulkload utility to add the new properties and lists to the
SmartPlant 3D schema, recreate the Design Basis. To do this, open the Project
Management utility for SP3D. It is located under All Programs > Intergraph
SmartPlant 3D > Project Management. Under the 3DPlant structure, open the
Reference Data section, and right-click on the node there. Click the Generate Design
Basis command. It will start the process and display a completed dialog when
completed.
The following progress bar will indicate the progress of the process, which can take
several minutes.
Mapping with SmartPlant 3D 12-25
The next step is to regenerate the Views for the Database. To do this, select the plant
you want to update from the tree on the left-hand side of the Project Management
utility window, and then click Tools > Synchronize Model with Catalog.
When the process is complete, the following confirmation dialog box will appear.
Click OK to continue.
Finally, from the Project Management utility, right-click on the plant, and click
Regenerate Reports Database.
The applicable database information will appear by default in the form illustrated
below. Click OK.
The following dialog will appear at the end of the report load.
From the Application Metadata tab, use the SmartPlant button to access the Edit
Engineering Tool Options.
Use the Synchronize dialog to push the changes to the tool map file.
Drill down under SmartPlant 3D in the Map Environment window and find the
Map Classes.
Under Map Classes, find the IUCustom interface on which you placed the custom
properties during the bulkload process. On the Edit Form window, click the Browse
button beside the Publish to SmartPlant class/interface field.
When you expand the ICustomInterface on the right side of the window, the new
properties will appear. Drag the property from the right and drop it onto the
corresponding property on the left side of the window
When prompted save the changes to the SP3D tool map file.
From the list box near the top, choose Piping Runs as the type of selectable object.
Next, move your cursor over the pipe run in the window, and right-click on it. From
the shortcut menu that appears, choose the Properties command.
The System Code and Engineering System fields should appear in the Standard
properties. Provide values for these two new fields.
Then, use the Tasks > Drawings and Reports command to change to the next task.
Note:
• The following steps show how to create a 3D model document in
SmartPlant 3D to publish it into SPF. In this class, the document has
already been created for us. We will republish the existing document.
However, this information is included to show how the document was
created and initially published.
Mapping with SmartPlant 3D 12-41
In the Management Console frame, right-click on the plant and click New.
From the list of new components, select Folder and click OK.
This time, from the New Component form, select the 3D Model Data option.
From the Filter field, select and click on the More option to open the Select Filter
dialog box.
Under Plant Filters, select the option labeled Everything, and then click OK.
Right-click on the 3D Model Data node. This time, click the Create Drawing option.
The empty drawing template will appears in the right-hand frame. Right-click on the
drawing template, and click Revise to start the process of creating the first revision.
On the Revise dialog box, choose a revision scheme and a first major revision, and
then click OK.
When the revision process is complete, right-click again on the drawing template.
Click the Update Now command to update the information in the drawing to be
published.
Note:
• This process may take a few minutes, and the software may not
provide a wait cursor to indicate that the update is in process. Please
be patient. When the update it complete, the red x in the drawing icon
will be replaced with a green check mark.
The green check indicates that the update was completed successfully.
Finally, right-click on the drawing template one last time, and click the Publish
command.
To verify the new properties published properly, find the published document in the
Desktop Client, and save the attached FileToolData xml file out of the SPF vault with
the Save Target As command. Open that file with the Notepad or an Internet Explorer
window, and find the new properties and their values in the file.
12-52 Mapping with SmartPlant 3D
Mapping with SmartPlant 3D 12-53