Revit API Forum
Welcome to Autodesk’s Revit API Forums. Share your knowledge, ask questions, and explore popular Revit API topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Customize IFC export

3 REPLIES 3
SOLVED
Reply
Message 1 of 4
Anonymous
1299 Views, 3 Replies

Customize IFC export

Hi all,

 

I would like to make, via Revit 2014 API, an IFC export of the current opened document.

 

Obviously, I can call programmatically the IFC export process (Document.Export + IFCExportOptions) but my problem is that I need to add some informations to the exported data.

Namely, I want to add specific Property Sets to exported Windows, Doors, Spaces, etc ...

 

One way to do this could be to recompile the Open Source IFC exporter with some modifications.

A second (ugly) way would be to let Revit write the IFC file, then re-open it, parse it, and add relevant informations before rewrite it on disk.

Both solutions are bad.

 

The best way would be to override the default IFC exporter engine process, to catch IFC informations before file creation and add needed data.

 

Is there a mechanism I could use to do this ?

Thanks 😉

3 REPLIES 3
Message 2 of 4
Joe.Ye
in reply to: Anonymous

Hello, The designed way is to add code to the individual element's exporter code in the IFC open source code to customize the IFC export. You can export more extended data in this way. The process is rather straightforward. In the open source project, there is a class for each kind of element in Revit. For example, the WallExporter, FloorExporter. You just need to change the code in these export classes, the you can customize the IFC export. >>>The best way would be to override the default IFC exporter engine process, to catch IFC informations before file creation and add needed data. Revit didn't expose this way to add extended data.


Joe Ye
Contractor
Developer Technical Services
Autodesk Developer Network
Message 3 of 4
Anonymous
in reply to: Joe.Ye

Thanks Joe for your reply,

Recompile the OpenSource IFC exporter has a major drawback :

By doing this, I force the end user to use my own exporter, which may be completely out of date (I don't want to recompile and reship my addin after each IFC OpenSource updates) or far less powerfull than another third party exporter chosen by the user.

I've resolved to use the ugly way ...
Message 4 of 4
duncan.lithgow
in reply to: Anonymous

Why not submit changes to the opensource IFC exporter so user interaction or reading from some config file can do what you want. Assuming there are more than just you who want this functionality then it would be accepted into the IFC exporter. Isn't that part of the point of making it OpenSource?

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Rail Community