Example #1
0
        public static void OnStartup(UIControlledApplication application)
        {
            PlaneTypeUpdater updater = new PlaneTypeUpdater(application.ActiveAddInId);

            UpdaterRegistry.RegisterUpdater(updater, true);

            ElementClassFilter refFilter = new ElementClassFilter(typeof(ReferencePlane));

            UpdaterRegistry.AddTrigger(updater.GetUpdaterId(), refFilter, Element.GetChangeTypeAny());
            UpdaterRegistry.AddTrigger(updater.GetUpdaterId(), refFilter, Element.GetChangeTypeElementAddition());
        }
Example #2
0
        public static void OnShutdown(Autodesk.Revit.UI.UIControlledApplication application)
        {
            PlaneTypeUpdater updater = new PlaneTypeUpdater(application.ActiveAddInId);

            UpdaterRegistry.UnregisterUpdater(updater.GetUpdaterId());
        }