Professional Documents
Culture Documents
SPAdapter SPI
SPAdapter SPI
Version 2009 R4
August 2012
DSPF1-PE-200086C
Copyright
Copyright © 2008 - 2012 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 from Intergraph
Corporation.
U.S. Government Restricted Rights Legend
Use, duplication, or disclosure by the government is subject to restrictions as set forth below. For civilian agencies: This was
developed at private expense and is "restricted computer software" submitted with restricted rights in accordance with
subparagraphs (a) through (d) of the Commercial Computer Software - Restricted Rights clause at 52.227-19 of the Federal
Acquisition Regulations ("FAR") and its successors, and is unpublished and all rights are reserved under the copyright laws of the
United States. For units of the Department of Defense ("DoD"): This is "commercial computer software" as defined at DFARS
252.227-7014 and the rights of the Government are as specified at DFARS 227.7202-3.
Unpublished - rights reserved under the copyright laws of the United States.
Intergraph Corporation
P.O. Box 240000
Huntsville, AL 35813
Terms of Use
Use of this software product is subject to the End User License Agreement ("EULA") delivered with this software product unless the
licensee has a valid signed license for this software product with Intergraph Corporation. If the licensee has a valid signed license
for this software product with Intergraph Corporation, the valid signed license shall take precedence and govern the use of this
software product. Subject to the terms contained within the applicable license agreement, Intergraph Corporation gives licensee
permission to print a reasonable number of copies of the documentation as defined in the applicable license agreement and
delivered with the software product for licensee's internal, non-commercial use. The documentation may not be printed for resale or
redistribution.
Warranties and Liabilities
All warranties given by Intergraph Corporation about equipment or software are set forth in the EULA provided with the software or
applicable license for the software product signed by Intergraph Corporation, and nothing stated in, or implied by, this document or
its contents shall be considered or deemed a modification or amendment of such warranties. Intergraph believes the information in
this publication is accurate as of its publication date.
The information and the software discussed in this document are subject to change without notice and are subject to applicable
technical product descriptions. Intergraph Corporation is not responsible for any error that may appear in this document.
The software discussed in this document is furnished under a license and may be used or copied only in accordance with the terms
of this license. No responsibility is assumed by Intergraph for the use or reliability of software on equipment that is not supplied by
Intergraph or its affiliated companies. THE USER OF THE SOFTWARE IS EXPECTED TO MAKE THE FINAL EVALUATION AS
TO THE USEFULNESS OF THE SOFTWARE IN HIS OWN ENVIRONMENT.
Intergraph is not responsible for the accuracy of delivered data including, but not limited to, catalog, reference and symbol data.
Users should verify for themselves that the data is accurate and suitable for their project work.
Trademarks
Intergraph, the Intergraph logo, PDS, SmartPlant, SmartMarine, FrameWorks, I-Convert, I-Export, I-Sketch, IntelliShip, INtools,
ISOGEN, MARIAN, SmartSketch, SPOOLGEN, SupportManager, and SupportModeler are trademarks or registered trademarks of
Intergraph Corporation or its subsidiaries in the United States and other countries. Microsoft and Windows are registered
trademarks of Microsoft Corporation. MicroStation is a registered trademark of Bentley Systems, Inc. Other brands and product
names are trademarks of their respective owners.
Contents
Preface .......................................................................................................................................................... 5
Example: Creating and Mapping a String Property for SmartPlant Instrumentation ............................ 55
Index ........................................................................................................................................................... 65
The following is a summary of the relationships between Tool objects and Schema objects in the
SmartPlant Schema.
Publish
SmartPlant Instrumentation allows a predefined list of documents to be published along with their
data, while other documents can be published without data.
In order for data to be published with a document, mapping must exist between the Tool Schema’s
properties and the SmartPlant Schema's properties. The mapping is done using the Schema
Editor.
A published document with data can be described using the following pseudo code:
1. Try to create a document object based on definitions present in the INtoolsMap.xml,
SmartPlant Schema files, and the SmartPlant Instrumentation database.
2. If the document cannot be created, then the document is not supported.
3. Load the ContextMap.xml file.
4. Get the Schema and document definition for the document’s ClassDef.
5. Get data for the document based on its associated interfaces and the relevant SmartPlant
Instrumentation database tables.
6. Create a collection of objects associated with this document.
7. Get the properties based on the collection of associated objects.
8. Compare the properties with the list of properties required for publishing (passed over to the
SmartPlant Adapter from SmartPlant Instrumentation) and publish only those needed.
Retrieve
A retrieved document with data can be described using the following pseudo code:
1. Search for document type by its UID.
2. Create a Task object and initialize its properties.
3. Get Tombstones (deleted items instructions).
4. Get ‘SameAs’ pairs.
5. Get the collection of objects associated with this document.
6. For each object in the collection, get its associated ClassDefs.
7. For each ClassDef, get the associated ClassDef from the SmartPlant Schema.
8. Get the objects associated with the SmartPlant Schema objects.
9. Create a task from Parent Task and Master Task.
10. Set the properties for the new task.
Retrieve Limitations
Currently, limitations exist in SmartPlant Instrumentation when it comes to retrieving documents.
Below is a list of known limitations.
Retrieving PD Cases – In the Process Data module in SmartPlant Instrumentation, it is
possible to define several cases for a single Instrument. The idea is to allow the instrument to
be configured in different ways and to allow the different configurations to be saved as Case 1,
Case 2, and so forth. Each case may hold a different set of Process Data parameters.
Currently, SmartPlant Instrumentation can only retrieve Instrument cases from SmartPlant
Foundation.
UOMs – A Process Data Sheet usually has several fields that have multiple values along with
their units of measure. For example, Temperature has Minimum, Normal, and
Maximum values and each value can have a different unit of measure defined. Currently,
SmartPlant Instrumentation cannot retrieve these values if each of them has its own unit of
measure. All three values must have the same unit of measure in order for SmartPlant
Instrumentation to successfully retrieve the data. The same goes for other fields in the
Process Data Sheet.
Objects (Classes)
Every object in the SmartPlant Instrumentation schema that needs to be published must have a
corresponding object in the SmartPlant Schema.
For the publish operation to succeed, every ClassDef Object in the tool map must have a relation
with an associated SmartPlant Schema interface. This relation includes a UID1 attribute with the
UID of the ClassDef object from the Tool and a UID2 attribute with the UID of the associated
interface from the SmartPlant Schema. This relation is defined as a MapClassToClass relation.
Similarly, when retrieving a document, an opposite relation must exist in the tool map –
ClassToMapClass. In this relation the UID1 attribute has the UID of the SmartPlant Schema
interface and the UID2 attribute has the UID of the Tool's ClassDef.
The same guidelines go for other entities in the Schema Hierarchy.
Following is a list of necessary attributes needed in order to properly define an object both in the
SmartPlant Schema and in the tool map.
SmartPlant Schema
General Definitions
Property Remark
Name/UID Should be a unique name. Cannot include spaces.
Display Name The actual name being displayed. Can include
spaces.
Model Definition ‘WorkBreakdownModel’ should be selected.
Component Schema New document types defined for publishing usually
belong to the ‘Generic Document Component’
schema.
Class Factory Definition ‘Schema Comp Factory’ should be selected.
Primary Interface Definition If a new document type is defined and it does not
have any specific interface that can be associated
with it, a new corresponding interface is created for
the new document type.
Realized Interface Definitions Every document type realizes the same following 5
interfaces:
IObject
IDocument
IDocVersionComposition
IReferencedDocumentCollection
ISPIBrowser
The 6th Interface is the Primary Interface mentioned
above.
INToolsMap
General Definitions
Property Remark
Name The object to be published should have the following
name format:
<Schema>_<Document Type>_<Object_Def_ID>
These values should be taken from the SmartPlant
Instrumentation database tables: Object_Schema,
Document_Type and Object_Def
Mapping Option When publishing documents with data, this option
should have include realize selected. T his allows
later being able to choose various interfaces with
properties needed for the specific class.
Property Remark
Publish using view definitions In this option the user chooses the classes /
interfaces (that is, containers of properties) in the
SmartPlant Schema which contain the properties that
need to be mapped to the INToolsMap class. After
selecting one or more interfaces, when choosing
Retrieve / Publish tabs, the list on the right includes
the properties from these interfaces in the SmartPlant
Schema. The selection in the tool – SmartPlant
Schema relationship determines the options in this
drop-down list.
Advanced Definitions
Property Remark
UID This property is taken from the Name property in the
General Definitions. ‘INTL’ is added at the beginning
of the UID. Once a name has been assigned to this
property, it cannot be altered.
Tool OID This property should have the following format:
INTL_<schema
ID>_<Document_Type_ID>_<Object_Def_ID>
Name Same as the Name property in the General
Definitions
Specialization Of The class that this object specializes.
Generalization Of The class that this object generalizes.
Mapping Option Defined in the General Definitions.
The user should not usually alter other properties that have default values and were not
mentioned in the description above, as their default values are acceptable.
Properties
Since the purpose of publishing a document along with its data is to publish the actual values in
the document, the next step is to make sure that all necessary properties are published.
Generally, after the Class object has been mapped to a relevant Class in the Schema, and after
the Class has been defined to realize a set of interfaces, these interfaces already include a set of
properties to be mapped. Most common properties are already mapped in the SmartPlant
Schema; however, there may be instances when the user may have to map new properties
manually.
Mapping properties in the INToolsMap is achieved in the Publish / Retrieve tabs of a Map Class
Definition dialog box.
The relation created for each new property is called MapPropertyToProperty. The direction of the
relation is from the INToolsMap to the SmartPlant Schema.
The opposite direction, from the Schema to the tool is called PropertyToMapProperty.
It is saved in the INTools map file.
The SmartPlant Instrumentation Tool Schema does not recognize a difference between
properties of data type Enumeration and properties of data type Unit Of Measure. In both cases,
the property is mapped to an enumerated list and the relation is known as
MapPropertyMapEnumList.
Enums
EnumList
As with previous examples, the attitude towards Enums with regard to inter-schema relations is
basically the same. For each enumerated list defined in the Tool schema there exists an
enumerated list in the SmartPlant Schema. The relation is known as MapEnumListToEnumList, if
the direction is from the Tool's Map to the SmartPlant Schema, or EnumListToMapEnumList, if the
direction is from the SmartPlant Schema to the Tool Map.
The handling of a property with a data type of Enumeration / UOM is carried out in the adapter in
the following manner:
1. A new property object is created based on the current property’s name.
2. If it is not empty, then its data is saved in the value attribute of the property.
3. If the property is identified as belonging to a specific hard-coded list of UOMs, then a certain
flag is set to True. Later, this flag is checked and if its value is True, then a UOM value
attribute of the property is set.
4. If the property is empty then it is checked for enumeration. If it is an Enum, then a flag
designating this is set to True.
The properties and relations for a MapEnumList can be viewed in the Edit Enumerated List
Definition dialog box.
General Definitions
Property Remark
UID The UID should be a unique name.
Name The name of the SmartPlant
Instrumentation enum list.
Enum Entry
For each enum entry that exists in the Tool map, there exists an enum entry in the SmartPlant
Schema.
The properties and relations for an Enum entry can be viewed in the Edit Enumerated Entry
Definition dialog box. The properties and relations for a MapEnumList can be viewed in the Edit
Enumerated List Definition dialog box.
General Definitions
Property Remark
UID A unique GUID number that is created
when a new Enum is created.
Name A description for the new Enum.
UOMList
The diagram below shows a representation of the objects and relationships that are relevant to the
mapping of Units of Measure (UOM). A MapUoMList is a specialized kind of MapEnumList.
Similarly, a MapUoM is a specialized kind of MapEnum. This is shown by the Implies relationships
in the diagram. A MapProperty with a UoM data type must be related to a MapUoMList.
The MapUoMList object corresponds to the IMapUoMListDef interface in the diagram above. In
general, there is a MapUoMList object in the Tool Schema for each SmartPlant Instrumentation
format type associated with a property that needs to be published or retrieved. The properties and
relationships for a MapUoMList can be viewed in the New Unit of Measure List Definition dialog
box.
General Definitions
Property Remark
UID A unique GUID that is created when
the new UOM is created.
Name The name of the SmartPlant
Instrumentation format type.
UOM Entries
The MapUoM object corresponds to the IMapUoMDef interface in the diagram above. In general,
there is a MapUoM object in the Tool Schema for each SmartPlant Instrumentation format that
needs to be mapped. The properties and relations for a MapUoM can be viewed in the Edit dialog
box that opens for a new UOM entry.
General Definitions
Property Remark
UID A unique GUID that is created when
the new UOM is created.
Name The name of the SmartPlant
Instrumentation format.
Relationships
Items in SmartPlant Instrumentation may have relationships with other items in SmartPlant
Instrumentation.
For example, a Rack may be created under a Panel, in which case the Panel is the ‘parent’ of the
Rack.
When an item in SmartPlant Instrumentation becomes a child of another item, the parent ID is
saved in a relevant column. Continuing the example above, the Rack's record in the
Object_Registry table will hold the Panel's ID in the Parent_Object_Id column.
In the above example a Parent – Child relationship scenario was given. However, there are also
relationships between siblings. For example, a Panel – Cable relationship, or a Wire – Terminal
relationship. These relationships are saved in special tables such as in the Wire_terminal table.
Currently, the adapter does not support these kinds of relationships.
When the SmartPlant Adapter retrieves the objects associated with a given Document, it executes
a query that returns the object’s information along with its relevant Parent_ID value. This enables
the Adapter to identify that a relationship exists between the current object and some other object.
When SmartPlant Instrumentation publishes a document, the SmartPlant Adapter, upon
encountering an object with a relationship, will create a relationship for it as follows:
Relationship Remark
UID A combined value of the UIDs of the
two objects that have a relationship
of the format: UID1_UID2.
UID1 Holds the UID value of the child.
Relationship Remark
UID2 Holds the UID value of the parent.
DefUID Holds the definition of this
relationship.
Currently, the SmartPlant Adapter only creates relationships for the following document types:
Instrument Index
Dimensional Data Sheet
Control System Configuration
Electrical Signal List
Instrument Parameters
Naming Conventions – SmartPlant Instrumentation allows the definition of a broad range of
naming conventions for a large set of objects.
However, when publishing or retrieving data, the following objects must receive special
attention:
Control System Tag
Instrument
Loop
P&ID, SmartPlant Foundation, and SmartPlant Instrumentation must be synchronized when
dealing with the above objects. Synchronization is achieved using the
NamingConventionMap.xml file.
This file ‘tells’ SmartPlant Instrumentation which interfaces and which properties it should use
when either publishing or retrieving one of the above objects. These properties define the
name of an object.
Process Data Sheets – SmartPlant Instrumentation can retrieve Process Data documents
along with their data; however, it cannot publish these document types with data. Only the
graphical version can be published.
Relationships – Upon publishing a document, the SmartPlant Adapter can only create
relationships that are currently hard-coded. For more information, see Relationships (on page
16).
Retrieve
A document in SmartPlant Instrumentation can be retrieved in two ways:
As published — Retrieves only the data that SmartPlant Instrumentation originally published,
along with the selected revision and version of the document at the time of publishing.
Retrieving ‘As published’ data retrieves the .xml file SmartPlant Instrumentation published
from the appropriate SmartPlant Foundation vault.
With the latest data — Retrieves the latest data associated with the selected document in the
SmartPlant Foundation database. If another, more-recently published document contains
updates to objects in the selected document, the software retrieves the most current data in
the SmartPlant Foundation database for those shared objects. When the latest data is
retrieved, SmartPlant Foundation generates an .xml file containing the published data.
When a document is retrieved with data, SmartPlant Instrumentation creates a set of tasks in the
To Do List that can be run to update the plant database.
The following document types can be retrieved:
‘SameAs’ Relationship
A ‘SameAs’ relationship is created when a document is retrieved and the adapter identifies that
there is a RemoteUID associated with the retrieved object in the document, meaning that another
tool has already published the object in the document.
In consecutive Publish operations, the function CreateSameAsRel of the adapter receives an
object from the list of objects associated with the published document and creates a relationship
for that object. This relationship is published to SmartPlant Foundation.
From that moment, the published document is considered a ‘Shared’ document among the other
tools.
This ‘SameAs’ relationship is stored in the Object_Remote_UID_List table.
This table holds, among other values, the Object_UID and Object_Remote_UID columns. These
columns also appear in the Object_Registry table.
Object_UID represents the object’s internal ID in SmartPlant Instrumentation whereas
Object_Remote_UID represents the corresponding object’s ID in SmartPlant Foundation.
SmartPlant
Properties that need Schema
conversion Direction Value IntoolsMap Value
From Schema Y 1
From Schema N 0
PD_PRESS_NOR, From Schema Absolute A
PD_PRESS_MIN,
PD_PRESS_MAX,
PD_VAP_PRESS_NOR,
PD_VAP_PRESS_MIN,
PD_VAP_PRESS_MAX,
PD_CRITIC_PRESS,
From Schema Gauge G
PD_PRESS_DES,
PD_PRESS_DES_MIN,
PD_PRESS_DES_MAX
UOM Conversions
When converting UOMs, the adapter receives the UOM_ID from the SmartPlant Instrumentation
database, and then it creates the ToolOID attribute by adding INTL_UOM_ to the UOM_ID.
According to the ToolOID, the adapter locates the relationship MapEnumToEnum in the
INToolsMap.xml and can then use the SmartPlant Schema's UID to locate the equivalent value in
the SmartPlant Schema.
Below is the UOM table along with the ToolOID as it appears in the INToolsMap.xml file:
Retrieved Tasks
When a foreign document is retrieved, the SmartPlant Adapter compares the objects in that
document to the data in the SmartPlant Instrumentation database and generates tasks in the To
Do List. A Create task is generated when a new item needs to be created. An Update task is
generated when an existing item needs to be modified. A Delete task is generated when an
existing item needs to be deleted. The SmartPlant Adapter depends on the data in the Tool
Schema to support the retrieve operation.
When a document is retrieved, the SmartPlant Adapter receives several objects / data containers,
among which are:
1. The document container that includes all of the published objects and relationships for that
document.
2. The tombstone container that includes information about deleted objects and relationships.
The SmartPlant Adapter iterates over all of the objects in the document container and performs
these actions:
Generate Update Task – The adapter searches for an existing SmartPlant Instrumentation
item to update. If an item is found, it generates an Update task in the To Do List. The
properties of the incoming object are compared against the properties of the existing item.
When differences are found, property updates are added to the task. The list of properties to
be compared is defined by the properties in the Tool Schema. Properties of type UoM are
handled separately.
Generate Create Task – If no item is found to update, a Create task is generated in the To Do
List. Property updates are added to the task for each of the incoming property values. The list
of properties to be added is defined by the properties in the Tool Schema.
Retrieve Relationships – The Class Retriever defines the types of relationships that are to be
retrieved for each data object.
The SmartPlant Adapter iterates over all of the objects in the tombstone container and
performs this action:
Generate Delete Task – The SmartPlant Adapter searches for an existing item in the
SmartPlant Instrumentation database that is correlated to the item that was deleted in the
other application. If such an item is found, a Delete task is generated in the To Do List.
Correlation
When we retrieve an object, we follow a standard procedure.
Basically, the process of retrieving a document involves the following general steps:
1. Find the document to retrieve according to its UID and register it.
2. Create a task object and initialize it.
3. Retrieve any deleted instructions (tombstones) associated with the objects of the retrieved
document. A loop goes over the collection of instructions. Each instruction has an object
associated with it.
4. Collect any ‘Same As’ pairs associated with the retrieved document.
5. Get the collection of objects associated with the retrieved document.
6. For each object in this collection, do the following:
a. Find the corresponding object (class) in the SmartPlant Schema.
b. Check whether the object has parents.
c. Create a task for the object only if the object has not been terminated. The task is created
along with its associated properties. Properties from the SmartPlant Schema are mapped
to properties in the INToolsMap using the PropertyToMapProperty relation.
d. For each end of a relation in the collection of relations of the current object, repeat steps
a-c.
Instructions
Create Instruction
SmartPlant Foundation generates a Create instruction for an item if the current item does not exist
in current project or in As-Built. The adapter runs a query that is executed in the SmartPlant
Instrumentation database, mainly on the Object_Registry table. The columns
object_is_terminated_flg, Eng_Proj_ID, and unit_ID set the appropriate flags which determine
whether or not a project or As-Built exists.
Delete Instruction
SmartPlant Foundation generates a Delete instruction whenever an item has been deleted. This
deletion is communicated from SmartPlant Foundation to any retrieving tool.
Once SmartPlant Foundation generates a delete instruction, a Tombstone document will be
passed to the retrieve logic.
The tombstone document will be filled with a RefUID, which is the design basis UID of the relevant
plant SP Item.
This logic creates Delete tasks for all items.
Once an object is deleted, the value of the flag Object_Is_Terminated_Flg in the Object_Registry
table is set to 1. The assumption here is that values are never deleted from the Object_Registry
table and therefore to distinguish items that have been deleted from items that still exist, this flag
was added. This flag can be cleared in the Admin tool.
Update Instruction
SmartPlant Foundation generates an Update instruction on those properties with null values that
previously had a value.
The tombstone container will hold all those properties for an object, and will be processed during
the update task execution, which will null the property’s value.
Resurrection Instruction
SmartPlant Foundation generates a Resurrection instruction when it notices that the SmartPlant
Instrumentation database is not synchronized with current values it received from another
application's published data.
Since SmartPlant Foundation identifies that the SmartPlant Instrumentation database needs to be
synchronized, it generates Resurrection instructions in the Tombstone document.
The SmartPlant Adapter, which receives these instructions during a retrieve, goes over all
available tasks in the To Do List. It removes deleted instructions which still exist there and have
not yet been processed and which are not synchronized with the current SmartPlant Foundation
database values (meaning that they are no longer needed).
The handling of the Resurrection instructions is done in the INtoolsEFAdapter module via the
function RetrieveTombstones().
Plug-And-Play Retrieve
The SmartPlant Instrumentation SmartPlant Adapter does not have problems dealing with
retrieving different document types. So long as the document type is properly defined in the
SmartPlant Instrumentation database, ContextMap.xml, INToolsMap, and SmartPlant Schema,
the Adapter has no problem retrieving it.
Log Files
The SmartPlant Instrumentation SmartPlant Adapter provides a means of debugging the tool by
means of log files. Logging is enabled via a flag located under the [API] section of the Intools.ini
file.
The flag is called Writelog. To enable logging, the value of this flag is set to 2. To disable logging,
the value of the flag is set to 0.
When logging is enabled, a log file with the following name format is created in the main folder of
SmartPlant Instrumentation:
‘TaskComp’ + 4 middle digits of the active session’s GUID + ‘.log’
The log file includes a list of all called functions, SQL statements, and objects that are created or
deleted.
Publish Modes
Publish Now
This mode is the default publish mode which instantiates an immediate publish.
Background Publish
This mode is enabled by selecting the "Background Publish" option in the CommonUI dialog box.
After clicking OK, the Adapter communicates with SmartPlant Foundation via the BatchPublish
parameter as to whether this mode is supported by SmartPlant Instrumentation.
This mode triggers SmartPlant Foundation to launch a different process for the publish to take
place. This process will maintain a second connection to the datapile.
This mode is especially useful in cases of a large publish operation where a user does not want to
wait until the whole process ends.
ToolBatch Publish
This mode is intended to enable the scheduling of publish.
This mode is not supported by SmartPlant Instrumentation.
ContextMap.xml
In this schema, documents are initially declared, whether for Publish or Retrieve. Each document
has a record (row) in the schema for the type of operation needed (Publish, Retrieve, and so
forth).
The record has the following attributes:
INToolsMap.xml
This schema includes mapping information between items in SmartPlant Instrumentation and also
between items in SmartPlant Instrumentation and SmartPlant Foundation.
The insertion of new records is performed using the Schema Editor.
NamingConventionMap.xml
Any naming conventions that need special attention when publishing or retrieving objects to or
from either P&ID or SmartPlant Foundation are defined in this schema.
SchemaCache.xml
This schema is generated by the EFCommonUI when a connection is established between the
SmartPlant Adapter and the EF Server.
TableSchema.xml
This schema provides information on the database of SmartPlant Instrumentation. It is used in the
Adapter for creating Joins between tables for SQL statements.
SPIMetaDataExtension.xml
This file is no longer supported.
IntoolsSPELMap.xml
This file is no longer supported.
DeltaV.xsl
This file is no longer supported.
The class name should have the following format (below is an example for Publish):
TEFPublish_<Document_Type_Name>_<Object>
For example, if InstrumentSpecificationBrowser is published and Instrument is one of the
objects associated with it, then the name of the class will be
TEFPublish_InstrumentSpecificationBrowser_Instrument.
This creates a SPMapClassDef entity in the INToolsMap.xml file.
3. In the Mapping option field, select Include Realized. This option imports the relevant
properties to the selected interfaces.
4. In the Publish using view definition field, select the appropriate view.
5. The previous step determines which elements are shown in the Publish to SmartPlant
class/interface option. Any other lnterfaces that include properties that are relevant to the
specific document should be chosen here as well.
The ToolOID text box includes an OID for the document which has the following format:
INTL_<SchemaID>_<Document_Type_ID>_<Object_Def_ID>
This creates a Relationship of type MapClassMapClass where UID1 includes the UID of the
Object and UID2 includes the UID of the new Class.
7. In the Specialization of text box, select the object that represents the Object_Def_ID.
8. In the Realizes text box, select all the interfaces that are relevant to this document. This
option creates relationships between the new class and the interfaces that have its relevant
properties for Publish / Retrieve. The relationship created is
called MapClassRealizesMapClass.
9. If certain properties are not mapped, use the Publish tab to map them to the relevant
properties in the SmartPlant Schema.
3. Fill in the appropriate fields. You can try looking at already defined classes to determine what
data to fill in.
4. Add the appropriate ClassDef that INtoolsMap class maps to. For example, if Instrument is an
object associated with the browser being published, then INDXInstrument should be defined
in the GenericDocumentComponent. Otherwise, the adapter will not find the properties to
publish.
5. This class (the INDXInstrument, for instance) should have all the interface definitions it needs.
If these are missing, they should also be defined under the InterfaceDef node.
Introduction
The Metadata Adapter is a tool that displays discrepancies between the SmartPlant
Instrumentation database and the INToolsMap.xml file.
For example, a certain property is defined in the SmartPlant Instrumentation database and is
missing from the INToolsMap.xml.
If these discrepancies exist, the Metadata adapter allows the user to synchronize the database
with the INToolsMap and to achieve a situation where all entities are mapped correctly between
the database and the Tool Schema file.
The Metadata Adapter consists of two modules:
SPI Metadata adapter – This module is responsible for making the necessary changes in the
INToolsMap.
SPI Broker – This module is responsible for making the necessary changes in the SmartPlant
Instrumentation database.
Synchronization
Synchronization is achieved as follows:
1. The Metadata adapter loads the following schemas into memory:
SPIMetaDataExtension.xml
INtoolsMap.xml
2. The SmartPlant Instrumentation Broker module is loaded.
3. The SmartPlant Instrumentation Broker connects to the SmartPlant Instrumentation
database.
4. The Metadata Adapter compares the values of properties or select lists in the SmartPlant
Instrumentation database with the values of properties in the INToolsMap.
5. A report is displayed showing the values to be added or changed at each end and suggests a
course of action.
Limitations
Currently, the Metadata Adapter supports only a limited list of hard-coded properties, which it can
compare and validate.
Below is a list of these properties:
CMPNT_HANDLE_NAME
CMPNT_HANDLE_DESC
CRITICALITY_NAME
CRITICALITY_DESCRIPTION
ELECT_EQUIP_TYPE_NAME
ELECT_EQUIP_TYPE_DESC
CMPNT_LOC_NAME
CMPNT_LOC_DESC
FREQUENCY_NAME
FREQUENCY_DESC
LINEAR_TYPE_NAME
LINEAR_TYPE_DESC
LOOP_FUNC_NAME
LOOP_FUNC_DESC
LOOP_TYPE_NAME
LOOP_TYPE_DESC
OPERATING_MODE_NAME
OPERATING_MODE_DESC
PROC_CONNECT_CLASS_NAME
PROC_CONNECT_CLASS_DESC
PROC_CONNECT_END_PREP_NAME
PROC_CONNECT_END_PREP_DESC
RATED_VOLTAGE_NAME
RATED_VOLTAGE_DESC
SIGNAL_TYPE_NAME
SIGNAL_TYPE_DESC
CMPNT_SYS_IO_TYPE_NAME
CMPNT_SYS_IO_TYPE_DESC
DIM_GRP_NAME
DIM_GRP_DESC
PROC_FUNC_NAME
Apart from the properties above, the Metadata Adapter can only synchronize UDFs (User Defined
Fields) belonging to the following SmartPlant Instrumentation items:
Instrument
Loop
Line
Panel
3. In the Open dialog box, expand the appropriate plant, and then select the lowest level in the
hierarchy.
4. Click OK.
5. Close Domain Explorer.
6. Click Modules > Instrument Index.
7. Click Tables > Instrument Statuses.
8. In the Instrument Statuses dialog box, click New to define the new enumerated list item.
9. In the Instrument Statuses dialog box, type PRC as the instrument status and
Preconstruction as the description, and click OK.
10. To verify the new instrument status has been added, click Reports > Tables > Instrument
Statuses. Find the new PRC values in the report that appears.
11. Click File > Exit, and when prompted, confirm that you want to close your SmartPlant
Instrumentation session.
5. On the Set Active Configurations dialog box, select the schema version that you want to
view.
For more options, click Advanced on the Set Active Configuration dialog box.
By default, changes to the SmartPlant Schema are written to all versions managed by the
CMF file. You can choose to write changes to only selected versions; however, that is not
recommended.
If you choose to view one version of the schema (Specify configurations to display
window), but write changes to all versions (Set Configurations for new
objects window), an information window appears when you click OK, indicating that you
will be prompted with every change to the schema to confirm that you want to write the
changes to all versions. Click OK to continue.
7. In the Schema Editor, click File > SmartPlant > Edit Engineering Tool Options, and select
INtools in the list of authoring tools to load the INtools tool map schema.
8. Under Startup options, select the Load map schema and Connect to application schema
check boxes, and click OK.
9. In each row in the Synchronize dialog box, the values in the tool database and tool map
schema columns indicate actions to correct inconsistencies between the tool metadata and
tool map schema. Select the appropriate action in each row, and then click OK.
Each row represents a discrepancy between the tool database and the tool map schema.
Default actions are blue when the Synchronize dialog box appears. However, if you
select a different option, it will become blue instead.
In many cases, only one operation is supported to synchronize the database and map
schema. For example, if a new property was found in the database, the metadata adapter
can add the property to the tool map schema, but it cannot remove the property from the
tool database.
Add the New Status Entry to the SmartPlant Schema and Map
1. In the Map Environment, expand SmartPlant Instrumentation > Loaded Map Schemas >
INtools Tool Schema.
2. Expand the Map Enumerated Lists node, and right-click Construction Statuses.
Construction Statuses is called Instrument Status in SmartPlant
Instrumentation.
3. Select Edit Construction Statuses.
4. Select the Publish tab.
5. In the SmartPlant section of the Edit Enumerated List Definition dialog box (upper, right
corner), expand the tree, and click Construction state > New > New.
8. Click OK.
9. In the SmartPlant tree, select Construction state > New.
10. Under Unmapped application enumerations, select Preconstruction.
11. Under Unmapped SmartPlant enumerations, select Preconstruction.
When you close the Schema Editor, the software prompts you to save your connection
information, user interface options, and loaded tool map schemas to a session file. Click Yes
in the message box to save the session file so that you can use it to return to this working
environment. However, you should not open a session file after launching the CMF file from
the Desktop Client.
If you save changes to the CMF file or a tool map schema but did not validate the changes
before exiting, the software displays an information message to remind you that the file
contains changes that have not been validated. Click OK to dismiss the message.
If you make changes to the SmartPlant schema, you must load the changes into the
SmartPlant Foundation database. For more information, see the SmartPlant Schema Editor
User's Guide.
Additionally, if you made changes to the SmartPlant schema, you should regenerate the
component schemas for the site before testing any publish or retrieve mapping relationships.
For more information, see the SmartPlant Schema Editor User's Guide.
4. Click OK.
7. In the first blank row, type the information for the SystemCode property, and click Apply.
9. In the Item Type list, select Loop, and enter the information for another SystemCode
property.
9. In the Style section at the bottom of the dialog box, click Edit and then scroll down to
SystemCode in the table.
Launch Schema Editor and Load the SmartPlant Instrumentation Tool Map Schema
The ICustomInterface must be realized by the class definitions that represent objects in this
authoring tool that will be publishing or retrieving the custom property. If you have not configured
ICustomInterface, see the Schema Editor User's Guide for more information.
1. In the Desktop Client, set your scope for the applicable plant, and then find the CMF file.
2. Right-click the CMF file, and then click Edit > Check Out.
3. Click OK in the Check Out dialog box.
4. In the New Items window, right-click the new version of the CMF file, and select Launch
Schema Editor.
5. On the Set Active Configurations dialog box, select the schema version that you want to
view.
For more options, click Advanced on the Set Active Configuration dialog box.
By default, changes to the SmartPlant Schema are written to all versions managed by the
CMF file. You can choose to write changes to only selected versions; however, that is not
recommended.
If you choose to view one version of the schema (Specify configurations to display
window), but write changes to all versions (Set Configurations for new
objects window), an information window appears when you click OK, indicating that you
will be prompted with every change to the schema to confirm that you want to write the
changes to all versions. Click OK to continue.
7. In the Schema Editor, click File > SmartPlant > Edit Engineering Tool Options, and select
INtools in the list of authoring tools to load the INtools tool map schema.
8. Under Startup options, select the Load map schema and Connect to application schema
check boxes, and click OK.
9. In each row in the Synchronize dialog box, the values in the tool database and tool map
schema columns indicate actions to correct inconsistencies between the tool metadata and
tool map schema. Select the appropriate action in each row, and then click OK.
Each row represents a discrepancy between the tool database and the tool map schema.
Default actions are blue when the Synchronize dialog box appears. However, if you
select a different option, it will become blue instead.
In many cases, only one operation is supported to synchronize the database and map
schema. For example, if a new property was found in the database, the metadata adapter
can add the property to the tool map schema, but it cannot remove the property from the
tool database.
5. Click New Property Definition on the toolbar above the Unmapped SmartPlant
properties section on the right side of the dialog box.
6. In the New Property Definition dialog box, define the new SmartPlant schema SystemCode
property.
When you close the Schema Editor, the software prompts you to save your connection
information, user interface options, and loaded tool map schemas to a session file. Click Yes
in the message box to save the session file so that you can use it to return to this working
environment. However, you should not open a session file after launching the CMF file from
the Desktop Client.
If you save changes to the CMF file or a tool map schema but did not validate the changes
before exiting, the software displays an information message to remind you that the file
contains changes that have not been validated. Click OK to dismiss the message.
If you make changes to the SmartPlant schema, you must load the changes into the
SmartPlant Foundation database. For more information, see the SmartPlant Schema Editor
User's Guide.
Additionally, if you made changes to the SmartPlant schema, you should regenerate the
component schemas for the site before testing any publish or retrieve mapping relationships.
For more information, see the SmartPlant Schema Editor User's Guide.
Appendix A – SmartPlant
Instrumentation Relevant Database
Tables for Integration
SmartPlant Instrumentation has a set of tables used by the SmartPlant Adapter that make up the
SmartPlant integration foundation in SmartPlant Instrumentation. These tables are as follows:
Object_Def
Object_Interface_Def
Object_Def_Interface_Def
Object_Interface_Columns
Object_Registry
Object_Rel
Object_Ref_Def
Object_Rel_Def_Document_Type
Object_Prop_Enum_Def
Object_Schema
Object_Schema_View
Import_Module
Tasks
Task_Properties
Object_Remote_UID_List
The following diagram depicts the relationship between most of the tables mentioned above and
other important SmartPlant Instrumentation tables that are not Adapter-specific but are important
for the Publish / Retrieve operations.
U
UOM Conversions • 23
UOM Entries • 16
UOMList • 15
UOMs (Unit Of Measure) • 15
Update Instruction • 37