SetPath Method (String, Boolean)


Update the path of the file that specifies the image to be used.

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

Additionally, indicate whether the path used by ImageType should be absolute or relative.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 22.0.0.0 (22.1.0.0)
Since: 2020

Syntax

C#
public void SetPath(
	string path,
	bool useRelativePath
)
Visual Basic
Public Sub SetPath ( _
	path As String, _
	useRelativePath As Boolean _
)
Visual C++
public:
void SetPath(
	String^ path, 
	bool useRelativePath
)

Parameters

path
Type: System String
The file path that specifies the image to be used.
useRelativePath
Type: System Boolean
True if ImageType should use a relative path, false otherwise.

Exceptions

Exception Condition
Autodesk.Revit.Exceptions ArgumentNullException A non-optional argument was null

See Also

ArchiLabs Desktop

Put AI to work inside Revit.

Give Desktop your instructions and project files to build Revit families, update model elements, and create views and schedules. Works directly in Revit and AutoCAD.

Explore Desktop →