Autodesk / revit-ifc

IFC for Revit and Navisworks (2019+)
450 stars 194 forks source link

INQ: IFC export trough API #761

Open rploegmakers opened 2 months ago

rploegmakers commented 2 months ago

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

denizmaral commented 1 month ago

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

rploegmakers commented 1 month ago

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!

denizmaral commented 1 month ago

After creating the configuration, he should do that:

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