ExportImage Method


Exports a view or set of views into an image file.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 24.0.0.0 (24.0.0.0)
Since:  2011

Syntax

C#
public void ExportImage(
	ImageExportOptions options
)
Visual Basic
Public Sub ExportImage ( _
	options As ImageExportOptions _
)
Visual C++
public:
void ExportImage(
	ImageExportOptions^ options
)

Parameters

options
Type: Autodesk.Revit.DBImageExportOptions
The options which govern the image export.

Exceptions

ExceptionCondition
Autodesk.Revit.ExceptionsArgumentException The current view cannot be exported as an image
Autodesk.Revit.ExceptionsArgumentNullException A non-optional argument was null
Autodesk.Revit.ExceptionsFileAccessException The path indicated could not be accessed.
Autodesk.Revit.ExceptionsFileNotFoundException The path indicated could not be found.
Autodesk.Revit.ExceptionsInvalidOperationException Exporting is not allowed in the current application mode. -or- Failed to export image due to an error with the inputs. -or- Failed to export image due to an issue where the DirectX Device was lost.
Autodesk.Revit.ExceptionsOptionalFunctionalityNotAvailableException The Graphics module is not available in the installed Revit.

See Also

ArchiLabs

Stop fighting Revit automation.

Build repeatable BIM design and documentation workflows with scripts, data, and AI in one place, without wrestling brittle one-off automations.

Try ArchiLabs →