| Revit 2020.1 API | 
| UpdaterRegistry..::..AddTrigger Method (UpdaterId, Document, ICollection<(Of <(<'ElementId>)>)>, ChangeType) | 
| UpdaterRegistry Class See Also | 
   Adds a trigger to an updater with specified set of elements and ChangeType
Namespace: Autodesk.Revit.DB
Assembly: RevitAPI (in RevitAPI.dll) Version: 20.0.0.0 (20.1.1.1)
Since: 
   2011
 Syntax
Syntax
| C# | 
|---|
| public static void AddTrigger( UpdaterId id, Document document, ICollection<ElementId> elements, ChangeType change ) | 
| Visual Basic | 
|---|
| Public Shared Sub AddTrigger ( _ id As UpdaterId, _ document As Document, _ elements As ICollection(Of ElementId), _ change As ChangeType _ ) | 
| Visual C++ | 
|---|
| public: static void AddTrigger( UpdaterId^ id, Document^ document, ICollection<ElementId^>^ elements, ChangeType^ change ) | 
Parameters
- id
- Type: Autodesk.Revit.DB..::..UpdaterId
 Id of updater that trigger should be added to
- document
- Type: Autodesk.Revit.DB..::..Document
 Document that elements in 'elements' are contained in
- elements
- Type: System.Collections.Generic..::..ICollection<(Of <(<'ElementId>)>)>
 Set of elements which define this trigger
- change
- Type: Autodesk.Revit.DB..::..ChangeType
 ChangeType associated with this trigger
 Exceptions
Exceptions
| Exception | Condition | 
|---|---|
| Autodesk.Revit.Exceptions..::..ArgumentNullException | A non-optional argument was NULL | 
| Autodesk.Revit.Exceptions..::..InvalidOperationException | updater's owner AddIn does not match the currently active AddIn -or- id does not correspond to any registered Updaters -or- AddTrigger called while executing an updater. |