Revit 2025 API
External |
Adds an external resource to the folder path by supplying the resource name and reference information.
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public void AddResource( string resourceName, IDictionary<string, string> referenceInformation )
Public Sub AddResource ( resourceName As String, referenceInformation As IDictionary(Of String, String) )
public: void AddResource( String^ resourceName, IDictionary<String^, String^>^ referenceInformation )
member AddResource : resourceName : string * referenceInformation : IDictionary<string, string> -> unit
Parameters
- resourceName String
- The unique short name of external resource.
- referenceInformation IDictionaryString, String
- The (String, String) map containing reference or lookup information that will be stored in Revit.
| Exception | Condition |
|---|---|
| ArgumentException | The resourceName is not a valid resource name used to display in Revit external resource browse UI. The name should be a unique non-empty short name and it should not contain any invalid character of \\/:*?"<>|. The length of combined path(server name + folder path + resourceName) should not exceeds 259. |
| ArgumentNullException | A non-optional argument was null |
See Also