Create a Map Class Definition - 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)
  1. After you open the tool map schema that you want to edit in the Schema Editor, click View > Tool Schema.

  2. Click Options on the View Schema dialog box.

  3. On the View tab, click Editor, and then click OK.

    SHARED Tip If you do not see the View tab, the View dialog box is in Simple mode. Click Editor in the Form list instead.

  4. In the Create tree, double- click SPMapClassDef.

    SHARED Tip You can also create map class definitions by double-clicking the SPMapClassDef node in any tree view in any Schema Editor view.

  5. In the Name box, type a unique name for the map class definition.

  6. In the Select criteria box, define the criteria that the tool adapter uses to select or identify objects for this tool class definition. See the mapping rules for your authoring tool for how to set the value for this property.

  7. In the Process criteria box, define the criteria that the adapter uses to process objects that are instances of this tool class definition. See the mapping rules for your authoring tool for how to set the value for this property.

    SHARED Tip For example, if you want Smart P&ID to publish extended properties for equipment, such as process data properties, you can set the process criteria of the Equipment map class to EFAdapter.EqDataExchanger,True in the Smart P&ID tool map schema.

  8. To define the properties associated with the tool map class, click beside the Map properties box, and select the authoring tool map properties for the class definition.

    • If the properties that you want to associate with the map class do not already exist in the tool map schema, you can click Create in the Possible MapProperties dialog box to create them. For more information, see Create a Map Property Definition.

    • As a general rule, when you define map class definitions for a tool class/interface model, the Map properties box should be blank; in a typical class/interface model, only interfaces (not classes) expose properties.

  9. Under Publish map, click beside the Publish to SmartPlant Class/Interface box, and select the SmartPlant schema class definitions or interface definitions to which you want to map for publish operations.

    • Most mapping between map class definitions and the SmartPlant schema should be done using SmartPlant interface definitions.

    • If you map to interface definitions, you should map to the primary interface definitions for the SmartPlant objects that the tool class definition corresponds to.

  10. Under Retrieve map, click beside the Retrieve to SmartPlant Class/Interface box, and select the SmartPlant schema class definitions or interface definitions that map to the map class definition for retrieve operations.

    SHARED Tip For retrieval, mapping should be defined using interface definitions rather than class definitions.

  11. If the map properties for this map class definition already exist in the tool map schema, define the publish and retrieve maps for the properties under Publish map and Retrieve map. For more information, see Define Publish Mapping for Tool Properties or Define Retrieve Mapping for Tool Properties.

  12. Click OK to save the map class definition.

Defining mapping for an object does not necessarily mean that you can publish and retrieve that object. The authoring tool adapter determines the objects that you can publish and retrieve. For more information, see rules for your authoring tool in the tool documentation.

  • When you create a map class definition, the Schema Editor automatically assigns a UID to the map class definition. If you want to change the UID, click Change UID. See the mapping rules for your authoring tool for information on UID values to use. Some application adapters will not work correctly if the values for the UID do not follow the rules for that application.

  • The application schema model that you are using determines the value for the Is interface? option and indicates whether the Specialization of, Generalization of, Realizes and Is realized by boxes require a value for the map class definition.

    • If the application model is a simple class/property model, then Is interface? should be False, and the Specialization of, Generalization of, Realizes, and Is realized by boxes should be blank.

    • If the application model is a class inheritance model, Is interface? should be False, and the Realizes and Is realized by boxes should be blank. If the tool map class inherits from other tool classes, this inheritance should defined in the Specialization of box. Likewise, if other tool classes specialize this tool class, this should be reflected in the Generalization of box.

    • If the application model is a class/interface model, then both classes and interfaces are modeled as tool map class definitions. The Is interface? option for a particular map class definition should reflect whether that tool class refers to an interface (True) or a class (False).

      For both classes and interfaces, the Specialization of and Generalization of boxes should be blank. For interfaces, the Realizes box should be blank, and the Is realized by box should indicate the classes that realize this interface. For classes, the Is realized by box should be blank, and the Realizes box should indicate the interfaces realized by this class.

  • The Mapping option box identifies the type of mapping that you can use for the map class definition. The possible values include:

    • Don't Map

    • Map Directly - The properties for the tool class or interface map directly to a SmartPlant schema class definition or interface definition. The map properties that can be used for mapping are defined for this tool class only. Map Directly is the default mapping type.

      You should use this option if the properties for the tool class map exactly the same regardless of the tool class that specializes them (class inheritance model) or the tool class that realizes them (class interface model).

    • Include Generalized - If the tool map schema is using a class inheritance model and the Map directly option is not satisfactory for the mapping, this option should be used. The map properties that can be used for mapping for this option are the map properties for this tool class and the map properties for any generalized class (including generalizations of generalized classes or the entire inheritance tree).

      This option allows different mapping for the properties of the generalized tool classes depending on the specialized tool class. For example, one specialized tool class can map the properties for a generalized tool class differently than another specialized tool class maps those same properties.

      If the mapping of one or more properties on a generalized map class is different depending on the specialized map class definition, then the specialized map class definitions should use this option.

    • Include Realized - If the tool map schema uses a class/interface model and the properties on a map interface (map class definition for which IsInterface=True) map differently depending on the map class definition that realizes that map interface, use the Include Realized mapping option for the map class definitions that realize that map interface.

      This option allows different mapping for the properties of a map interface based on the realizing map class definition. One realizing map class can map the properties for a realized map interface differently than another realizing map class maps those same properties.

      Map interfaces (map class definitions for which IsInterface=True) should use the Map Directly option if one or more properties on that map interface always maps the same way regardless of the realizing map class definition. Use the Don't Map option if all the mapping is different depending on the realizing map class definition.

      The Include Realized option should not be used with map interfaces. Only the map class definitions that realize the map interface should use this option.