Export the model in gbXML (green-building) format.
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 26.1.0.0 (26.1.0.34)
Syntax
C#
public bool Export( string folder, string name, GBXMLExportOptions options )
Parameters
- folder String
- Indicates the path of a folder where to export the gbXML file.
- name String
- Indicates the name of the gbXML file to export. If it doesn't end with ".xml", extension ".xml" will be added automatically. The name cannot contain any of the following characters: \/:*?"<>|. Empty name is not acceptable.
- options GBXMLExportOptions
- Options which control the contents of the export.
Return Value
BooleanTrue if successful, otherwise False.
Exceptions
Exception | Condition |
---|---|
ArgumentException | The path is not valid for exporting gbXML files. -or- The name is empty or not valid for exporting gbXML files. -or- There is no main EnergyAnalysisDetailModel in the document, or the current main EnergyAnalysisDetailModel is not compatible with the option set in the GBXMLExportOptions. |
ArgumentNullException | A non-optional argument was null |
InvalidOperationException | This Document is not a project document. -or- This Document is in an edit mode. -or- Exporting is not allowed in the current application mode. -or- Export is temporarily disabled. |
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. |
ModificationOutsideTransactionException | The document has no open transaction. |