The SmartPlant Adapter and Tool Schema - Intergraph Smart P&ID - 10 - Help - Intergraph

Intergraph Smart P&ID Help

Language
English
Product
Intergraph Smart P&ID
Search by Category
Help
Smart P&ID Version
10
Smart Engineering Manager Version
11
SmartSketch Version
10.0(2018)

The tool schema implements a mapping between the objects in the Smart P&ID data model and the objects in SmartPlant schema.  If you customize either the Smart P&ID data model or the SmartPlant schema, you may also need to customize the mapping contained in the tool schema.  The following describes the structure of the tool schema and how it is used by the Smart P&ID adapter in order to support the publish and retrieve functions.

Publish

When a P&ID drawing is published, the Adapter extracts data from the Smart P&ID database and converts it into a set of objects and relationships that are compatible with the SmartPlant schema. These objects and relationships are written out to an XML file and are sent to the SmartPlant Server for further processing. The adapter depends on the data in the tool schema to support the publish operation.

For each published class in the tool schema, there is a code module in the adapter known as a Class Publisher. The Class Publisher contains code for the following tasks:

  • Query the P&ID Database — The Class Publisher queries the database to obtain the collection of items to be published.

  • Create a Data Object — For each item to be published, the Class Publisher creates a data object in the document container. The class of this object is the SmartPlant schema class related to the MapClass via the MapClassToClass relationship.

  • Set the Property Values — The property values on the data object are set according to the values on the Smart P&ID item. The list of properties to be published is defined by the list of MapProperties related to the current MapClass.

  • Publish Relationships — The Class Publisher defines the types of relationships that are to be published for each data object it publishes.

Retrieve

When a document from another authoring tool is retrieved, the adapter compares the objects in that document to the data in the Smart P&ID 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 adapter depends on the data in the tool schema to support the retrieve operation.

Generation of Create, Update, and Delete tasks can, if required, be suppressed for specified document types, for example, for objects that are not correlated between the publishing and retrieving tools. For details of how to do this, see Suppress Generation of Tasks on Retrieve.

For each retrieved class in the tool schema, there is a code module in the adapter known as a Class Retriever. Each Class Retriever contains code for retrieving a class of objects.

When a document is retrieved, the adapter receives two containers of data.

  1. The document container includes all of the published objects and relationships for that document.

  2. The tombstone container includes information about deleted objects and relationships.

The adapter iterates over all of the objects in the document container and performs these actions:

  • Use Identifying Interface to Determine Class — The incoming object is tested for an identifying interface to determine which Class Retriever should handle the retrieval of that object.

  • Generate Update Task — The Class Retriever searches for an existing Smart P&ID 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.

  • 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 adapter iterates over all of the objects in the tombstone container and performs these actions:

  • Generate Delete Task — The adapter searches for an existing item in the Smart P&ID 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.

Smart P&ID Mapping Rules and Limitations

  • For properties that use enumerated lists to publish, you must add EFAdapter.EnumConversions to the process criteria when you define the map property definition in the tool schema.

  • When you create a new enumerated list definition in the tool map file, you must replace the system-generated UID for the list with SP_<Codelist_Index>, for example, SP_12001. The codelist index is located in the Enumerations database table for the Smart P&ID Data Dictionary user in the Smart P&ID database.

  • When you create enumerated list entries in the tool map file, you must replace the system-generated UID for each list entry with SP_<Codelist_Index>_<Codelist_Number>, for example, SP_12001_1. The codelist index for the enumerated list and the codelist number for the entry are located in the Enumerations and Codelists database table for the Smart P&ID Data Dictionary user in the Smart P&ID database.

  • If you want Smart P&ID to create line numbers at publish time so that they match the displayed labels on the P&ID, you can modify the process criteria for the ItemTag map property definition in the publish map for the PipeRun tool class. To change the format for line numbers, modify the process criteria for the ItemTag, and add the properties that you want to include in the item tag inside angle brackets (<>) after EFAdapter.PpConnNameConv. For example, EFAdapter.PpConnNameConv, <OperFluidCode>- <TagSequenceNo>-<NominalDiameter>- <PipingMaterialsClass>-<InsulPurpose>. The property names inside the angle brackets must match property names in the map file.

  • If you want Smart P&ID to create the Pipe Run name at publish time so that it matches the ItemTag value in the Smart P&ID Properties window, you can remove the special adapter method seen in the map file (as delivered it appears as EFAdapter.PpConnNameConv, <NominalDiameter>-<OperFluidCode>- <TagSequenceNo>-<PipingMaterialsClass>- <InsulPurpose>). This prevents the software from performing name conversion when generating the Pipe Run name.

  • You can specify for Smart P&ID to create the Pipe Run name at publish time so that it displays any pipe run properties that you require. To do this, you add the properties that you want to include in the item tag inside angle brackets (<>) after EFAdapter.PpConnNameConv. However, note that the name conversion supports only those properties that belong to the Pipe Run.

  • To ensure that data is published for the pipe ScheduleOrThickness property, you must specify the data so that it matches the entries in the 'Schedule or Thickness Standards' Enumeration list under the SmartPlant Foundation schema.