ExternalResourceLoadContext Class

This class contains data describing the context related to an external resource load operation.
Inheritance Hierarchy
SystemObject
  Autodesk.Revit.DBExternalResourceLoadContext

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

The ExternalResourceLoadContext type exposes the following members.

Properties
 NameDescription
Public propertyIsValidObject Specifies whether the .NET object represents a valid Revit entity.
Public propertyLoadOperationType An enum value indicating whether the resource load was triggered by an automatic event (such as file open) or an explicit user action.
Top
Methods
 NameDescription
Public methodCallingDocumentHasModelPath Indicates whether the document requesting the external resource has a defined ModelPath.
Public methodDisposeReleases all resources used by the ExternalResourceLoadContext
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Public methodGetCallingDocumentModelPath Returns a copy of the ModelPath of the document that is requesting the external resource.
Public methodGetCurrentlyLoadedReference Returns a copy of the ExternalResourceReference currently in use by the containing element.
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

Note that automatic loads can occur in the context of other operations such as opening a file. During automatic loads, it is therefore recommended that the server only display UI that is critical for the user to see (such as error message).

The loading operation type is Explicit when the user is specifically trying to reload the resource. During explicit loads, it may be desirable to provide more feedback to the user, such as specific feedback that the load operation succeeded.

See Also