Retrieving - Intergraph Smart Electrical - Customization - Intergraph

SmartPlant Enterprise SmartPlant Adapter for Smart Electrical

Language
English
Product
Intergraph Smart Electrical
Search by Category
Customization & Programming
SmartPlant Foundation / SDx Version
Smart Electrical Version
2018 (8.0)

When an external document is retrieved, SmartPlant Adapter compares the objects in that document to the data in the Smart Electrical database and generates the following tasks in the To Do List:

  • Create Task — Generated when a new item needs to be created

  • Update Task — Generated when an existing item needs to be modified

  • Delete Task — Generated when an existing item needs to be deleted

SmartPlant Adapter depends on the data in the tool schema to support the retrieve operation.  When a document is retrieved, SmartPlant Adapter receives two containers of data:

  • Document Container — Includes all of the published objects and relationships for that document

Tombstone Container — Includes information about deleted objects and relationships

When an external document is retrieved, the SmartPlant Adapter:

  1. Defines a collection of interfaces to be retrieved, according to the document subtype. The cases are:

    1. Power Elements – retrieves ‘IInstrumentOcc’ and ‘IElectricalCabinetOcc’

    2. Smart Electrical Retrieve - retrieves ‘ISignal’

    3. P&ID Drawing – retrieves ‘IElectricHeaterOcc’, ‘IElectricMotorOcc’, ‘IElecPowerConsumer’, and IVariableFequencyDriveOcc

    4. SmartPlant 3D Review – retrieves ‘ICableOcc’

    5. In case of other document subtype, the Plug and Play retrieve will be performed.

  2. Retrieves Tombstones brought with the document. Each instruction is examined for its ClassDefUID, for DeleteInstruction the ‘Delete’ task is created (if the corresponding item exists in Smart Electrical database). When DeleteInstruction is related to ‘Rel’ object, the IRefRel object is saved for further processing. UpdateInstruction for property is translated to the property of the item having Null value.

    SmartPlant Adapter iterates over all of the objects in the Tombstone Container and performs the following actions:

    • Generate Delete Task — When SmartPlant Adapter encounters a delete instruction in the tombstone container, SmartPlant Adapter searches for an existing item in the Smart Electrical project that is correlated to the item that was deleted in the other application. If such an item is found in the project and this item does not exist in As-Built, a Delete Task is generated in the To Do List.

    • Generate Claim Task and Delete Task — When SmartPlant Adapter encounters a delete instruction in the tombstone container, SmartPlant Adapter searches for an existing item in the Smart Electrical project that is correlated to the item that was deleted in the other application. If such an item is not found in the project but this item exists in As- Built, a Claim Task and Delete Task are generated in the To Do List.

    • Generate Unclaim Task — When SmartPlant Adapter encounters an unclaim instruction in the tombstone

  3. For each Interface name from the collection defined in step 1, SmartPlant Adapter tries to extract from the map schema container the mapping definition for it and to fill SmartPlant Adapter Map object with the mapping definition. Then, if succeeded, the adapter gets an object collection from the document container, filled with all instances for this interface.

    SmartPlant Adapter iterates over all of the objects in the Document Container and performs the following actions:

    • Use Primary Interface to Determine Class — The incoming object is tested for a primary interface to determine which Map Class should handle the retrieval of that object.

    • Generate Update Task — SmartPlant Adapter searches for an existing Smart Electrical item to update.  If an item is found, it generates an Update Task in the To Do List.  The properties of the incoming object are compared against the properties of the existing item.  When differences are found, property updates are added to the task. The list of properties to be compared is defined by the properties in the tool schema.

    • Generate Create Task — If no item is found to update, a Create task is generated in the To Do List.  Property updates are added to the task for each of the incoming property values. The list of properties to be added is defined by the properties in the tool schema.

    • Generate Claim Task — If no item is found in As-Built, a Claim task is generated in the To Do List.  Property updates are added to the task for each of the incoming property values.  The list of properties to be added is defined by the properties in the tool schema.

    • Retrieve Relationships — Depending on the class being retrieved, SmartPlant Adapter defines the types of relationships that are to be retrieved for each data object.

  4. Plug and Play retrieve.

The general requirement for the document is each ClassDef must have a primary interface that is unique for it. The mapping for retrieve should be done using this interface. This is the way how SmartPlant Adapter for Smart Electrical can identify the Smart Electrical Item Type of the retrieved object.