What is the best way to transfer or create geometry from an IFC file into a component loadable family?

What is the best way to transfer or create geometry from an IFC file into a component loadable family?

Jan-GJ
Explorer Explorer
417 Views
2 Replies
Message 1 of 3

What is the best way to transfer or create geometry from an IFC file into a component loadable family?

Jan-GJ
Explorer
Explorer

Hi there,

 

For a project of mine, I would like to read in an IFC file by myself and create or transfer the geometry contained within the IFC's prototype into a new component loadable family. The only way I got it to work so far was to internally link the IFC file through Revit (which I want to avoid) and then retrieve the geometry information from the linked Revit project. Best case scenario for me would be I read in the IFC file and can automatically create the geometry trough the revitAPI inside the component loadable family. This way I do not lose the geometry information from the IFC.

 

If any of you could point me to some useful resources or maybe even a code example it would be extremely useful.

0 Likes
418 Views
2 Replies
Replies (2)
Message 2 of 3

jeremy_tammik
Alumni
Alumni

Originally, the standard way to achieve what you describe was to create a family definition RFA file and load that into your project. Here is some information on creating your own family definition and loading it:

  

  

However, this requires several steps: 

  

  • Create the RFA family definition
  • Load the RFA into the project
  • Place family instance(s)

  

To reduce this overhead, the DirectShape element was introduced. It enables you to define, create and place geometry directly into the project directly, without the intermediate family definition creation:

  

  

I believe one driving force for implementing it was the IFC import, which makes extensive use of direct shapes.

    

One very simple method to place all your IFC geometry into the project in one fell swoop might be to flatten it all into a direct shape:

  

  

Jeremy Tammik Developer Advocacy and Support + The Building Coder + Autodesk Developer Network + ADN Open
0 Likes
Message 3 of 3

Jan-GJ
Explorer
Explorer

@jeremy_tammik thank you for the fast response. I will look into the resources you provided. I already create a direct shape inside of the family but my problem is more on how to create the needed geometry Objects for the .setShape() method of the direct shape. So i wont need to link the IFC file first to get the geometry Objects from the Revit project but rather create the geometry objects myself from the IFC data.

0 Likes