Create an ImageView containing an image imported from disk.
Namespace: Autodesk.Revit.DBAssembly: RevitAPI (in RevitAPI.dll) Version: 26.4.0.0 (26.4.0.0)
Syntax
C#
public static ImageView Create(
Document document,
ImageTypeOptions options
)
Parameters
- document Document
-
The document in which to create the view.
- options ImageTypeOptions
-
Options that specify what image to load.
Return Value
ImageView
The newly created view.
Exceptions
| Exception | Condition |
|---|
| ArgumentException |
document is not a project document.
-or-
The image filename is an empty string.
-or-
The image file is not a supported image file type.
-or-
The image file is password protected.
-or-
The image file does not contain the requested page number.
-or-
The image file could not be read and may be corrupt.
-or-
An error occurred while handling the external resource corresponding to the image.
|
| ArgumentNullException |
A non-optional argument was null
|
| FileArgumentNotFoundException |
The image file does not exist.
|
| 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.
|
See Also
Reference