IFC Batch Export Through Phases

#1

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.

A

Thank you in advance.

0 Likes

#2

Hi @blsalvio,

The option for the phase is not visible in the Revit API.
https://apidocs.co/apps/revit/2019/666a023b-dad9-4246-079c-1c4e8070bec9.htm
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.

0 Likes

#3

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…

0 Likes

#4

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

0 Likes

#5

@Alban_de_Chasteigner
I am not sure what you are answering here… exporting the phase is a Revit API call.
http://www.revitapidocs.com/2019/74b280e6-bccb-703b-e63d-341bc64ed729.htm

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…

0 Likes

#7

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

0 Likes

#8

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

0 Likes