UnregisterUpdater Method (UpdaterId, Document)


Unregisters an updater for the given document.

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

Syntax

C#
public static void UnregisterUpdater(
	UpdaterId id,
	Document document
)
Visual Basic
Public Shared Sub UnregisterUpdater ( _
	id As UpdaterId, _
	document As Document _
)
Visual C++
public:
static void UnregisterUpdater(
	UpdaterId^ id, 
	Document^ document
)

Parameters

id
Type: Autodesk.Revit.DB UpdaterId
Id of updater to be unregistered.
document
Type: Autodesk.Revit.DB Document
Document for which this updater is to be unregistered.

Remarks

Unregistering an updater from a document is only permitted if the updater was explicitly registered for that document.

If the updater was registered in other documents too, the remaining documents will still have the updater assigned.

However, if after unregistering from the document the updater is found not registered in any other (currently open) documents, the updater will be completely removed from the registry including its triggers. Should the updater be registered again later, the triggers need to be re-applied.

Exceptions

Exception Condition
Autodesk.Revit.Exceptions ArgumentException Updater with this Id is not currently registered in the document.
Autodesk.Revit.Exceptions ArgumentNullException A non-optional argument was NULL
Autodesk.Revit.Exceptions InvalidOperationException The updater's owner's AddIn does not match the currently active AddIn, i.e. IUpdater.GetUpdaterId().GetAddInId() differs from the addInId field in the manifest file of the currently executing external application. -or- Attempting to unregister an updater that is currently being executed.

See Also