GetResourceVersionStatus Method


Implement this method to indicate whether the given version of a resource is the most current version of the data.

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

Syntax

C#
ResourceVersionStatus GetResourceVersionStatus(
	ExternalResourceReference reference
)
Visual Basic
Function GetResourceVersionStatus ( _
	reference As ExternalResourceReference _
) As ResourceVersionStatus
Visual C++
ResourceVersionStatus GetResourceVersionStatus(
	ExternalResourceReference^ reference
)

Parameters

reference
Type: Autodesk.Revit.DB ExternalResourceReference
The ExternalResourceReference to check.

Return Value

An enum indicating whether the resource is current, out of date, or of unknown status.

Remarks

If Revit already has a version of this resource loaded, Revit will invoke this method to check whether the resource's data will change if LoadResource(Guid, ExternalResourceType, ExternalResourceReference, ExternalResourceLoadContext, ExternalResourceLoadContent) is called. If this method returns ResourceVersionStatus.Current, then Revit will improve model performance by not calling LoadResource(Guid, ExternalResourceType, ExternalResourceReference, ExternalResourceLoadContext, ExternalResourceLoadContent) .

Note that this method may also be invoked to determine the behavior of certain elements within the user interface. For example, it may be used to warn the user if they are about to execute certain expensive operations (such as printing) with an outdated version of this resource.

Servers which encounter errors should return ResourceVersionStatus.Unknown. Revit will reload resources whose version status is unknown, but will not display out-of-date warnings to the user on printing.

See Also