Editing Revit setup for OpenBIM/Revit and IFC classes

From Wiki.OSArch

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
{{IFC_Documentation}}
 
{{Autodesk_Revit}}
 
 
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]].
 
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]].
  
Line 8: Line 6:
  
 
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. Strap on your seat belts, because this is going to do your head in.
 
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. Strap on your seat belts, because this is going to do your head in.
 
Note that the rules described on this page are a simplification. The Revit IFC export code is far more nuanced, but it would take prohibitively long to describe all of the edge cases.
 
  
 
==Rule 1: Hardcoded IFC export classes==
 
==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 the rules described in this table 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 [https://www.revitapidocs.com/2020/ 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 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 [https://www.revitapidocs.com/2020/ 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.
  
 
{|class="wikitable"
 
{|class="wikitable"
Line 20: Line 16:
 
! Notes
 
! Notes
 
|-
 
|-
| <code>Area Scheme</code>
+
| Area Scheme
| <code>IfcGroup</code>
+
|
 
|
 
|
 
|-
 
|-
| <code>Assembly Instance</code>
+
| Assembly Instance
 
|
 
|
 
|
 
|
 
|-
 
|-
| <code>Beam System</code>
+
| Beam System
| <code>IfcElementAssembly</code>
+
|
 
|
 
|
 
|-
 
|-
| <code>Ceiling</code>
+
| Ceiling
| <code>IfcCovering</code>
+
|
 
|
 
|
 
|-
 
|-
| <code>Ceiling and Floor</code>
+
| Ceiling and Floor
 
|
 
|
 
|
 
|
 
|-
 
|-
| <code>Wall Foundation</code>
+
| Wall Foundation
 
|
 
|
 
|
 
|
 
|-
 
|-
| <code>Curve Element</code>
+
| Curve Element
 
|
 
|
 
|
 
|
 
|-
 
|-
| <code>Curtain System</code>
+
| Curtain System
| <code>IfcCurtainWall</code> or <code>IfcRoof</code>
+
|
| If drawn as a wall, it turns into <code>IfcCurtainWall</code>. If drawn as a roof, it turns into <code>IfcRoof</code>.
+
|
 
|-
 
|-
| <code>Duct Insulation</code>
+
| Duct Insulation
| <code>IfcCovering.INSULATION</code>
+
|
 
|
 
|
 
|-
 
|-
| <code>Duct Lining</code>
+
| Duct Lining
| <code>IfcCovering.WRAPPING</code>
+
|
 
|
 
|
 
|-
 
|-
| <code>Electrical System</code>
+
| Electrical System
 
|
 
|
 
|
 
|
 
|-
 
|-
| <code>Fabric Area</code>
+
| Fabric Area
 
|
 
|
 
|
 
|
 
|-
 
|-
| <code>Fabric Sheet</code>
+
| Fabric Sheet
 
|
 
|
 
|
 
|
 
|-
 
|-
| <code>Face Wall</code>
+
| Face Wall
 
|
 
|
 
|
 
|
 
|-
 
|-
| <code>Filled Region</code>
+
| Filled Region
 
|
 
|
 
|
 
|
 
|-
 
|-
| <code>Grid</code>
+
| Grid
 
|
 
|
 
|
 
|
 
|-
 
|-
| <code>Group</code>
+
| Group
 
|
 
|
 
|
 
|
 
|-
 
|-
| <code>Hosted Sweep</code>
+
| Hosted Sweep
 
|
 
|
 
|
 
|
 
|-
 
|-
| <code>Part</code>
+
| Part
 
|
 
|
 
|
 
|
 
|-
 
|-
| <code>Pipe Insulation</code>
+
| Pipe Insulation
| <code>IfcCovering.INSULATION</code>
 
 
|
 
|
|-
 
| <code>Railing</code>
 
| <code>IfcRailing</code>
 
 
|
 
|
 
|-
 
|-
| <code>Ramp</code>
+
| Railing
| <code>IfcRamp</code>
 
 
|
 
|
|-
 
| <code>Rebar</code>
 
| <code>IfcReinforcingBar</code>
 
 
|
 
|
 
|-
 
|-
| <code>Rebar Coupler</code>
+
| Ramp
 
|
 
|
 
|
 
|
 
|-
 
|-
| <code>Roof Base</code>
+
| Rebar
 
|
 
|
 
|
 
|
 
|-
 
|-
| <code>Spatial Element</code>
+
| Rebar Coupler
 
|
 
|
 
|
 
|
 
|-
 
|-
| <code>Stairs</code>
+
| Roof Base
 
|
 
|
 
|
 
|
 
|-
 
|-
| <code>Text Note</code>
+
| Spatial Element
 
|
 
|
 
|
 
|
 
|-
 
|-
| <code>Topography Surface</code>
+
| Stairs
 
|
 
|
 
|
 
|
 
|-
 
|-
| <code>Truss</code>
+
| Text Note
 
|
 
|
 
|
 
|
 
|-
 
|-
| <code>Wall</code>
+
| Topography Surface
| <code>IfcWall</code> or <code>IfcWallStandardCase</code> or <code>IfcFooting</code>
+
|
| A wall in IFC4 is always an <code>IfcWall</code> unless it is a system family and has its function set to <code>Retaining</code> or <code>Foundation</code>. If so, you have the option of overriding it to be an <code>IfcFooting</code>.
 
|-
 
| <code>Wall Sweep</code>
 
| <code>IfcBuildingElementProxy</code>
 
 
|
 
|
 
|-
 
|-
| <code>Zone</code>
+
| Truss
 
|
 
|
 
|
 
|
 
|}
 
|}
  
==Rule 2: Check for a manually overridden parameter that exists in the family itself ==
+
==Rule 2: Check for a manually overridden instance parameter ==
 
 
In the next rules, we will talk about overriding parameters. Typically these are defined in your project, but if you have this parameter defined not as a project parameter but as a family parameter, then this will take precedence and the value set in the family will determine what it is exported as.
 
 
 
This can lead to very troublesome fixes, where you have set the IfcExportAs parameter throughout your project, but the exporter will still ignore it and follow your family parameters overrides, which cannot be scheduled. This involves a very painful process where you need to go through each family and press "Edit Family" and fix them one by one.
 
 
 
If you do not have any parameters in your family definition, please keep reading.
 
 
 
==Rule 3: 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. If none of these parameters are present, proceed to rule 3.
 
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. If none of these parameters are present, proceed to rule 3.
  
When the IFC class is overridden at an instance level, this additionally overrides the IFC type object that the IFC element is assigned to. For example, if your Revit category is <code>Structural Columns</code>, but override a column instance to be an <code>IfcWall</code>, Revit will also automatically create a corresponding <code>IfcWallType</code> with the column type information. It is not possible to control the IFC class of the corresponding IFC type object. To determine the corresponding type, Revit will attempt to simply append the word "Type" to the end of the element class name.
+
When the IFC class is overridden at an instance level, this additionally overrides the IFC type object that the IFC element is assigned to. For example, if your Revit category is <code>Structural Columns</code>, but override a column instance to be an <code>IfcWall</code>, Revit will also automatically create a corresponding <code>IfcWallType</code> with the column type information. It is not possible to control the IFC class of the corresponding IFC type object.
  
 
When a predefined type is defined, it should be noted that it will set the predefined type on the corresponding IFC type object, not the IFC object itself. For example, if you set a predefined type of <code>PLUMBINGWALL</code>, that value will get assigned to the <code>IfcWallType</code>, not the <code>IfcWall</code>. This means that if you have two instances with two different predefined types belonging to one Revit family and same Revit type, Revit will still create two IFC type objects in IFC. It is not possible to control this, and will likely lead to broken type and element relationships in schedules, as well as unnecessarily duplicated information.
 
When a predefined type is defined, it should be noted that it will set the predefined type on the corresponding IFC type object, not the IFC object itself. For example, if you set a predefined type of <code>PLUMBINGWALL</code>, that value will get assigned to the <code>IfcWallType</code>, not the <code>IfcWall</code>. This means that if you have two instances with two different predefined types belonging to one Revit family and same Revit type, Revit will still create two IFC type objects in IFC. It is not possible to control this, and will likely lead to broken type and element relationships in schedules, as well as unnecessarily duplicated information.
Line 187: Line 163:
 
|}
 
