Introduction to Revit 2011 API
Dynamic Model Update
Registration
and Triggers
§Register the Updater
§OnStartUp for application level scope
§ExternalCommand for command level scope
§
§
§
§
§Add Trigger
§Change of Scope - list of ElementIds or list of elements via
ElementFilter.
§Change of Type - addition, deletion and modification
§
§
WindowUpdater updater = new WindowUpdater(application.ActiveAddInId
);
// Register the updater in the singleton
UpdateRegistry class
UpdaterRegistry.RegisterUpdater( updater );
// Set the
filter
ElementClassFilter filter = new ElementClassFilter( typeof( Wall ) );
// Add trigger
UpdaterRegistry.AddTrigger(updater.GetUpdaterId(),filter, Element.GetChangeTypeGeometry());