I noticed that Model Derivatives are able to translate Revit to IFC using a specified Export Setting Name. Is it possible to do the same in Design Automation? The Autodesk exporter (Autodesk.IFC.Export.UI) is able to utilize saved export settings, but it can not be used in Design Automation because it depends on RevitAPIUI. Currently, I've tried snipping parts of the source code and putting it into my add-in, but I wonder if there is an easier way to do this.
Update:
Migrated Revit add-in for Revit DA: https://github.com/yiskang/forge-revit-ifc-exporter-appbundle
==========
Unfortunately, it's not builtin in Revit DA I'm afraid, since they come from Autodesk/revit-ifc.
But you may port IFCExportConfigurationsMap.cs, IFCExportConfiguration.cs and Enums to your own Revit addin.
Usage example:
var configurationsMap = new IFCExportConfigurationsMap();
//configurationsMap.Add(IFCExportConfiguration.GetInSession());
configurationsMap.AddBuiltInConfigurations();
configurationsMap.AddSavedConfigurations();
var selectedConfig = configurationsMap["IFC2x3 Coordination View 2.0"];
var exportOptions = new IFCExportOptions();
ElementId activeViewId = document.ActiveView.Id;
selectedConfig.ActiveViewId = selectedConfig.UseActiveViewGeometry ? activeViewId.IntegerValue : -1;
selectedConfig.UpdateOptions(exportOptions, activeViewId);
bool result = document.Export(path, fileName, exportOptions);
refs: