Exemple #1
0
        public Result OnShutdown(UIControlledApplication application)
        {
            GridLevelUpdater updater = new GridLevelUpdater(application.ActiveAddInId);

            UpdaterRegistry.UnregisterUpdater(updater.GetUpdaterId());
            return(Result.Succeeded);
        }
Exemple #2
0
        public Result OnStartup(UIControlledApplication application)
        {
            GridLevelUpdater updater = new GridLevelUpdater(application.ActiveAddInId);

            UpdaterRegistry.RegisterUpdater(updater);

            ElementClassFilter    gridFilter     = new ElementClassFilter(typeof(Grid));
            ElementClassFilter    levelFilter    = new ElementClassFilter(typeof(Level));
            IList <ElementFilter> elementFilters = new List <ElementFilter>();

            elementFilters.Add(gridFilter);
            elementFilters.Add(levelFilter);
            LogicalOrFilter orFilter = new LogicalOrFilter(elementFilters);

            UpdaterRegistry.AddTrigger(updater.GetUpdaterId(), orFilter, Element.GetChangeTypeElementAddition());

            return(Result.Succeeded);
        }