ImageTypeOptions Constructor (String, Boolean, ImageTypeSource)


Constructs a new instance of the ImageTypeOptions object.

The provided string path must specify a local file. The path can be absolute or relative to the project's location.

This constructor saves an additional setting that indicates whether the imagetype will be a link or an import.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 24.0.0.0 (24.0.0.0)
Since:  2021

Syntax

C#
public ImageTypeOptions(
	string path,
	bool useRelativePath,
	ImageTypeSource sourceType
)
Visual Basic
Public Sub New ( _
	path As String, _
	useRelativePath As Boolean, _
	sourceType As ImageTypeSource _
)
Visual C++
public:
ImageTypeOptions(
	String^ path, 
	bool useRelativePath, 
	ImageTypeSource sourceType
)

Parameters

path
Type: SystemString
The file path that specifies the image to be used.
useRelativePath
Type: SystemBoolean
True if ImageType should use a relative path, false otherwise.
sourceType
Type: Autodesk.Revit.DBImageTypeSource
Specifies the image type source. Valid values are 'Import' and 'Link'.

Exceptions

ExceptionCondition
Autodesk.Revit.ExceptionsArgumentException The ImageType source is not correct. Only Link or Import values are allowed.
Autodesk.Revit.ExceptionsArgumentNullException A non-optional argument was null
Autodesk.Revit.ExceptionsArgumentOutOfRangeException A value passed for an enumeration argument is not a member of that enumeration

See Also