IsValidReference Method


External Resource Reference Is Valid Reference Method

Checks whether the reference is in a valid format.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public bool IsValidReference(
	ExternalResourceType resourceType
)

Parameters

resourceType ExternalResourceType
The type of resource which the ExternalResourceReference should correspond to.

Return Value

Boolean
True if this is a valid ExternalResourceReference. False otherwise.
Exceptions
Exception Condition
ArgumentNullException A non-optional argument was null
Remarks
This function checks:
  • The server id corresponds to a valid server which implements IExternalResourceServer.
  • The server supports the given ExternalResourceType.
  • The reference information is well-formed.
This function does not check whether the resource exists on the server.
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 →