RegisterUpdater Method (IUpdater)


Registers an updater application-wide, which means the updater may get triggered in any open document.

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

Syntax

C#
public static void RegisterUpdater(
	IUpdater updater
)
Visual Basic
Public Shared Sub RegisterUpdater ( _
	updater As IUpdater _
)
Visual C++
public:
static void RegisterUpdater(
	IUpdater^ updater
)

Parameters

updater
Type: Autodesk.Revit.DB IUpdater
Updater to be registered

Remarks

By registering an updater application-wide, any previous registration explicitly made for particular documents will be voided. That means the updater will no longer be connected with just those documents, and the methodIsUpdaterRegistered(id,document) will also return False. Consequently, any attempt to either register or unregister this updater to (or from, respectively) a document will cause an exception to be thrown.

Exceptions

Exception Condition
Autodesk.Revit.Exceptions ArgumentException Updater with the the same Id has already been registered on the application level. -or- Updater's Id is not valid.
Autodesk.Revit.Exceptions ArgumentNullException A non-optional argument was NULL
Autodesk.Revit.Exceptions InvalidOperationException Method is not allowed during execution of a dynamic update. -or- 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.

See Also