You are currently reviewing an older revision of this page.
Before creation of mapping ECSchema should be opened in advance. To create new mapping perform below operations.
.
To open an existing mapping for ECSchema do the following steps:
→ It is also possible to remove a mapping by selecting it in the list and clicking the "Remove" button
Note: A schema doesn't need to be opened in advance. The appropriate schema will be opened automatically while opening the mapping.
To save a mapping select "Database Mapping > Save..." menu item or right click on the schema in tree and choose "Save Mapping" from the context menu. If a mapping file already exists it will be overridden, if not an new mapping file will be created
To close an opened mapping select "Database Mapping > Close" or right click on the schema in the ClassEditor navigation tree and chose "Close Mapping" from the context menu.
In practice sometimes an APPlugin may work with two or more schemas. One schema may have base classes shared among several applications and the second can reference the first schema and contain derived classes with additional properties. The mapping file can contain mappings for all working schemas. The schema that references others will be considered as master. To allow the mapping of classes of any referenced schema it is sufficient to open it in the ClassEditor. After that it is possible to perform all operations with its classes like with classes of master schema.
To locate mappings the Plant Poject Database Mapping Extension uses the ECSCHEMA_PATH environment variable. The variable contains a list of folders where ECSchemas are located. The mapping plug-in searches these folders for existing mapping files. All mappings for a schema are located in a subfolder of the schema folder. The subfolder has the following name pattern:
<FullSchemaName>_mapping
Example: PlantProjectSchema.08.11_mapping
The folder contains all mappings of all application for that schema. The name pattern for a mapping file is the following:
<FullSchemaName>_<AppName>.<MappingMajorVersion>.<MappingMinorVersion>.mapping.xml
Example: PlantProjectSchema.08.11_Autoplant_PIW.01.00.mapping.xml
After a mapping is opened or created the Plant Project Database Mapping Extension panel is displayed on the right of the ClassEditor. It consists of two tabs (see Fig.6). The first tab is "Summary". It contains overall information about the mapping and provides some statistics. The second tab is "Class Mapping" or "Relationship Mapping". The name depends on what has previously been selected: class or relationship. It provides overall information about the currently selected class mapping and property mapping.
The Summary tab contains overall information about the whole schema mapping (see Fig.6) and has the following sections:
Export Summary: When clicking the Export Summary button a summary is saved in a RichText file.
Edit Database Structure: Opens a tool that allows loading and editing the Plant Project Database structure. For more information about database structure and operations with it see Database Structure.
Under this tab the overall information about the selected class or relationships mapping (on the top) and the selected property (on the bottom) is displayed. The class related part contains the following sections:
From the class mapping tab it is possible to activate or deactivate a mapping, add a new mapping, edit and remove a mapping. For more information see Class Mapping.
The property related panel contains more detailed information about the selected property. As for a class it is possible to activate or deactivate a mapping, add a new mapping, edit and delete a property mapping. For more detail see Property Mapping. The information of a property has the following sections: