Configure the Smart Instrumentation database - SmartPlant Foundation - Version 2019 (10.0) - Administration & Configuration

SPO Manual Configuration Reference

Language
English
Product
SmartPlant Foundation
Search by Category
Administration & Configuration
SmartPlant Foundation / SDx Version
10

There are two ways to configure the Smart Instrumentation database.

Automatically configure using SQL scripts provided by SPO/E Core

SPO/E Core by default provides predefined configurations for a SPO document and its related interface definitions and property definitions in the form of SQL scripts.

The following files are delivered with SPO/E Core:

For an Oracle database:

  • Oracle - TEFRetrieve-AddSPODocument-T_OBJDEF-T_DOCTYPE.sql

  • Oracle - TEFRetrieve-IntrfaceDef.sql

For a SQL Server database:

  • SQLServer - TEFRetrieve-AddSPODocument-T_OBJDEF-T_DOCTYPE.sql

  • SQLServer - TEFRetrieve-IntrfaceDef.sql

You must run the appropriate SQL file depending on the database installed on your computer.

Manually configure by creating a new document type

  1. In the SQL Developer software, create a new object in the Object_Def table for the new SPO/E document with the following data:

    • OBJECT_DEF_ID=400

    • OBJECT_DEF_NAME=SPODocument

    • BASE_TABLE_ID=415

    • HIERARCHY_LEVEL=2

      Creating doc type- fig 1

  2. Click Commit icon on the toolbar.

  3. Create a new document type in the Document_Type table with the following data:

    • DOCUMENT_TYPE_ID=200

    • DWG_TYPE_ID=98

    • INTOOLS_DOC_TYPE_NAME=SPODocument

    • DOCUMENT_DEF_NAME=Instrument

    • DOCUMENT_TITLE_DEF= SPODocument

    • DOCUMENT_TYPE_DEF= SPODocument

    • OBJECT_DEF_ID=311

    • BROWSER_ID=0

    • VIEW_ID=0

      Creating doc type- fig 2

  4. Click Commit icon on the toolbar.

    In this example, the SQL Developer software is used to configure the database. However, you can use other database editors to configure the database.

Smart Instrumentation schema configuration

  1. Define the required interfaces for the instrument object type.

    SPI icon

  2. Double-click spiscw.exe in the Smart Instrumentation installation folder.

  3. In the Welcome to Smart Instrumentation Schema Configuration Wizard dialog box, click Next.

  4. In the Select Domain dialog box, select the domain from which you want to publish or retrieve data, and click Next.

  5. In the Schema Options dialog box, select Change existing schema definition and click Next.

  6. In the Select Schema dialog box, select TEFRetrieve (retrieve) from the Schema name list and click Next.

  7. In the Select Document Type dialog box, select the SPODocument from the Document type list to retrieve and associate the instrument object type to be included in the schema, and click Next.

  8. In the Select Object Types dialog box, select the check boxes corresponding to the objects that must be related to the selected SPO document, and click Next.

  9. In the Define Object Levels and Restrictions dialog box, click Next.

  10. In the Define Filter condition dialog box, click Next.

  11. In the Select Object Interfaces dialog box, for each object associated, select the interfaces to retrieve from the Available interfaces list and click Add to move them to the Selected interfaces list.

    The following interfaces must be added to the selected object type: IDrawing, IComponentHandle, IComponentLocation, IInstrument, IInstrumentUDF, ILine, and IPipeClass.

    Select object interfaces

  12. Click Next.

  13. In the Select Interface Properties dialog box, select the properties that must be associated with the selected interfaces, and click Next.

    Select Interface Properties

  14. In the Completing the Schema Configuration Wizard dialog box, select the Create SQL file check box, and click Finish.

    Completing the Schema Configuration Wizard

    SQLs are created and run directly in the SmartPlant Instrumentation database. The SQL file (TEFRetrieve.sql) is created in the Smart Instrumentation installation folder ([SmartPlant Application folder]\Instrumentation\TEFRetrieve.sql). This file creates columns in the Object_Def_Interface_Def table.

    SPI_Folder

Running TEFRetrieve.sql

Run the TEFRetrieve.sql file that is created in the Smart Instrumentation folder using either TOAD or any other database tool to create the appropriate entries for interface definitions and property definitions associated with an SPO document.