ExternalResourceBrowserData Class

Represents a collection of external resources and external resource folders to be presented as the content of a folder in the file browser in Revit.
Inheritance Hierarchy
SystemObject
  Autodesk.Revit.DBExternalResourceBrowserData

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

The ExternalResourceBrowserData type exposes the following members.

Constructors
 NameDescription
Public methodExternalResourceBrowserData Constructs a new ExternalResourceBrowserData using the given document(optional), server id, folder path and match options.
Top
Properties
 NameDescription
Public propertyFolderPath The current folder path to which the new resources and subfolder belong.
Public propertyIsValidObject Specifies whether the .NET object represents a valid Revit entity.
Public propertyServerId The Id of IExternalResourceServer which handles the external resource load.
Top
Methods
 NameDescription
Public methodAddResource(String) Adds an external resource to the folder path by supplying the resource name.
Public methodAddResource(String, IDictionaryString, String) Adds an external resource to the folder path by supplying the resource name and reference information.
Public methodAddResource(String, String) Adds an external resource to the folder path by supplying the resource name and version.
Public methodAddResource(String, String, IDictionaryString, String) Adds an external resource to the folder path by supplying the resource name, version and reference information.
Public methodAddSubFolder(String) Adds a subfolder to the folder path with the given name.
Public methodAddSubFolder(String, String) Adds a subfolder to the folder path with the given name and icon type.
Public methodCallingDocumentHasModelPath Indicates whether the document requesting the external resource browser data has a defined ModelPath.
Public methodDisposeReleases all resources used by the ExternalResourceBrowserData
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 browser data.
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetMatchOptions Gets the match options used to filter external resources.
Public methodGetResources Gets the external resources under the folder path of the browser data.
Public methodGetSubFoldersData Gets the subfolders data under the folder path of the browser data.
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodIsValidFolderName Checks whether the folder name is valid.
Public methodIsValidResourceName Checks whether the resource name is valid.
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Top
Remarks

This data represents the contents to be shown to the user while they are browsing a specific folder in Revit.

The folder path can be obtained from the FolderPath property.

The external resource server is expected to populate all of the available resources and subfolders that should appear in the Revit file browser while the browser is open to this particular folder.

If the user navigates to another folder, a different ExternalResourceBrowserData object will be provided to allow the server to populate resources at that location.

When adding resource and subfolder, the resource and subfolder should not be added recursively.

When adding resource and subfolder, the name should be unique short name(without folder).

The name of resource and subfolder should not contain any invalid character of \/:*?"<>|.

The length of resource combined path(server name + folder path + resource name) should not exceed 259; The length of subfolder also has same restriction.

See Also