Share
 
 

Understanding Classification and Object Mapping Files

The JSON mapping file defines how Civil 3D entities are mapped to IFC classes.

Classification represents a systematic arrangement of items into categories based on criteria related to their role or function. This constitutes a fundamental concept within Building Information Modeling (BIM) and serves to identify objects within an assembled model. The Industry Foundation Classes (IFC) schema incorporates a built-in classification system, which includes a defined type, often supplemented by a predefined type (enumeration) or user-defined types.

Further information on this topic can be found at the following links:

Civil 3D features inherent explicit classification through its object types, such as Alignment, Surface, and Corridor objects, among other Civil 3D entities. Additionally, the use of CAD layers or techniques like name, style assignment, or code assignment commonly serves as a method for entity identification. Different projects and clients often have varying requirements regarding the expected classification of exported IFC data. Given the absence of a single standardized or universally agreed-upon method for mapping these Civil 3D identifiers to IFC classes and types, the IFC 4.3 Extension for Autodesk Civil 3D provides a flexible means to specify the desired IFC class and type for each Civil 3D entity at the time of export.

The IFC 4.3 Extension for Autodesk Civil 3D can generate a template populated with estimated or default values to facilitate the mapping process. See To Save an Object Mapping File for a Project for more information

The IFC 4.3 Extension for Autodesk Civil 3D employs a hierarchy to determine the resulting IFC classification for a Civil 3D entity. The most specific mapping setting takes precedence over any previously identified mapping. Similarly, an entity can be excluded from export through a comparable mechanism. If an extended property is defined on an entity, this classification will override any other recognized mapping.

The JSON file is editable in any text editor, with the caveat that compliant syntax must be maintained. Additionally, tit can be generated programmatically, including platforms like Dynamo.

The file contains entries for each Civil 3D entity, with the following fields:
  • Identifier (Name) Typically a regular expression (REGEX) that matches entity names.
  • IFC Class (IFCExportAs) Specifies the corresponding IFC class and an optional predefined type.
  • Exclusion (Export) True or False. Indicates whether the entity should be excluded from the export.
  • Note: Regular expressions are powerful tools for pattern matching. However, their order in the mapping file matters. Matches are processed from bottom to top, so make sure to order them carefully.

    Regular Expression Multiple Matches

    While the use of regular expressions offers significant power, it is important to note that if an entity matches multiple regular expressions, any nominations beyond the first successful match are disregarded. Within a configuration file, the order of checking local mappings proceeds from bottom to top. This behavior arises from the JSON parsing order when multiple configuration files are identified.

    "MapBaselineName": [
    	{
    		"Name": "Section 2",
    		"IfcExportAs": "IfcRailwayPart",
    		"Export": true
    	},
    	{
    		"Name": "Section.*",
    		"IfcExportAs": "IfcRoadPart",
    		"Export": true
    	},
    	{
    		"Name": "Section 3",
    		"IfcExportAs": "IfcRoadPart. ROADSEGMENT",
    		"Export": true
    	},
    

    If the mapping nomination by baseline name appears as described above, the following behavior occurs. Processing from bottom to top, Section 3 will satisfy the last nomination and will be exported as an IfcRoadPart with the predefined type ROADSEGMENT.

    Section 2 will satisfy the middle nomination due to the wildcard pattern match and will be exported as an IfcRoadPart with the predefined type NOTDEFINED. This occurs despite the presence of an exact match regular expression nominated above it that specifies a railway part. This railway part nomination is not evaluated because an earlier match has already occurred, and consequently, no railway parts will be found in the exported IFC.

    Multiple means to nominate mapping

    As described below, multiple methods can be employed to specify mapping for numerous entities, including CAD Layer, associated style, a code, or an extended property. The specific options available for each entity type are detailed subsequently, with later options taking precedence over earlier ones. It is important to note that preventing the export of an entity, such as by using a CAD layer setting, will prevent any further mapping checks for that entity. For instance, if CAD layer V-NODE is configured to prevent export (as indicated by a false nomination in the JSON extract below), then any class nomination by a point style or an explicit instruction to export that point will be disregarded because the layer nomination halts further mapping checks.

    "MapBlockName": [ 
    "MapCADLayerName": [
    	{
    		"Name": "C-FOOTPATH",
    		"IfcExportAs": "IfcRoad. Footpath",
    		"Export": true
    	},
    	{
    		"Name": "C-SIGN",
    		"IfcExportAs": "IfcSign",
    		"Export": true
    	},
    	{
    		"Name": "V-NODE",
    		"IfcExportAs": "IfcAnnotation",
    		"Export": false
    	},
    

    Entity-Specific Mapping

    The following general summary demonstrates how different Civil 3D entities are mapped to IFC classes using these methods:
  • CAD Layer Matches entities based on their layer name.
  • Style Name Matches entities based on their assigned style.
  • Code Matches entities based on their assigned code value.
  • Extended Property Uses an extended property set named "IfcObject Properties" with the property "IFC::IfcExportAs" to define the IFC class.

COGO Points

Surfaces

Alignments

Feature Lines

Bridges

Bridge Parts

Corridors

Corridor Baselines

Corridor Baseline Regions

Corridor Solid

Corridor Link

Corridor Feature Lines

Block References

Other CAD Entities

  • Mapping attributes: CAD Layer Name, Point Style Name, Extended Property
  • Default export: IfcAnnotation
  • Default export: IfcGeographicElement with predefined type TERRAIN
  • Mapping attributes: CAD Layer Name, Style Name, Extended Property
  • Typically exported as IfcAnnotation
  • Exclusion attributes: CAD Layer Name, Style Name
  • Default export: IfcAnnotation
  • Mapping attributes: CAD Layer Name, Style Name, Extended Property
  • Default export: IfcBridge
  • Mapping attributes: CAD Layer Name, Extended Property
  • Default exports:
  • Mapping attributes: CAD Layer Name, Extended Property
  • Default export: IfcRoad or IfcRailway (if alignment type is rail)
  • Mapping attributes: CAD Layer Name, Style Name, Extended Property
  • Default export: IfcRoadPart or IfcRailwayPart (if Corridor is of type IfcRailway)
  • Mapping attribute: Baseline Name
  • Default export: IfcRoadPart or IfcRailwayPart (if Corridor is of type IfcRailway)
  • Mapping attributes: Baseline Region Name, Assigned Assembly Extended Property
  • Default export: IfcBuiltElement
  • Mapping attribute: Solid Code Name, Solid Code Style Name
  • If Extracted Solid Identified
    • Extracted Solid Layer
    • Extracted Solid Extended Property Set
  • Default export: IfcBuiltElement
  • Mapping attribute: Link Code Name, Link Code Style Name
  • If Extracted Surface Identified
    • Extracted Surface Layer
    • Extracted Surface Extended Property Set
  • Default export: IfcAnnotation
    Note: Corridor feature lines do not currently support mapping
  • Default export: IfcBuiltElement
  • Mapping attributes: CAD Layer Name, Block Name, Extended Property
  • Default export: IfcBuiltElement
  • Mapping attributes: CAD Layer Name, Extended Property

Was this information helpful?