AddTrigger Method (UpdaterId, ElementFilter, ChangeType)


Adds trigger with the specified element filter and ChangeType for all documents associated with this Updater

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

Syntax

C#
public static void AddTrigger(
	UpdaterId id,
	ElementFilter filter,
	ChangeType change
)
Visual Basic
Public Shared Sub AddTrigger ( _
	id As UpdaterId, _
	filter As ElementFilter, _
	change As ChangeType _
)
Visual C++
public:
static void AddTrigger(
	UpdaterId^ id, 
	ElementFilter^ filter, 
	ChangeType^ change
)

Parameters

id
Type: Autodesk.Revit.DBUpdaterId
Id of updater that trigger should be added to
filter
Type: Autodesk.Revit.DBElementFilter
Element filter that defines elements that affect this trigger
change
Type: Autodesk.Revit.DBChangeType
ChangeType associated with this trigger

Remarks

This method only works with CategoryFilter and ParameterFilter.

Exceptions

ExceptionCondition
Autodesk.Revit.ExceptionsArgumentNullException A non-optional argument was null
Autodesk.Revit.ExceptionsInvalidOperationException The updater's owner's AddIn does not match the currently active AddIn. -or- The id does not correspond to any registered Updaters. -or- AddTrigger called while executing an updater.

See Also

ArchiLabs

Stop fighting Revit automation.

Build repeatable BIM design and documentation workflows with scripts, data, and AI in one place, without wrestling brittle one-off automations.

Try ArchiLabs →