How to Export Revit Linked Model to IFC Programmatically with C# API
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi, I have the following situation: a georeferenced Model A that includes within it a link to a model B (not georeferenced). I need to export both model A and model B in IFC format with the georeferenced elements depending on the position with which the model was connected in A. From Revit, through the user interface, I can obtain the desired result by selecting the “Export linked files as separate IFC” option and launching it from model A, two different files are exported, one of which corresponds to the georeferenced model B.
Using the Revit API with C#, in particular by configuring the IFCExportConfiguration object and setting the relevant parameter for exporting linked models (ExportLinkedFiles) to true, only the file containing model A is exported (without any element contained in model B ); if instead I proceed to manually export model B following the export of model A, acting on the Document object obtained from the GetLinkDocument method of the RevitLinkInstance object, I am able to export B but without the georeferenced elements.
I would like to know, since Revit can perform the operation correctly, what steps should I perform programmatically to obtain the same result.
Thank you.