2024 Class
Changes 1
C

ExternalResourceBrowserData

Description:
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.
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.

Inheritance Hierarchy:
System.Object
  Autodesk.Revit.DB.ExternalResourceBrowserData
public class ExternalResourceBrowserData : IDisposable
Name Return Type Description
C ExternalResourceBrowserData(Document, Guid, String, ExternalResourceMatchOptions) None Constructs a new ExternalResourceBrowserData using the given document(optional), server id, folder path and match options.
Name Return Type Description
M AddResource(String) None Adds an external resource to the folder path by supplying the resource name.
M AddResource(String, IDictionary<String, String>) None Adds an external resource to the folder path by supplying the resource name and reference information.
M AddResource(String, String) None Adds an external resource to the folder path by supplying the resource name and version.
M AddResource(String, String, IDictionary<String, String>) None Adds an external resource to the folder path by supplying the resource name, version and reference information.
M AddSubFolder(String) None Adds a subfolder to the folder path with the given name.
M AddSubFolder(String, String) None Adds a subfolder to the folder path with the given name and icon type.
M CallingDocumentHasModelPath() bool Indicates whether the document requesting the external resource browser data has a defined ModelPath.
M Dispose() None Releases all resources used by the
M GetCallingDocumentModelPath() ModelPath Returns a copy of the ModelPath of the document that is requesting the external resource browser data.
M GetMatchOptions() ExternalResourceMatchOptions Gets the match options used to filter external resources.
M GetResources() IList<ExternalResourceReference> Gets the external resources under the folder path of the browser data.
M GetSubFoldersData() IList<ExternalResourceSubFolder> Gets the subfolders data under the folder path of the browser data.
M IsValidFolderName(String) bool Checks whether the folder name is valid.
M IsValidResourceName(String) bool Checks whether the resource name is valid.
Name Return Type Description
P FolderPath string The current folder path to which the new resources and subfolder belong.
P IsValidObject bool Specifies whether the .NET object represents a valid Revit entity.
P ServerId Guid The Id of IExternalResourceServer which handles the external resource load.