Create a project specific object mapping file.
The Save Mapping tool creates an IfcInfraExportMapping.json file in the directory of the current drawing. This file contains the mapping rules for AutoCAD and Civil3D objects to IFC Classification and Types. See About IFC 4.3 Extension for Civil 3D Configuration Files for details regarding the search path, merged settings files, and override settings used with IFC Export and Import commands.
To create a project specific IfcInfraExportMapping.json file
- Click Add-ins tab
IFC Infrastructure panel
IFC Infrastructure
Save Mapping
.
- In the Save As dialog, click Save. The IfcInfraExportMapping.json file should be saved to the same directory as your drawing file.
Understanding Classification
Classification is a key concept in BIM, where objects are categorized based on their function or role. The IFC format has its own classification system, which can be extended with predefined or user-defined types.
- Explicit Classifications. Using built-in categories like Alignment, Surface, and Corridor.
- Implicit Classifications. Using CAD layers, object names, styles, or codes to identify entities.
IFC Classification and Type mapping stages
- Stage 1: An estimated guess of the IFC Classification and Type based on internal hard-coded rules. It is assumed that all objects are exported.
- Stage 2: The layer name is used to find and apply a mapping rule.
- Stage 3: Only applicable to some objects.
- Points: The point code name is used to find and apply a mapping rule.
- Links: The link code name is used to find and apply a mapping rule.
- Shapes: The shape code is used to find and apply a mapping rule.
- Stage 4: The property set mapping from the IFC property set attaches to the object.
Mapping rules
- The name is issued a regular expression (regex) rule check. Regex is a powerful text comparison system allowing for wild cards. For more information, see Regular Expression Language.
- A flag is assigned to specify if the object is exported or not. If a flagged (at any stage) to not export, then no further work or checks are done on the object its sub-objects.
- The IFC classification and optional sub type are considered.
Mapping files order of processing
- {IFCOutputFolder}{IFCFilename}-IfcInfraExportMapping.json
- {DWGOutputFolder}{DWGFilename}-IfcInfraExportMapping.json
- {IFCOutputFolder}IfcInfraExportMapping.json
- {DWGOutputFolder}IfcInfraExportMapping.json
- {ProjectFolder}IfcInfraExportMapping.json
- C:\Program Data\Autodesk\Civil3D\ IfcInfraExportMapping.json
- Use the Save Mapping tool (IFCInfraSaveMappingConfig command) to create the mapping file in the current drawings folder. If the drawing has not been saved it will be placed in the C:\Program Data\Autodesk\Civil3D folder. This file contains mappings based on the content of the current drawing and mapping rules. This allows for iterative saves to create and enhance mapping rules.
- Mapping files are designed to only define exceptions or overrides in earlier files. As most companies have layering and naming conventions, it is assumed that company wide files are placed in the program data or project folder.
- The intent is to use the IFCOutputFolder file to define different mappings for IFC 4 and IFC 4.3 exports.
- The ProjectFolder is defined in the ifcInfraConfiguration.json.
- You can set the system environment variable Civil3DIfcInfraConfigFilePath to point to a valid mapping file. If it is set and the file exists then that is the ONLY mapping file processed.
A typical mapping rule is shown in the following example.
{ "Name": "Daylight_Fill", "IfcExportAs": "IfcAnnotation.StringLine", "Export": true },
IFCExportAs is in the form of either "IFCCLassification" or "IFCClassification.IFCType"