Revit 2026 API
UIApplicationLoad |
Loads add-ins from the given packageContents.xml file.
Namespace: Autodesk.Revit.UI
Assembly: RevitAPIUI (in RevitAPIUI.dll) Version: 26.0.4.0 (26.0.4.0)
Syntax
public void LoadPackageContents( string packageContentsPath )
Public Sub LoadPackageContents ( packageContentsPath As String )
public: void LoadPackageContents( String^ packageContentsPath )
member LoadPackageContents : packageContentsPath : string -> unit
Parameters
- packageContentsPath String
- The name of package contents file
| Exception | Condition |
|---|---|
| FileArgumentNotFoundException | Thrown when manifest file which is specified by packageContentsPath doesn't exist. |
| ArgumentNullException | Thrown if the add-in file path specified by packageContentsPath is null, Or packageContentsPath is null. |
| ArgumentException | Thrown if the add-in specified by packageContentsPath doesn't end with 'addin' or packageContentsPath is a zero-length string. |
| FileNotFoundException | Thrown if the packageContentsPath is not found. |
| ApplicationException | Thrown if the manifest file specified by packageContentsPath can't be parsed successfully. |
| InvalidOperationException | Thrown when any of the newly added external applications fails to load and/or initialize properly, possibly because of one of the following reasons: AllowLoadingIntoExistingSession property is 'No'.Client id is duplicated.External application start up failed. |
| InternalException | Thrown if packageContentsPath file that was found could not be loaded. |
See Also