Customize IFC export

Customize IFC export

Anonymous
1,510 Views
3 Replies
Message 1 of 4

Customize IFC export

Anonymous
Not applicable

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 😉

0 Likes
Accepted solutions (1)
1,511 Views
3 Replies
Replies (3)
Message 2 of 4

Joe.Ye
Alumni
Alumni
Accepted solution
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
0 Likes
Message 3 of 4

Anonymous
Not applicable
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 ...
0 Likes
Message 4 of 4

duncan.lithgow
Enthusiast
Enthusiast

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?