Defining a Document for Publish / Retrieve - Intergraph Smart Instrumentation - 13.1 - Customization & Programming - Intergraph

Intergraph SmartPlant Enterprise SmartPlant Adapter for Smart Instrumentation

Language
English
Product
Intergraph Smart Instrumentation
Search by Category
Customization & Programming
SmartPlant Foundation / SDx Version
10
Smart Instrumentation Version
13.1

This topic provides an outline of the steps needed to define a document so that it is published or retrieved properly.

It is assumed that you know how to use the Schema Configuration Wizard (spiscw.exe) and the Schema Editor applications.

Procedure 1 – Intergraph Smart Instrumentation Tables

Make sure the document to publish is present in the Document_Type table.

Procedure 2 – Using Schema Configuration Wizard

  1. Open the Schema Configuration Wizard (spiscw.exe), which resides in the Intergraph Smart Instrumentation installation folder.

  2. Select the document to publish or retrieve and associate the proper objects to it.

  3. For each object associated, select the interfaces to retrieve.

  4. Save the new definitions.

Procedure 3 – Using SchemaEditor – INtoolsMap.xml

  1. Open the INtoolsMap.xml file.

  2. Under the SPIMapClassDef node, create a class for each object associated with the document to publish (right-click the node and on the shortcut menu, select Create new SPMapClassDef).

    The following dialog box appears:

    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.

  6. Click the Advanced tab.

    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. The Select Criteria field on the MapProperty is used to indicate to the SmartPlant Adapter how to handle each property for both publish and retrieve. The format of the Select Criteria field is:

    • Select Criteria = <Retrieve Path>%<Publish Path>

    • <Retrieve Path> – A string that indicates where the property comes from during retrieve. If this value is empty, it means that the property comes from the primary object being retrieved (IPipingSystemConnector). If this property has a value, it means that this property comes from one of the secondary objects that is related to the primary object by means of a relationship.

    • <Publish Path> – A string that indicates where the property goes to during publish. If this value is empty, it means that the property is published to the primary object (PIDPipingConnector). If this property has a value (it should be equal to ‘ProcessPoint’), it means that this property is published to the related PIDProcessPoint object.

      For Smart Instrumentation, the Description field and the Select Criteria field in the Advanced tab of the Set Active Configurations dialog box can be empty, but if one field contains a value the other field must have the same identical value.

  10. This Process Criteria property field must be filled in for this MapClass to be used. The format for this property is a comma delimited list of fields. The fields are:

    • ProgID – The programmatic identifier of a class module within the P&ID EF adapter.

    • Expand Attributes Flag – A flag to indicate if the attributes should be expanded. The default value of most class definitions is False; thus, expanded attributes will not be published. To publish expanded attributes, change the value to True.

    • Seq No – A number that indicates the sequence in which the classes are processed. This field is used for Retrieve processing.

      Do not modify the ProgID or Seq No values. Use caution when modifying the Expanded Attributes flag. The default values that come with the delivered Tool Schema should remain unchanged. This should remain with out-of-the-box values. Deleting this field will result in ignoring the class from participating in the publish process.

  11. If certain properties are not mapped, use the Publish tab to map them to the relevant properties in the SmartPlant Schema.

Procedure 4 – Using SchemaEditor - <Relevant Component Schema>

In order to find the relevant schema for the published document, make sure that you are in the SmartPlant Schema. Search for the document in the ClassDef section.

When you find the schema, expand it and go to the ComponentSchema node. Expand the ComponentSchema node too in order to see the relevant component schema of the class.

For the purpose of illustration, the GenericDocumentComponent schema will be used.

  1. Open the GenericDocumentSchema.xml schema.

  2. Create a ClassDef for the document under the ClassDef root. The name of the class should be the same as the name of the document.

  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.

Procedure 5 – Updating the ContextMap.xml

The ContextMap.XML is used for retrieving only

  1. Open the ContextMap.xml file which is located in the XML folder of Intergraph Smart Instrumentation.

  2. Manually add a new row (you can copy an existing row and then modify it).

  3. The ID should include the first two values as described in Procedure 3.

  4. The SchemaName should be TEFRetrieve.

  5. The DocumentDefName attribute should include the name as described in the equivalent column in the Document_Type table in the Intergraph Smart Instrumentation database. This is also the name of the document in the SmartPlant Schema.

  6. The DocType attribute should include the UID that appears in the EnumListType node in the SmartPlant Schema (for that document name).

  7. The SubDocType attribute should include the UID that appears in the EnumEnum node in the SmartPlant Schema.

  8. Make sure the direction attribute is set to OUT.

Procedure 6 – Defining Relationships Between Items for Publishing EDEs

  1. Open the INtoolsMap.xml file using the Schema Editor.

  2. Under the SPMapClassDef node, create a relation for each object associated with the document to publish (right-click the node and on the shortcut menu, select Create new SPMapRelDef).

    The following dialog box appears:

  3. In the Name field, type the relationship name (normally the MapClass name).

  4. In the Map to field, select the EF relation name.

    The Tool OID field should have the following format:

    INTL_<MapClass>

  5. The Select Criteria field on the MapProperty is used to indicate to the SmartPlant Adapter how to handle each property for both publish and retrieve. The format of the Select Criteria field is:

    • Select Criteria = <Retrieve Path>%<Publish Path>

    • <Retrieve Path> – A string that indicates where the property comes from during retrieve. If this value is empty, it means that the property comes from the primary object being retrieved (IPipingSystemConnector). If this property has a value, it means that this property comes from one of the secondary objects that is related to the primary object by means of a relationship.

    • <Publish Path> – A string that indicates where the property goes to during publish. If this value is empty, it means that the property is published to the primary object (PIDPipingConnector). If this property has a value (it should be equal to ‘ProcessPoint’), it means that this property is published to the related PIDProcessPoint object.

      For Smart Instrumentation, the Description field and the Select Criteria field in the Advanced tab of the Set Active Configurations dialog box can be empty, but if one field contains a value the other field must have the same identical value.

  6. This Process Criteria property field must be filled in for this MapClass to be used. The format for this property is a comma delimited list of fields. The fields are:

    • ProgID – The programmatic identifier of a class module within the P&ID EF adapter.

    • Expand Attributes Flag – A flag to indicate if the attributes should be expanded. The default value of most class definitions is False; thus, expanded attributes will not be published. To publish expanded attributes, change the value to True.

    • Seq No – A number that indicates the sequence in which the classes are processed. This field is used for Retrieve processing.

      Do not modify the ProgID or Seq No values. Use caution when modifying the Expanded Attributes flag. The default values that come with the delivered Tool Schema should remain unchanged. This should remain with out-of-the-box values. Deleting this field will result in ignoring the class from participating in the publish process.

  7. In the Map class field of End 1, type the map class name for end 1.

  8. In the Map class field of End 2, type the map class name for end 2.