Revit setup for OpenBIM/Revit and IFC classes

From Wiki.OSArch

It is possible to control which IFC classes map to which Revit objects when exporting and importing to some degree. Prior to reading this, it is important to first read the resources provided in Revit setup.

To set IFC classes and predefined types in Revit, it requires intimate knowledge of all of the IFC class names, which ones can be used (i.e. which ones are not abstract), and all of the predefined types possible. Revit does not provide any interface or drop downs or lists that aid selection. Therefore, if you make a spelling mistake, or accidentally type extra characters, the export will also be incorrect. It may be useful to use the BlenderBIM Add-on IFC class search website to discover which IFC classes should be used.

Export

Revit follows a series of convoluted rules to determine what IFC class an object is exported as. If one rule cannot be satisfied, it moves on to the next rule until it finds a suitable IFC class.

Rule 1: Hardcoded IFC export classes

Revit has a series of hardcoded IFC export classes depending on the type of Revit object. It is not possible to override this in any way, and users are required to remodel the object using another method if they wish to get correct OpenBIM output. The table below describes the internal type of Revit object, and how it is exported. If you are unsure what this internal type is, this can be checked in the Revit API documentation (note: this requires some programming background knowledge to understand). If your object is not part of the table below, proceed to rule 2.

Revit Category IFC Class Notes
Area Scheme
Assembly Instance
Beam System
Ceiling
Ceiling and Floor
Wall Foundation
Curve Element
Curtain System
Duct Insulation
Duct Lining
Electrical System
Fabric Area
Fabric Sheet
Face Wall
Filled Region
Grid
Group
Hosted Sweep
Part
Pipe Insulation
Railing
Ramp
Rebar
Rebar Coupler
Roof Base
Spatial Element
Stairs
Text Note
Topography Surface
Truss

Rule 2: Check for a manually overridden instance parameter

The IFC export class can be overridden on a per instance basis. To do this, parameters need to be created and assigned to instances. A shared parameter file with these parameters is provided in the Revit setup page.

When the IFC class is overridden at an instance level, this additionally overrides the IFC type object that the IFC element is assigned to.

Parameter Name Parameter Type Notes
IfcExportAs Instance This may be filled out in two ways, either just the desired IFC export class (e.g. IfcWall) or the IFC export class and the predefined type joined with the dot symbol (e.g. IfcWall.PLUMBINGWALL). This text is case insensitive, but it is recommended for neatness to follow the conventions in the IFC documentation, where the classes use CapsCase and the predefined type uses ALLCAPS.
IfcType Instance Note: this is deprecated and should not be used. This may be filled out with the desired predefined type (e.g. PLUMBINGWALL). This text is case insensitive, but it is recommended for neatness to use ALLCAPS as per the IFC documentation. If a predefined type is specified both in the IfcType parameter as well as in the IfcExportAs parameter (via joining with the dot symbol), then the IfcType takes priority. Therefore, it is advised to generally not use the dot notation, and keep the two values separated.
IfcExportType Instance Note: this should be used instead of IfcType. This may be filled out with the desired predefined type (e.g. PLUMBINGWALL). This text is case insensitive, but it is recommended for neatness to use ALLCAPS as per the IFC documentation. If a predefined type is specified in all three possible parameters, i.e. the IfcExportType parameter, the IfcType parameter as well as in the IfcExportAs parameter (via joining with the dot symbol), then the IfcExportType takes priority over the other two. Therefore, it is advised to generally not use the dot notation, and keep the two values separated. It also advised to avoid IfcType completely to prevent user confusion.

Rule 3: Check for a manually overridden type parameter

Instead of overriding a single instance, it may be more advisable to override by type. All instances of that type will then be overridden too. For example, if a type is overridden to be IfcWallType, each instance will be overridden automatically to be IfcWall. The approach is similar, except that the parameters must be type parameters, and are called IfcExportAs[Type] and IfcExportType[Type] instead respectively. The parameter must be filled out with the name of the IFC type class (e.g. IfcWallType).

If the project is based on IFC2X3, it is advisable to override by type, as IFC2X3 contains more granular IFC classes for element types, especially in regards to MEP disciplines.

Rule 2: Check IFC class mappings table

Revit offers a mapping table from Revit category (and subcategory) to IFC class and IFC Predefined Type. You can manually access this by going to File > Export > Options > IFC Options. You can save and load these settings.

Out of the box, there are many shortcomings to the IFC class mappings table. OSArch provides an improved default set of IFC class mappings in the Revit setup page, and describes what the improvements are.

Rule 3: Check if it is part of a furniture group

If the element is contained within a Revit group that is an IfcFurniture, it is always exported into an IfcSystemFurnitureElement.

==Rule 4:

  1. ... unless the particular Revit family is one of the series of hardcoded types that cannot be overridden no matter what.


Import