Creates a new ImageType element and loads the image into it.
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 24.0.0.0 (24.0.0.0)
Since: 2020
Syntax
C# |
---|
|
Visual Basic |
---|
|
Visual C++ |
---|
|
Parameters
- document
- Type: Autodesk.Revit.DBDocument
The document.
- options
- Type: Autodesk.Revit.DBImageTypeOptions
Options that specify what image to load.
Return Value
The new ImageType.Remarks
The ImageType will be created but will not be placed into any view.
Exceptions
Exception | Condition |
---|---|
Autodesk.Revit.ExceptionsArgumentException | 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. |
Autodesk.Revit.ExceptionsArgumentNullException | A non-optional argument was null |
Autodesk.Revit.ExceptionsFileArgumentNotFoundException | The image file does not exist. |
Autodesk.Revit.ExceptionsModificationForbiddenException | 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.ExceptionsModificationOutsideTransactionException | The document has no open transaction. |