Unload Method


Unloads the Revit link.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 16.0.0.0 (16.0.0.0)
Since: 2014

Syntax

C#
public void Unload(
	ISaveSharedCoordinatesCallback callback
)
Visual Basic
Public Sub Unload ( _
	callback As ISaveSharedCoordinatesCallback _
)
Visual C++
public:
void Unload(
	ISaveSharedCoordinatesCallback^ callback
)

Parameters

callback
Type: Autodesk.Revit.DB ISaveSharedCoordinatesCallback
A callback indicating what to do if Revit encounters links which have changes in shared coordinates. If a null reference ( Nothing in Visual Basic) , Revit will not save any shared coordinates changes to the link before unloading.

Remarks

This function regenerates the document.

The document's Undo history will be cleared by this command. As a result, this command and others executed before it cannot be undone. All transaction phases (e.g. transactions transaction groups and sub-transaction) that were explicitly started must be finished prior to calling this method.

Exceptions

Exception Condition
Autodesk.Revit.Exceptions ForbiddenForDynamicUpdateException The function is not permitted during dynamic update.
Autodesk.Revit.Exceptions InvalidOperationException This RevitLinkType is not a top-level link. -or- The element "this RevitLinkType" is in a closed workset. -or- Revit could not save shared coordinates changes to the link or one of its nested links. -or- There is a transaction phase left open (such as a transaction, sub-transaction of transaction group) at the time of invoking this method. -or- The document is read-only. It cannot be modified. -or- The document is in an edit mode or is in family mode.

See Also