Smart P&ID Example: Mapping a New String Property Starting in the Tool - Intergraph Smart P&ID - 10.0 - Administration & Configuration - Hexagon PPM

Intergraph SmartPlant Enterprise Adapter for Smart P&ID

Language
English
Product
Intergraph Smart P&ID
Search by Category
Administration & Configuration
SmartPlant Foundation / SDx Version
Smart Electrical Version
10
Smart P&ID Version
10
Smart Engineering Manager Version
11

The following sections illustrate how to add and define mapping for a simple string property called System Code for Smart P&ID starting in Data Dictionary Manager. This property does not have an enumerated list associated with it.

Before You Extend the Smart P&ID Database

  1. Make a backup of the SmartPlant Foundation site database and any vaults for the site.

  2. Create a backup of Smart P&ID, including a database backup from the plant level with reference data, an application-level data dictionary template (DDT), and a backup of the SPPIDDataMap.xml file located in the SmartPlant resources directory.

Create the New SystemCode Property in Data Dictionary Manager

  1. Click Start > All Programs > Intergraph Smart Engineering Manager > Data Dictionary Manager.

  2. Connect to the appropriate plant server for Smart P&ID.

  3. In the Database Tables list, select Plant Item.

  4. On the toolbar, click Add Property .

  5. In the Add Property dialog box, define information for the System Code property, and click OK. Be sure to select String in the Data Type list.

  6. Click File > Save.

  7. Click File > Exit.

Launch Schema Editor and Load the Smart P&ID 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 Creating a New Interface for Mapping Examples 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.

  6. Click OK to set the configuration.

    The CMF file must be checked in to SmartPlant Foundation before users can publish from an authoring tool.

    • 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 SMARTPLANTPID from the list of authoring tools to load the Smart P&ID 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 tool database and tool 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.

      Because the Smart P&ID tool map schema does not have a map class definition called Plant Item, the new property that you added appears on several map class definitions that inherit from Plant Item, such as equipment component and instrument loop.

Open the Instrument Loop Map Class Definition

Once the tool map schema is synchronized with the database, the Map Environment window appears, providing tools for creating mapping relationships to be stored in the tool map schema file.

  1. In the Map Environment, expand Smart P&ID > Loaded Map Schemas > Smart P&ID Tool Schema.

  2. Expand the Map Classes node, and right-click InstrLoop.

  3. On the shortcut menu, select Edit InstrLoop.

  4. In the Edit Map Class Definition dialog box, select the Publish tab.

    The Schema Editor creates a dynamic view definition that is used to display the SmartPlant schema properties. Selecting the mapped class will show all of the property definitions contained in the view definition.

Create the SystemCode Property in the SmartPlant Schema and Map

  1. Click New Property Definition on the toolbar above the Unmapped SmartPlant properties section on the right side of the dialog box.

  2. In the New Property Definition dialog box, define the new SmartPlant schema SystemCode property.

    • In the Exposed by interface definitions dialog box, click Browse, and select ICustomInterface as the interface definition that exposes this property.

    • In the Scoped by property type box, select string.

  3. Click OK.

  4. Under Unmapped application properties, select SystemCode.

  5. Under Unmapped SmartPlant properties, select SystemCode.

  6. On the toolbar, click Map .

  7. Click OK.

If the SystemCode property does not appear in the Unmapped SmartPlant properties list after you created and exposed it on the ICustomInterface interface definition, check the ICustomInterface definition to make sure that it is realized by the PIDInstrumentLoop class definition and implied by the IInstrumentLoop interface.

The view definition that creates the list of unmapped properties is generated by the software the first time you access the Edit form for a map class for each Schema Editor session. So, if you view the list, leave it, and make changes, such as adding additional interfaces to the class definition to which the map class is mapped, the changes you made will not appear when you return to this form because the view definition is not updated or regenerated. You will see the changes during your next Schema Editor session.

Map the SystemCode Property for Additional Map Class Definitions

Because multiple Smart P&ID classes inherited the SystemCode property, you can create additional mapping so that other objects can publish the property.

  1. In the Map Environment tree view, right-click Instrument, and then select Edit Instrument on the shortcut menu.

  2. Select the Publish tab.

  3. Under Unmapped application properties, select SystemCode.

  4. Under Unmapped SmartPlant properties, select SystemCode.

  5. On the toolbar, click Map .

  6. Repeat steps 1-5 in this section to map the SystemCode property for any Smart P&ID map class definitions that represent objects for which you want to publish this property.

To create a retrieve mapping relationship for a property, follow the same steps on the Retrieve tab.

Save the Tool Map Schema and SmartPlant Schema Changes

  • Click File > Save All Modified Files to save the SmartPlant schema changes (CMF file) and the tool map schema.

  • 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.

  • 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.