ExternalResourceLoadContent Class

This class contains the actual content data and other results of an external resource load operation that are returned by an IExternalResourceServer to Revit.
Inheritance Hierarchy
SystemObject
  Autodesk.Revit.DBExternalResourceLoadContent
    Autodesk.Revit.DBKeyBasedTreeEntriesLoadContent
    Autodesk.Revit.DBLinkLoadContent

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public class ExternalResourceLoadContent : IDisposable

The ExternalResourceLoadContent type exposes the following members.

Properties
 NameDescription
Public propertyIsValidObject Specifies whether the .NET object represents a valid Revit entity.
Public propertyLoadStatus A value to indicate the status of an external resource load operation. IExternalResourceServers should set this in the LoadResource() method.
Public propertyVersion The version of the external data that the server is providing in this object.
Top
Methods
 NameDescription
Public methodDisposeReleases all resources used by the ExternalResourceLoadContent
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Top
Remarks

When Revit calls the LoadResource method for an IExternalResourceServer, Revit will provide an object that is a sub-class of ExternalResourceLoadContent. The IExternalResourceServer will use this object to return the content Revit should use for the external resource. The server can also add information about any errors that occurred during the load operation. This error information will be stored by Revit and later passed to the associated IExternalResourceUIServer (if any) that designates the IExternalResourceServer as its "DBServer" (see the IExternalResourceUIServer.GetDBServerId() method). The IExternalResourceUIServer can then generate any UI that is required for handling the errors that occurred.

Note that since different kinds of external resources are expected to return different kinds of data to Revit, a number of ExternalResourceLoadContent sub-classes have been created to handle the data for specific ExternalResourceTypes. This base class contains only a string to indicate the version of the resource data that is being supplied by the server and a status variable to indicate the outcome of a load operation. Revit will always provide the server with an instance of the appropriate sub-class of ExternalResourceLoadContent, with internal data that are relevant to the particular ExternalResourceType that is being loaded.

See Also