IFC Batch Export Through Phases

Hi everyone,

I am trying to export IFCs in Revit via Python scripts in Dynamo.
What should I add below for me to export a specific phase.


Thank you in advance.

Hi @blsalvio,

The option for the phase is not visible in the Revit API.
But you can export a given view with its properties. (phase, phase filter…)

You can use the Export IFC node in Genius Loci package for that purpose.

I have to correct this… The phase is being exported using the Revit API. This is done by adding an export option. This is the way it is solved in the IFC exporter. I am sure this is also how @Alban_de_Chasteigner do it if his node can export using phases. There is no other way around!

I have just released an update which includes IFC export…

You’re right.
There is indeed a property when looking in the IFC source code that is not present in the Revit API documentation.

I am not sure what you are answering here… exporting the phase is a Revit API call.

it looks like this in C#
exportOptions.AddOption("ActivePhase", selectedPhaseId.ToString())

This and setting the View to export is the only two things you MUST do using the Revit API… and off course doing the export in the end. Everything else can be done using the IFC Exporter API.

However, I have now made the nodes, so there is no need to use Custom Nodes not fully supporting the IFC Exporter anymore…

in python :
options.AddOption(“ActivePhase”, str(phase.Id));

-if you want to export ifc from your current opened document you need to use the builtin (select phase) node as an input.
-if you need to export ifc from another Revit document then you will need to collect the phases using (Document.Phases) from Clockworks package

I have as well a node for Phase, and nodes for IFC export…