ImageTypeOptions Constructor (ExternalResourceReference, ImageTypeSource)


Image Type Options(External Resource Reference, Image Type Source) Constructor

Constructs a new instance of the ImageTypeOptions object.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public ImageTypeOptions(
	ExternalResourceReference resourceReference,
	ImageTypeSource sourceType
)

Parameters

resourceReference ExternalResourceReference
An external resource reference to an image.
sourceType ImageTypeSource
Specifies the image type source. Valid values are 'Import' and 'Link'.
Exceptions
Exception Condition
ArgumentException The ImageType source is not correct. Only Link or Import values are allowed.
ArgumentNullException A non-optional argument was null
ArgumentOutOfRangeException A value passed for an enumeration argument is not a member of that enumeration
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.

See Also