Export Method (String, String, IFCExportOptions)

Exports the document to the Industry Standard Classes (IFC) format.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 2015.0.0.0 (2015.0.0.0)


public bool Export(
	string folder,
	string name,
	IFCExportOptions options
Visual Basic
Public Function Export ( _
	folder As String, _
	name As String, _
	options As IFCExportOptions _
) As Boolean
Visual C++
bool Export(
	String^ folder, 
	String^ name, 
	IFCExportOptions^ options


Type: System String
Output folder into which the file will be exported. The folder must exist.
Type: System String
Either the name of a single file or a prefix for a set of files. If empty, automatic naming will be used.
Type: Autodesk.Revit.DB IFCExportOptions
Various options applicable to the IFC format. If a null reference ( Nothing in Visual Basic) , all options will be set to their respective default values.

Return Value

True if successful, otherwise False.


Exporting to IFC requires that document is modifiable, therefore there must be a transaction already open when this method is called.

This method may not be invoked during dynamic update, for the internal routine might need to modify the existing transaction.


Exception Condition
Autodesk.Revit.Exceptions ArgumentException NullOrEmpty -or- Contains invalid characters
Autodesk.Revit.Exceptions ArgumentNullException A non-optional argument was NULL
Autodesk.Revit.Exceptions FileArgumentNotFoundException The IFCExportOptions FamilyMappingFile does not exist.
Autodesk.Revit.Exceptions ForbiddenForDynamicUpdateException This method may not be called during dynamic update.
Autodesk.Revit.Exceptions InvalidOperationException Export is temporarily disabled. -or- Exporting is not allowed in the current application mode. -or- This Document is not a project document.
Autodesk.Revit.Exceptions InvalidPathArgumentException The folder does not exist.
Autodesk.Revit.Exceptions ModificationForbiddenException The document is in failure mode: an operation has failed, and Revit requires the user to either cancel the operation or fix the problem (usually by deleting certain elements). -or- The document is being loaded, or is in the midst of another sensitive process.
Autodesk.Revit.Exceptions ModificationOutsideTransactionException The document has no open transaction.
Autodesk.Revit.Exceptions OptionalFunctionalityNotAvailableException The IFC module is not available in the installed Revit.

See Also