GetInSessionPath Method


Implement this method to provide the path that should be used for display and browsing to a given ExternalResourceReference during this Revit session.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 2015.0.0.0 (2015.0.0.0)
Since: 2015

Syntax

C#
string GetInSessionPath(
	ExternalResourceReference reference,
	string originalDisplayPath
)
Visual Basic
Function GetInSessionPath ( _
	reference As ExternalResourceReference, _
	originalDisplayPath As String _
) As String
Visual C++
String^ GetInSessionPath(
	ExternalResourceReference^ reference, 
	String^ originalDisplayPath
)

Parameters

reference
Type: Autodesk.Revit.DB ExternalResourceReference
The ExternalResourceReference for which Revit is requesting the in session display path.
originalDisplayPath
Type: System String
The path that was provided for the resource when the resource was originally loaded into the model.

Return Value

The display path that should be used for this resource for this session of Revit.

Remarks

This method allows an IExternalResourceServer to override the path that is used within this Revit session to display and browse to a specific ExternalResourceReference. This method is provided to accommodate IExternalResourceServers that may present different paths under different circumstances. For example, an IExternalResourceServer might implement this method to return a display path that uses the appropriate language for the user's current locale. An IExternalResourceServer could also use this method to present the appropriate name if the user has renamed this resource since the last time it was loaded. If the IExternalResourceServer does not need to customize the display path, it can return the originalDisplayPath parameter.

Revit will invoke this method when the model is first loaded or before calling LoadResource(Guid, ExternalResourceType, ExternalResourceReference, ExternalResourceLoadContext, ExternalResourceLoadContent) and cache the result in the ExternalResourceReference.

See Also