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