Opens an IFC document from disk using custom options.

Namespace: Autodesk.Revit.ApplicationServices
Assembly: RevitAPI (in RevitAPI.dll) Version: 21.0.0.0 (21.1.1.109)
Since:  2015

Syntax

C#
public Document OpenIFCDocument(
	string fileName,
	IFCImportOptions importOptions
)
Visual Basic
Public Function OpenIFCDocument ( _
	fileName As String, _
	importOptions As IFCImportOptions _
) As Document
Visual C++
public:
Document^ OpenIFCDocument(
	String^ fileName, 
	IFCImportOptions^ importOptions
)

Parameters

fileName
Type: System..::..String
The IFC file to be opened.
importOptions
Type: Autodesk.Revit.DB.IFC..::..IFCImportOptions
The options for this import.

Return Value

The newly created document containing the IFC file.

Exceptions

ExceptionCondition
Autodesk.Revit.Exceptions..::..ArgumentException If 'fileName' is an empty string.
Autodesk.Revit.Exceptions..::..ArgumentNullException A non-optional argument was NULL
Autodesk.Revit.Exceptions..::..FileArgumentNotFoundException If the file specified by 'fileName' cannot be found.
Autodesk.Revit.Exceptions..::..InvalidOperationException If Revit is missing document templates or if the file cannot be opened.

See Also