Creates an image view from the currently active view.
Namespace: Autodesk.Revit.DBAssembly: RevitAPI (in RevitAPI.dll) Version: 21.0.0.0 (21.1.1.109)
Since: 2011
Syntax
C# |
---|
public ElementId SaveToProjectAsImage( ImageExportOptions options ) |
Visual Basic |
---|
Public Function SaveToProjectAsImage ( _ options As ImageExportOptions _ ) As ElementId |
Visual C++ |
---|
public: ElementId^ SaveToProjectAsImage( ImageExportOptions^ options ) |
Parameters
- options
- Type: Autodesk.Revit.DB..::..ImageExportOptions
The options which govern the image creation.
Return Value
Id of the newly created view if the operation succeeded, invalid element id otherwise.
Exceptions
Exception | Condition |
---|---|
Autodesk.Revit.Exceptions..::..ArgumentException | options object is invalid: the ExportRange is invalid, must be CurrentView or VisibleRegionOfCurrentView, or the ViewName is invalid, must be non-empty, unique and should not contain prohibited characters. -or- The current view cannot be exported as an image |
Autodesk.Revit.Exceptions..::..ArgumentNullException | A non-optional argument was NULL |