revit-ifc icon indicating copy to clipboard operation
revit-ifc copied to clipboard

INQ: IFC export trough API

Open rploegmakers opened this issue 10 months ago • 3 comments

Inquiry description

We have our own plugin to make it easy for our modellers to export to IFC with the correct settings. We'd like to add the options to choose the coordinate base (so they can choose to use the Survey Point or the Project Base Point as a coordinate base). Our programmer could not find an option to build this. Can it be done? And if it's possible how can we implement this?

Thanks!

Revit Version

2024.0.x

IFC for Revit Addon Version

24.x.x

Windows Version

11 21H2

rploegmakers avatar Apr 23 '24 11:04 rploegmakers

It is already possible. Your programmer should parse to IFCExportConfiguration create a config. After that it can be used in Revit API.

denizmaral avatar May 10 '24 11:05 denizmaral

Hi Denizmaral,

Thanks for the reply. Good to hear this is possible.

As I understand it our programmer indeed creates an IFCExportConfiguration which then is used for exporting. We're not sure how to implement the base coordinates settings in the IFCExportConfiguration. Could you provide or point to an example maybe? Would be much appreciated!

rploegmakers avatar May 24 '24 07:05 rploegmakers

After creating the configuration, he should do that:

opt = IFCExportOptions()
configuration.UpdateOptions(opt, viewId)
opt.FilterViewId = viewId
result = doc.Export(zielVerzeichnis, dateiName, opt)

denizmaral avatar May 24 '24 07:05 denizmaral