public static void OnStartup(UIControlledApplication application) { MaterialLibrary updater = new MaterialLibrary(application.ActiveAddInId); UpdaterRegistry.RegisterUpdater(updater, true); ElementClassFilter mats = new ElementClassFilter(typeof(Material)); UpdaterRegistry.AddTrigger(updater.GetUpdaterId(), mats, Element.GetChangeTypeAny()); }
public static void OnShutdown(Autodesk.Revit.UI.UIControlledApplication application) { MaterialLibrary updater = new MaterialLibrary(application.ActiveAddInId); UpdaterRegistry.UnregisterUpdater(updater.GetUpdaterId()); }