UpdaterRegistryUnregisterUpdater(UpdaterId, Document) Method

Unregisters an updater for the given document.

Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 26.0.4.0 (26.0.4.0)
Syntax
public static void UnregisterUpdater(
	UpdaterId id,
	Document document
)

Parameters

id  UpdaterId
Id of updater to be unregistered.
document  Document
Document for which this updater is to be unregistered.
Exceptions
ExceptionCondition
ArgumentException Updater with this Id is not currently registered in the document.
ArgumentNullException A non-optional argument was null
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.
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.

See Also