IFC Export using Document.Export not working
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I'm exporting a model using Document.Export(String, String, IFCExportOptions). It always exports an empty project, with the same filesize, regardless of which IFCExportOptions I set.
The alternative would be using IExporterIFC (https://knowledge.autodesk.com/search-result/caas/CloudHelp/cloudhelp/2016/ENU/Revit-API/files/GUID-...). However, after referencing the dll, the compiler says that:
Error 120 The type or namespace name 'BIM' could not be found (are you missing a using directive or an assembly reference?)
No idea what to do.
Back to Document.Export: The result of the following code is an empty project, when reimporting into Revit 2017 (in order to verify):
IFCExportOptions IFCOptions = new IFCExportOptions();
IFCOptions.FileVersion = IFCVersion.IFC2x3;
IFCOptions.WallAndColumnSplitting = true;
IFCOptions.ExportBaseQuantities = true;
IFCOptions.FilterViewId = v.Id;
IFCOptions.AddOption("IFCVersion", "IFC 2x3 Coordination View 2.0");
IFCOptions.AddOption("ExportInternalRevitPropertySets", "true");
IFCOptions.AddOption("ExportAnnotations ", "true");
IFCOptions.AddOption("SpaceBoundaries ", "0");
IFCOptions.AddOption("VisibleElementsOfCurrentView ", "true");
IFCOptions.AddOption("Use2DRoomBoundaryForVolume ", "true");
IFCOptions.AddOption("UseFamilyAndTypeNameForReference ", "true");
IFCOptions.AddOption("ExportInternalRevitPropertySets ", "true");
IFCOptions.AddOption("ExportIFCCommonPropertySets", "true");
IFCOptions.AddOption("Exportuserdefinedpropertysets", "true");
IFCOptions.AddOption("Export2DElements", "false");
IFCOptions.AddOption("ExportPartsAsBuildingElements", "false");
IFCOptions.AddOption("ExportBoundingBox", "false");
IFCOptions.AddOption("ExportSolidModelRep", "true");
IFCOptions.AddOption("ExportSchedulesAsPsets", "false");
IFCOptions.AddOption("ExportLinkedFiles", "false");
IFCOptions.AddOption("IncludeSiteElevation", "true");
IFCOptions.AddOption("UseActiveViewGeometry", "false");
IFCOptions.AddOption("ExportSpecificSchedules", "false");
IFCOptions.AddOption("TessellationLevelOfDetail", "0.5");
IFCOptions.AddOption("StoreIFCGUID", "true");
IFCOptions.AddOption("ExportRoomsInView", "false");
//Export the model to IFC
doc.Export(TEMP, ifcname, IFCOptions);
Is there an example on the net of an IFC export which actually works? (not code snippets, files/features of mere interest, or tutorials which are irrelevant)