2020 Class
Changes 0
C

ExternalResourceReference

Description:
This class identifies an external resource provided by an IExternalResourceServer.
Remarks:

The class contains:

  • The id of the IExternalResourceServer from which the resource was obtained.
  • A (String, String) map containing information that is meaningful to the server for accessing the desired data. This could be something as simple as "4" to indicate that Revit wants option 4 from a range of several choices, or something more detailed, such as a filename or directory path.
  • A String indicating the version of the resource that was most recently loaded in Revit.
  • A (String, String) map containing "in session" information that is meaningful to the server, but which does not need to be saved permanently in the document on disk.

When calling an IExternalResourceServer, Revit will provide an ExternalResourceReference to identify the specific resource that Revit is using from that server. The server can then use the relevant information in the (String, String) maps to retrieve the data from the correct source.

Inheritance Hierarchy:
System.Object
  Autodesk.Revit.DB.ExternalResourceReference
Name Return Type Description
C ExternalResourceReference(ExternalResourceReference) None Creates a new ExternalResourceReference from the given ExternalResourceReference.
C ExternalResourceReference(Guid, IDictionary<String, String>, String, String) None Creates a new ExternalResourceReference from the given data.
Name Return Type Description
M CreateLocalResource(Document, ExternalResourceType, ModelPath, PathType) ExternalResourceReference Creates an ExternalResourceReference representing a local file managed by Revit's built-in server.
M Dispose() None Releases all resources used by the
M GetReferenceInformation() IDictionary Returns a copy of an object containing previously-stored reference or lookup information about the specific resource provided by the server.
M GetResourceShortDisplayName() string Gets the short display name of the external resource.
M GetResourceVersionStatus() ResourceVersionStatus Checks whether this ExternalResourceReference corresponds to the current version of the resource.
M HasValidDisplayPath() bool Checks whether this external Resource has a valid display path.
M IsValidReference(ExternalResourceType) bool Checks whether the reference is in a valid format.
Name Return Type Description
P InSessionPath string The path stores the full display path which includes the server name plus the path provided by ExternalResourceServer.The path that Revit will present for user recognizing and browsing to this resource during one session of Revit.
P IsValidObject bool Specifies whether the .NET object represents a valid Revit entity.
P ServerId Guid The id of the server that Revit is expecting to provide the external resource.
P Version string The version of the external data that was most recently loaded in Revit.