예제 #1
0
        public static void OnStartup(UIControlledApplication application)
        {
            TypeNamingUpdater updater = new TypeNamingUpdater(application.ActiveAddInId);

            UpdaterRegistry.RegisterUpdater(updater, true);
            ElementId          WindowHeight = new ElementId(BuiltInParameter.WINDOW_HEIGHT);
            ElementId          WindowWidth  = new ElementId(BuiltInParameter.WINDOW_WIDTH);
            ElementId          TypeMark     = new ElementId(BuiltInParameter.ALL_MODEL_TYPE_MARK);
            ElementClassFilter symbols      = new ElementClassFilter(typeof(FamilySymbol));

            //ElementClassFilter walls = new ElementClassFilter(typeof(WallType));
            UpdaterRegistry.AddTrigger(updater.GetUpdaterId(), symbols, Element.GetChangeTypeParameter(WindowHeight));
            UpdaterRegistry.AddTrigger(updater.GetUpdaterId(), symbols, Element.GetChangeTypeParameter(WindowWidth));
            UpdaterRegistry.AddTrigger(updater.GetUpdaterId(), symbols, Element.GetChangeTypeParameter(TypeMark));
            //UpdaterRegistry.AddTrigger(updater.GetUpdaterId(), walls, Element.GetChangeTypeParameter());
        }
예제 #2
0
        public static void OnShutdown(Autodesk.Revit.UI.UIControlledApplication application)
        {
            TypeNamingUpdater updater = new TypeNamingUpdater(application.ActiveAddInId);

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