Loads add-ins from the given packageContents.xml file.

Namespace: Autodesk.Revit.UI
Assembly: RevitAPIUI (in RevitAPIUI.dll) Version: 21.0.0.0 (21.1.1.109)
Since: 2014

Syntax

C#
public void LoadPackageContents(
	string packageContentsPath
)
Visual Basic
Public Sub LoadPackageContents ( _
	packageContentsPath As String _
)
Visual C++
public:
void LoadPackageContents(
	String^ packageContentsPath
)

Parameters

packageContentsPath
Type: System..::..String
The name of package contents file

Exceptions

ExceptionCondition
Autodesk.Revit.Exceptions..::..FileArgumentNotFoundExceptionThrown when manifest file which is specified by packageContentsPath doesn't exist.
Autodesk.Revit.Exceptions..::..ArgumentNullExceptionThrown if the add-in file path specified by packageContentsPath is null, Or packageContentsPath is null.
Autodesk.Revit.Exceptions..::..ArgumentExceptionThrown if the add-in specified by packageContentsPath doesn't end with 'addin' or packageContentsPath is a zero-length string.
Autodesk.Revit.Exceptions..::..FileNotFoundExceptionThrown if the packageContentsPath is not found.
Autodesk.Revit.Exceptions..::..ApplicationExceptionThrown if the manifest file specified by packageContentsPath can't be parsed successfully.
Autodesk.Revit.Exceptions..::..InvalidOperationExceptionThrown 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.
Autodesk.Revit.Exceptions..::..InternalExceptionThrown if packageContentsPath file that was found could not be loaded.

See Also