Hello I'm trying to have a stable IFC export (so not view-dependant) from the Revit API. I need all the visible elements but also all the rooms to be exported as IFCSpaces.
Here is the configuration i'm using :
Using the UI, the export id working well and i have IFCSPACES in the output IFC but using the API I have no rooms...
I've tried both the native revit API method :
IFCExportOptionsexportOptions=newIFCExportOptions();exportOptions.AddOption(/*add all options here one by one*/);
And the method provided inside your BIM.IFC.Export.UI :
using(StreamReadersr=newStreamReader(@"C:\Users\MaximeTOUCHARD\Documents\Sof.json")){IFCExportConfigurationconfiguration=JsonConvert.DeserializeObject<IFCExportConfiguration>(sr.ReadToEnd());if(configuration!=null){IFCExportOptionsexportOptions=newIFCExportOptions();configuration.UpdateOptions(exportOptions,ElementId.InvalidElementId);using(Transactiontransaction=newTransaction(document,"Export IFC")){transaction.Start();boolresult=document.Export(@"C:\Users\MaximeTOUCHARD\Documents",Guid.NewGuid().ToString(),exportOptions);// pass in the options hereif(!result){MessageBox.Show("Erreur lors de l'export de l'IFC");}transaction.Commit();}}}
I feel like I've tested a million combination of options and read all the exporter code... I hope I only forget a little magic key thing,
Thanks anyway for taking some time to read,
Regards,
Maxime
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello I'm trying to have a stable IFC export (so not view-dependant) from the Revit API. I need all the visible elements but also all the rooms to be exported as IFCSpaces.
Here is the configuration i'm using :
Using the UI, the export id working well and i have IFCSPACES in the output IFC but using the API I have no rooms...
I've tried both the native revit API method :
And the method provided inside your BIM.IFC.Export.UI :
I feel like I've tested a million combination of options and read all the exporter code... I hope I only forget a little magic key thing,
Thanks anyway for taking some time to read,
Regards,
Maxime