Example: Creating and Mapping a Complex Property for Smart Electrical - Intergraph Smart Electrical - 10 - Customization & Programming - Intergraph

Intergraph SmartPlant Enterprise Adapter for Smart Electrical

Language
English
Product
Intergraph Smart Electrical
Search by Category
Customization & Programming
Smart Electrical Version
10

The following example demonstrates how to create a custom select list in the Smart Electrical database and associate it with a new EngSystem property available to multiple plant items. It also illustrates how to add that same custom enumerated list and property to the SmartPlant schema and how to create publish mapping so that the property can be published from Smart Electrical.

Before You Extend the Smart Electrical Database

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

  2. Make a backup of the Smart Electrical database and the SPELMap.xml file located in the SmartPlant resources directory.

Create the New Engineering System 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 Electrical.

  3. Click Select List on the left side of the Data Dictionary Manager window.

  4. In the first empty row in the Select List table, type EngSys as the name.

  5. Select None from the Dependent List.

  6. Click Select Entry on the left side of the Data Dictionary Manager window.

  7. Under Selected List, select EngSys.

  8. In the first empty row, create a new entry with a value of AA and a short value of Steam Gen & Fired Htr, Water/Steam Side.

    8CompAAAddedMOD

  9. Click Add Row, and enter the following values, creating a new row for each:

    Value

    Short Value

    BA

    Steam Generator and Fired Heater, Air/Gas Side

    CA

    Ammonia/Urea

    DC

    Crude Oil Production

    EA

    Auxiliary AC Power Systems

    8CompListAdded

  10. Click Edit > Add Property .

  11. In the Add Property dialog box, create a new property with the following information:

    Property

    Value

    Name

    EngSystem

    Display Name

    Engineering System

    Data Type

    Select List

    Select List

    EngSys

    Default Value

    None

    Category

    Process

  12. Click OK.

  13. Click File > Save.

  14. Click File > Exit.

Launch Schema Editor and Synchronize the 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. In the Schema Editor, click File > SmartPlant > Edit Engineering Tool Options, and select Smart Electrical in the list of authoring tools to load the Smart Electrical tool map schema.

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

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

      11SEEngSysSynch

Add the New Enumerated List to the SmartPlant Schema and Map

  1. In the Map Environment, expand Smart Electrical > Loaded Map Schemas > Smart Electrical Tool Schema.

  2. Expand Map Enumerated Lists, and right-click EngSys.

  3. On the shortcut menu, select Edit EngSys.

  4. In the Edit Map Enumerated List Definition dialog box, select the Advanced tab.

  5. At the bottom of the dialog box, click New SmartPlant Enumerated List with Correlated Entries.

    AutoCorrelateAndMagicButton

    SHARED Tip This process creates an enumerated list in the SmartPlant schema with the same name and values as the list in the tool map schema. Additionally, the software will automatically map all the enumerations for publish. A dialog box will suggest that you can map the enumeration for retrieve as well. Click Yes to create both publish and retrieve mapping relationships, or No to create only publish mapping relationships.

  6. Click OK in the Create Enumerated List and Entries dialog box.

    SHARED Tip Depending on your selections on the Set Active Configurations dialog box when you launched the Schema Editor, you may be prompted to confirm that you want to create the new list and enumerations in multiple versions of the schema.

  7. In the Edit Map Enumerated List Definition dialog box, click OK.

  8. In the Map Enumerated Lists node, right-click EngSys.

  9. On the shortcut menu, select Edit EngSys.

  10. In the Edit Map Enumerated List Definition dialog box, select the Publish tab.

  11. Under SmartPlant in the upper right window, right-click EngSys.

  12. On the shortcut menu, select Edit <UID>.

  13. Click each entry, and under Overview, edit the number to match the values in the following table:

    Name/Short Description

    Number

    AA

    10111

    BA

    10112

    CA

    10113

    DC

    10114

    EA

    10115

    EditEngSys2

  14. Click OK.

The modification of the Number value of each enumeration is required for Smart 3D, which will determine the actual value assigned to each enumeration. No other authoring tools use this value.

Add the New Property to the SmartPlant Schema

  1. In the Map Classes node, right-click Motor.

  2. On the shortcut menu, select Edit SPEL_MOTOR.

  3. Select the Publish tab.

  4. Above Unmapped SmartPlant properties on the right side of the dialog box, click New Property Definition on the toolbar.

  5. In the New Property Definition dialog box, define the new SmartPlant schema EngineeringSys property.

    CreateEngSysPropertyInScheEdDLG

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

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

  6. Click OK.

  7. Under Unmapped application properties, select EngSystem.

  8. Under Unmapped SmartPlant properties, select EngineeringSys.

  9. On the toolbar, click Map .

    SPELMapEngSys

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.