OpenIFCDocument Method (String)


Opens an IFC document from disk using default options.

Namespace: Autodesk.Revit.ApplicationServices
Assembly: RevitAPI (in RevitAPI.dll) Version: 24.0.0.0 (24.0.0.0)

Syntax

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

Parameters

fileName
Type: SystemString
The IFC file to be opened.

Return Value

The newly created document containing the IFC file.

Exceptions

ExceptionCondition
Autodesk.Revit.ExceptionsArgumentException If 'fileName' is an empty string.
Autodesk.Revit.ExceptionsArgumentNullException If a null reference (Nothing in Visual Basic) is passed as 'fileName' -or- A non-optional argument was null
Autodesk.Revit.ExceptionsFileArgumentNotFoundException If the file specified by 'fileName' cannot be found.
Autodesk.Revit.ExceptionsInvalidOperationException If Revit is missing document templates or if the file cannot be opened.

See Also