Constructs a new instance of the ImageTypeOptions object.
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 22.0.0.0 (22.1.0.0)
Since: 2020
Syntax
C# |
---|
|
Visual Basic |
---|
|
Visual C++ |
---|
|
Parameters
- resourceReference
- Type: Autodesk.Revit.DB ExternalResourceReference
An external resource reference to an image.
- sourceType
- Type: Autodesk.Revit.DB ImageTypeSource
Specifies the image type source. Valid values are 'Import' and 'Link'.
Remarks
ImageTypeOptions uses an external resource reference to determine the local path that will be used to open the image file. The operation to obtain the local path requires the resource to be loaded and is performed at a later time when the local path is needed, for example, for validation. See also LoadResource method of IExternalResourceServer .
When the provided external resource reference contains a local file path, the information can include an indication that the path should be treated as a relative path.
Exceptions
Exception | Condition |
---|---|
Autodesk.Revit.Exceptions ArgumentException | The ImageType source is not correct. Only Link or Import values are allowed. |
Autodesk.Revit.Exceptions ArgumentNullException | A non-optional argument was null |
Autodesk.Revit.Exceptions ArgumentOutOfRangeException | A value passed for an enumeration argument is not a member of that enumeration |