AddTrigger Method (UpdaterId, Document, ElementFilter, ChangeType)


Adds trigger with the specified element filter and ChangeType for the specified 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 AddTrigger(
	UpdaterId id,
	Document document,
	ElementFilter filter,
	ChangeType change
)
Visual Basic
Public Shared Sub AddTrigger ( _
	id As UpdaterId, _
	document As Document, _
	filter As ElementFilter, _
	change As ChangeType _
)
Visual C++
public:
static void AddTrigger(
	UpdaterId^ id, 
	Document^ document, 
	ElementFilter^ filter, 
	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
filter
Type: Autodesk.Revit.DB ElementFilter
Element filter that defines elements that affect this trigger
change
Type: Autodesk.Revit.DB ChangeType
ChangeType associated with this trigger

Remarks

This method only works with CategoryFilter and ParameterFilter.

Exceptions

Exception Condition
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. -or- The id does not correspond to any registered Updaters -or- AddTrigger called while executing an updater.

See Also

ArchiLabs Desktop

Put AI to work inside Revit.

Give Desktop your instructions and project files to build Revit families, update model elements, and create views and schedules. Works directly in Revit and AutoCAD.

Explore Desktop →