OpenIFCDocument Method (String, IFCImportOptions)


Opens an IFC document from disk using custom options.

Namespace: Autodesk.Revit.ApplicationServices
Assembly: RevitAPI (in RevitAPI.dll) Version: 2015.0.0.0 (2015.0.0.0)
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

Exception Condition
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