UnloadLocally Method


Revit Link Type Unload Locally Method

Unloads a Revit link for the current user only.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 25.0.0.0 (25.0.0.0)
Syntax
public bool UnloadLocally(
	ISaveSharedCoordinatesCallbackForUnloadLocally callback
)

Parameters

callback ISaveSharedCoordinatesCallbackForUnloadLocally
A callback indicating what to do if Revit encounters links which have changes in shared coordinates. The saving options for unloading locally only could be: save the link, not save the link. If , Revit will not save any shared coordinates changes to the link before unloading.

Return Value

Boolean
Returns true if the attempt to unload the link locally was successful.
Exceptions
Exception Condition
FileAccessException The model cannot be accessed due to lack of access privileges.
ForbiddenForDynamicUpdateException The element "this RevitLinkType" is in a ducument which is in dynamic update.
InvalidOperationException The element "this RevitLinkType" is in a family document or a document in in-place edit mode. -or- The element "this RevitLinkType" is in a document which is in an edit mode or is in family mode. -or- The element "this RevitLinkType" is in a read-only document. -or- This functionality is not available in Revit LT. -or- The element "this RevitLinkType" is in non-workshared document. -or- The element "this RevitLinkType" is not in a local model: the model is not workshared or it is central. -or- This RevitLinkType is not a top-level link. -or- The link "this RevitLinkType" is locally unloaded for current user already. -or- There is a transaction phase left open (such as a transaction, sub-transaction of transaction group) at the time of invoking this method.
Remarks

This function unloads the Revit link for the current user, instead of all users, in the workshared files.

If you want to unload the Revit link for all users, please use Unload(ISaveSharedCoordinatesCallback) .

This function should not be called on a Revit link:

  • in a document which is in an edit mode or is in family mode.
  • in a document which is in dynamic update.
  • in a document which is read only.
  • in a document in which there is transaction phase left open.
  • in a non-workshared file.
  • in a central model of workshared file.
  • which is nested.
  • which is unloaded locally already.
See Also