Mapping Directly Against the SmartPlant Schema - Integration - Update 44 - Help - Hexagon

Integration Help

Language
English
Product
Integration
Search by Category
Help
Smart 3D Version
12.1 (2019)
Smart Construction Version
2019(7.0)
SmartPlant Foundation / SDx Version
10
Smart Electrical Version
2019 (9.0)
Smart Materials/Smart Reference Data Version
2020 (10.0)
Smart P&ID Version
9 (2019)
Smart Review Version
2020 (15.0)
Smart Engineering Manager Version
10 (2019)
Smart Interop Publisher Version
13.1 (2019 R1)
Smart Isometrics Version
7.0(2019)
Spoolgen Version
9.0(2019)

While mapping using view definitions is generally easier for users, in some cases mapping directly against the SmartPlant schema may be required. In particular, mapping against the SmartPlant schema is required for the following cases:

  • For to-many mapping where a specifically defined view definition has not been created because the automatically generated view definition only handles to-one mapping. An alternative to mapping directly would be to create an explicit view definition for this specific case, but this is probably more complicated than just mapping directly against the SmartPlant schema.

  • For from-many mapping. The mapping that can be done using the Publish and Retrieve tabs is currently limited to from-one mapping.

To map directly against the SmartPlant schema, an understanding of at least the portion of the SmartPlant schema that will be involved in the mapping is required.

The Publish Map and Retrieve Map buttons available from the Overview tab on the Edit windows for map class definitions can be used to map directly against the SmartPlant schema. For example, selecting the Publish Map button for a map class definition displays the following window to allow mapping directly against the SmartPlant schema:

A similar window is available when you click the Retrieve Map button on the Edit window for a map class definition.

One-to-One and One-to-Many Mapping

To define one-to-one mapping using the Publish Map for Tool Class Definition window, you can drag a property definition from the tree control and drop it in a cell for the Maps to Property column in the table on the upper left of the window. If only property definitions are selected from the mapped-to class or interface definition, dragging and dropping establishes a one-to-one mapping relationship between the dragged SmartPlant property definition and the map property for the dropped-in row. In this case the Maps to EdgeDef column will be blank for all rows in the table.

Because the Source tree on the right side of the window displays both properties and edge definitions for the mapped-to class or interface definition, you can also select a property definition across an edge definition (bolded text in the tree) to define mapping. If you select a property definition across an edge definition, then the software establishes a relationship between the map property for the dropped-in row with the property definition across the edge definition. In this case the Maps to EdgeDef column reflects the edge definition across which the property definition was selected.

When property definitions across edge definitions are included this way, then the mapping, instead of being one-to-one, becomes one-to-many. For example, the mapping between property PE and PropB across an edge definition from the previous screenshot appears in the UML diagram below. Notice the arrow going from map property PE on SPMapClassDef IE (realized by SPMapClassDef E) to PropB on SmartPlantF. In this case, the one instance of E maps to both SmartPlantA and SmartPlantF (that is, one application object maps to two SmartPlant objects).

Many-to-One and Many-to-Many Mapping

To define many-to-one mapping in the Publish Map for Tool Class Definition window, you can drag and drop properties from the mapped-to class or interface definition in the tree view onto the Maps to Property column for a map edge definition in the table on the lower left of the window. When you create a many-to-one mapping, the Maps to EdgeDef column is blank.

To define many-to-many mapping, you can drag and drop properties that are not from the mapped-to class or interface definition but from a related interface definition onto the Maps to EdgeDef column.

For example, in the following graphic, you can see that tool map property PD for map class definition D across map edge definition IA2F is mapped to PropF for SmartPlantF across edge definition Smart Plant F (for relationship definition SmartPlantA2SmartPlantF). In this case two related map objects (E and F) are mapped to two related SmartPlant objects (SmartPlantA and SmartPlantF). This is an example of a many-to-many mapping.

The Retrieve Map for Tool Class Definition window works similarly to the Publish Map for Tool Class Definition window. The following example shows retrieve mapping for retrieving from interface definition ISmartPlantA into map class definition E. The arrows represent drag-and-drop operations that were performed to produce the displayed mapping. Note that the Map Edge Def column for map properties PA, PB, PE, and PG is blank (because these are map properties for the E map class), but the Map Edge Def column for PD shows the UID for map edge definition IA2F.

The UML diagram below illustrates the many-to-many mapping shown in the previous retrieve graphic:

See Also

Tool Map Schemas