Example: Creating and Mapping a String Property for Smart Instrumentation - Intergraph Smart Instrumentation - 13.1 - Customization & Programming - Intergraph

Intergraph SmartPlant Enterprise SmartPlant Adapter for Smart Instrumentation

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

The following example demonstrates how to perform the following tasks:

  • Configure user-defined fields in Smart Instrumentation for use as system code properties for instrument and instrument loops,

  • Extend the SmartPlant schema to create the custom system code property, and

  • Create retrieving mapping relationships so that Smart Instrumentation can retrieve the property when it is published on an instrument in a P&ID drawing.

Before You Update the Smart Instrumentation Database

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

  2. Make a backup of the Smart Instrumentation database and the INtoolsMap.xml file located in the SmartPlant resources folder.

Define the SystemCode Property in Smart Instrumentation Administration

  1. Click Start > All Programs > Intergraph Smart Instrumentation > Administration.

  2. Log on to Smart Instrumentation Administration.

  3. Select Domain Administrator, and then select the domain name from the list.

  4. Click OK.

  5. Click Activities > User-Defined Tables and Fields Editor on the toolbar.

  6. In the User-Defined Tables and Fields Editor dialog box, select the Custom Defined Fields tab.

  7. From the Item Types list, select Instrument > Custom Fields.

  8. Select an available custom field.

  9. In the Definition type the information for the SystemCode property.

  10. In the Item Type list, select Loop, and enter the information for another SystemCode property.

  11. Click Save All.

  12. Close the User-Defined Tables and Fields Editor.

Add the SystemCode Property to an EDE in Smart Instrumentation

  1. Click Start > All Programs > Intergraph Smart Instrumentation.

  2. Log on to Smart Instrumentation.

    If the Windows Authentication Login is enabled in Smart Instrumentation Administration, you will not be prompted to log on. For more information about enabling Windows Authentication Login, see Windows Authentication Logon Method in the Administration Module help.

  3. Select the lowest level in the hierarchy, and click OK

  4. Click to open the EDE Explorer.

  5. In the EDE Explorer open the EDE to which you want to add the SystemCode property.

  6. Select the EDE Actions tab and in the Attribute Explorer locate the required SystemCode property.

  7. Drag and drop the SystemCode property into the main EDE window.

  8. Close the EDE.

    You can also add the SystemCode property to Smart Instrumentation using the Query Builder and then generating an EDE from the query.

  9. Click File > Exit to exit Smart Instrumentation.

  10. Confirm that you want to close your Smart Instrumentation session.

Launch Schema Editor and Load the Smart Instrumentation Tool Map Schema

  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.

Click OK.

  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 the Advanced tab and add any further options you require.

    The Description field and the Select Criteria field can be blank, but if you add a value to one you must add the identical value to the other.

  7. Click OK to set the configuration.

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

      The CMF file must be checked in to SmartPlant Foundation before users can publish from an authoring tool.In the Schema Editor, In the Schema Editor, click File > SmartPlant > Edit Engineering Tool Options, and select INtools in the list of authoring tools to load the Smart Instrumentation 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.

Create the SystemCode Property in the SmartPlant Schema and Map

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

  2. Expand Map Classes.

  3. Right-click TEFRetrieve_PID Drawing_Instrument, and select Edit TEFRetrieve_PID Drawing_Instrument on the shortcut menu.

  4. Select the Retrieve tab.

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

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

  7. Click OK.

  8. Under Unmapped application properties, select SystemCode.

  9. Under Unmapped SmartPlant properties, select SystemCode.

  10. On the toolbar, click Map .

  11. Click OK.

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. For more information, see the SmartPlant Schema Editor User's Guide.