IFC Export by Dynamo : Internal Revit Property Set

The available code for exporting IFC files does not export Revit Property Sets. you can find the code below:

#python nodes in dynamo 0.7
#proposed by Nicklas Verdier Østergaard, nvo@niras.dk
#Based on tools.dwf by Julien Benoit @jbenoit44
import clr
from Autodesk.DesignScript.Geometry import *
# Import ToDSType(bool) extension method
import Revit
# Import geometry conversion extension methods
# Import DocumentManager and TransactionManager
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
from System.Collections.Generic import *
# Import RevitAPI
import Autodesk
from Autodesk.Revit.DB import *
doc = DocumentManager.Instance.CurrentDBDocument
uiapp = DocumentManager.Instance.CurrentUIApplication
app = uiapp.Application

#The inputs to this node will be stored as a list in the IN variable.
#dataEnteringNode = IN

fileversion = IN[2]
wallandcolumnsplitting = IN[3]
exportbasequantities = IN[4]


# Start Transaction


#if fileversion != None:
#	options.FileVersion = fileversion
if fileversion == "IFC4":
	options.FileVersion = IFCVersion.IFC4
if fileversion == "IFC2x2":
	options.FileVersion = IFCVersion.IFC2x2
if fileversion == "IFC2x3":
	options.FileVersion = IFCVersion.IFC2x3
if fileversion == "IFC2x3":
	options.FileVersion = IFCVersion.IFC2x3CV2
if fileversion == "IFCBCA":
	options.FileVersion = IFCVersion.IFCBCA
if fileversion == "IFCCOBIE":
	options.FileVersion = IFCVersion.IFCCOBIE
if fileversion == "":
	options.FileVersion = IFCVersion.Default
options.WallAndColumnSplitting = wallandcolumnsplitting
options.ExportBaseQuantities = exportbasequantities

#IFCVersion Version = (IFCVersion) Enum.Parse( typeof(IFCVersion), UnwrapElement(IN[2]), true );
#x.FileVersion = IFCVersion.IFC2x3CV2

c=doc.Export(folder, name, options)

# End Transaction

if fileversion == "":
	OUT="Defult settings used"

How can I export an IFC file by “Revit Property Sets” using Dynamo?


Hi @sobhan.kouhestani,

Thanks for the new thread.

You need to add a new line in the python script after “options.ExportBaseQuantities :”


	options.WallAndColumnSplitting = wallandcolumnsplitting
    	options.ExportBaseQuantities = exportbasequantities

        c=doc.Export(folder, name, options)

You can also find all the IFC export options in the python script of the node “Export IFC” from Genius Loci package (including the new Project Origin option).

1 Like

Is there a limit off the number off exported views? I have 20 views that i would like to export, i only got 10.


Can anyone help me with this question?

All file sizes are the same, something else might be wrong aswell


I just did a quick test with an export of 27 IFC. It works.
Check that you have no forbidden characters like “/”


1 Like

Thank you, you did point me in the right direction. There were some forbidden characters in my view names, I still don’t know which characters were forbidden. I think that the problem lies in the Excel file that i’d used to create the views. But my problem is solved!

I have just released an update which includes IFC export…

1 Like

Hi Alban, do you have an idea if this script uses the latest update of the ifc exporter plugin? or does it use the standard built in IFC exporter?


I recommend installing the Autodesk IFC exporter plugin.
I’m not sure that the custom node can work without him because of the options like project origin, phase…

Thanks for the fast answer. I do have the latest version but i want to be sure that the custom node won’t use the standard one.

I have a set of nodes for IFC export, which also covers the latest build from Autodesk IFC exporter

Alban, i have a question…
i got a problem with exporting roof that has an opening.
the openings appear to be far away from the model so i get the following warning in solibri:

*when i export the same roof using the IFC exporting pluging i dont get this problem.

ifc_exporter-RoofTest.dyn (17.0 KB)
roofTest.rvt (3 MB)

is this what you expect?

from this input from Revit…

well…then use these nodes.
I processed it without changing anything from my sample graph
Ifc.dyn (30.3 KB)


Hi Mohamad,

You can reproduce this error when you change the level of detail in the Revit exporter.
With a value “high” the openings will be displaced.

The bug on sourceforge :

If I change the level of detail (0,5) in the custom node, there is no more error :

1 Like

This is only a problem if you use “In-Session Setup”, if you use the prebuild schemas then is this not a problem, since you cant set LOD in example “IFC2x3 CV”. But then you need to use a node which can capture the schemas made by the IFC exporter team… and not the workarounds which builds using the Revit API IFC Exporter.

If the code behind the node uses this options.AddOption("someVariable", "someValue")
then it is not using the IFC Exporter API,

If it is build using the IFC exporter API, then it should implement methods from here

This is done by a reference to the assembly and then use the methods provided in here.

However, the problem is still around, if you use the IFC exporter as “In-Session” and use either 2x3 or 4 fileformat, then will you get an error. using 2x2 format went well for me combined with high.

If you want to know more then please contact me at my Github --> https://github.com/erfajo/OrchidForDynamo

1 Like

thanks Alban by me it worked when i set the level of detail on “0”.

thanks Erfajo, that makes it more clear that via the python custom nodes we are not using the ifc exporter but we do export using the revit api.
it will be nice if there is a way to export using the prebuilt schemas from the IFC exporter team in Python.
i will try your custom nodes as well.

@Mohamad_Kayali, I did implement the IFCexporter from the first time I started coding these set of nodes.
If you want to know more then please contact me at my Github --> https://github.com/erfajo/OrchidForDynamo

1 Like