Revit 2026 API
ApplicationOpen |
Opens an IFC document from disk using custom options.
Namespace: Autodesk.Revit.ApplicationServices
Assembly: RevitAPI (in RevitAPI.dll) Version: 26.0.4.0 (26.0.4.0)
Syntax
public Document OpenIFCDocument( string fileName, IFCImportOptions importOptions )
Public Function OpenIFCDocument ( fileName As String, importOptions As IFCImportOptions ) As Document
public: Document^ OpenIFCDocument( String^ fileName, IFCImportOptions^ importOptions )
member OpenIFCDocument : fileName : string * importOptions : IFCImportOptions -> Document
Parameters
- fileName String
- The IFC file to be opened.
- importOptions IFCImportOptions
- The options for this import.
Return Value
DocumentThe newly created document containing the IFC file.
| Exception | Condition |
|---|---|
| ArgumentException | If 'fileName' is an empty string. |
| ArgumentNullException | A non-optional argument was null |
| FileArgumentNotFoundException | If the file specified by 'fileName' cannot be found. |
| InvalidOperationException | If Revit is missing document templates or if the file cannot be opened. |
See Also