Export single element IFC file

Hi everyone, I am trying to classify each element into a specific cost item for Bill of Quantity. So I want to get the element IFC files separately as the input of the classification model (Maybe extract the text information of the single element IFC to classify it). So I am wondering can dynamo help to export the IFC file of single component in a model? For example, there is a model comprised of 400 columns, 300 beams, and 100 slabs, can dynamo export the corresponding 400 column IFCs, 300 beam IFCs, and 100 slab IFCs (i.e., 800 component IFC files in total, not a model IFC file which can be exported by Revit itself directly). Thanks!

You could get all elements in the document, and then for each of them make a new 3D view with only that element visible. You can then export the 3D views as IFCs. Just make sure you have an IFC settup with the export only visible elements in view option ticked.
I’m also not sure which packages would help you with this (or if you need them at all) but this is how I would try to approach the question.
You could always do this using python scripts in your Dynamo script.

Thank you @d.kuurman. But it would be very time-consuming to make the element visible and then export it for hundreds of elements, right? Or do you know how to automate this process?
What do you mean by using python scripts in the dynamo script? I did not get it quite well. Thanks!

Well the making of the 3D views, hiding of unwanted elements and exporting would be done in Dynamo right? Otherwise it’s a ton of work and nobody wants to do that.

I found a topic that might intrest you and help you setting up a Dynamo script on the IFC part.

For the hiding elements part I would first get all elements in the basic 3D view. Now you have the elements. Now you can itterate though the newly created 3D views list and hide every element except for the element with the same index as the itteration of the 3D view.

For the python scripts, if you’re not yet familiar with it I would not recommend using it except if you’re willing to learn python and use the Revit API.

1 Like

Hi Hao,

Here is how you can automate this process :


Families create 3D views and export IFC.dyn (16.1 KB)

4 Likes

Hi Alban,

Thank you @Alban_de_Chasteigner for this file! But when I tested it with the sample rvt file, the Boundingbox node failed, shown as “Element.getboundingbox operation failed”, and there were no IFC exported. Do you know why? Thanks!


Sample file: https://drive.google.com/file/d/1EwR5jfp7YQtDeJ9ElCkJJuiv307krG-d/view?usp=sharing

You must filter the boundingboxes null values (probably 2D elements) :

Thank you @Alban_de_Chasteigner. I tried but the error still remained. There were no views created and no IFCs exported

Create 3D views and export IFC.dyn (24.7 KB)

You had prohibited characters in the list of you view names.
Use the Remove Special Characters from String node.

1 Like

Worked! Thank you all very much! @Alban_de_Chasteigner @d.kuurman