Smart P&ID Example: Mapping a New String Property Starting in the Tool - 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 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. Go to Start > All Programs > Intergraph Smart Admin > Data Dictionary Manager.

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

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

    8SimpleDDOpen

  4. On the toolbar, select Add Property to display the Add Property dialog.

  5. Define information for the System Code property, and select OK. Be sure to select String in the Data Type list.

  6. Select File > Save.

  7. Select 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 select Edit > Check Out to display the Check Out dialog.

  3. Select OK.

  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, select the schema version that you want to view.For more options, select Advanced.

  6. Select OK to set the configuration.

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

  • By default, changes to the SmartPlant Schema are written to all versions managed by the CMF file. Although you can choose to write changes to only selected versions, we do not recommend doing so.

  • 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 select 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. Select OK to continue.

  1. In the Schema Editor, select File > SmartPlant > Edit Engineering Tool Options, and select SMARTPLANTPID from the list of authoring tools to load the Smart P&ID tool map schema.

  2. Under Startup options, select the Load map schema and Connect to application schema check boxes, and select OK.

  3. In each row in the Synchronize dialog, 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 select OK.

    • Each row represents a discrepancy between the tool database and the tool map schema.

    • Default actions are blue when the Synchronize dialog displays. 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.

      8SESystemCodeSynchronize

    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

After 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, 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. Select New Property Definition on the toolbar above the Unmapped SmartPlant properties section on the right side of the dialog.

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

    CreateSystemCodePropertyDBPic

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

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

  3. Select OK.

  4. Under Unmapped application properties, select SystemCode.

  5. Under Unmapped SmartPlant properties, select SystemCode.

  6. On the toolbar, click Map .

    SysCodeReadyToMap

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

SHARED Tip 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, select 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.

SHARED Tip 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

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