|}
  
==Rule 4: Check for a manually overridden type parameter ==
+
==Rule 3: Check for a manually overridden type parameter ==
  
 
You can also override by Revit type. Note that the parameters below only work if you are using a recent version of the exporter, so please update as recommended in the [[Revit setup]], as some out of the box exporters have a bug which prevent these parameters from working. If none of these parameters exist, proceed to rule 4.
 
You can also override by Revit type. Note that the parameters below only work if you are using a recent version of the exporter, so please update as recommended in the [[Revit setup]], as some out of the box exporters have a bug which prevent these parameters from working. If none of these parameters exist, proceed to rule 4.
Line 213: Line 189:
 
|}
 
|}
  
==Rule 5: Check if it is part of a furniture group==
+
==Rule 4: Check IFC class mappings table==
 
 
If the element is contained within a Revit group that is to be exported as an <code>IfcFurniture</code>, it is always exported into an <code>IfcSystemFurnitureElement</code>. If this is not the case, proceed to rule 5.
 
 
 
==Rule 6: 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 <code>File > Export > Options > IFC Options</code>. You can save and load these settings. After this rule is applied, proceed to rule 6.
+
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 <code>File > Export > Options > IFC Options</code>. 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.
 
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 7: Set blank predefined types to UNDEFINED==
+
==Rule 3: Check if it is part of a furniture group==
  
If the predefined type cannot be determined after the rules so far, it is set to <code>UNDEFINED</code>.
+
If the element is contained within a Revit group that is an IfcFurniture, it is always exported into an IfcSystemFurnitureElement.
  
If after all these rules, the IFC class is still unknown, or is an <code>IfcBuildingElementProxy</code> or <code>IfcBuildingELementProxyType</code>, then proceed to rule 7.
+
==Rule 4:
 +
# ... unless the particular Revit family is one of the series of hardcoded types that cannot be overridden no matter what.
  
==Rule 8: Check for particular hardcoded structural types==
 
 
This rule only applies if the IFC class is still undetermined, or if it has determined the class to be an <code>IfcBuildingElementProxy</code> or <code>IfcBuildingELementProxyType</code>. This means that even if you wanted the object to be a <code>IfcBuildingElementProxy</code> or <code>IfcBuildingELementProxyType</code>, there is still a chance that Revit will ignore the instruction and override it at the last moment. This only applies to structural type families, where certain types will export as a particular type.
 
 
{|class="wikitable"
 
! Revit Category
 
! IFC Class
 
|-
 
| <code>Structural Beam</code>
 
| <code>IfcBeam</code>
 
|-
 
| <code>Structural Brace</code>
 
| <code>IfcMember</code>
 
|-
 
| <code>Structural Footing</code>
 
| <code>IfcFooting</code>
 
|-
 
| <code>Structural Column</code>
 
| <code>IfcColumn</code>
 
|}
 
  
 
=Import=
 
=Import=
 
TODO
 
  
 
[[Category:Autodesk Revit]]
 
[[Category:Autodesk Revit]]
[[Category:Industry Foundation Classes (IFC)]]
 

Please note that all contributions to Wiki.OSArch are considered to be released under the Creative Commons Attribution-ShareAlike (see Wiki.OSArch:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To edit this page, please answer the question that appears below (more info):

Cancel Editing help (opens in new window)