public Result OnStartup(UIControlledApplication uiApp) { try { uiApp.CreateRibbonTab(tabName); } catch {}; CCPaintPanel.PaintPanel(uiApp); UpdateTab.CreatePanel(uiApp); FamilyReorganize.Run(); //DetailPanel.DetailTab(uiApp, tabName); //ObjStylesTab.ObjTab(uiApp, tabName); //QCTab.QCPanel(uiApp, tabName); // MFPanel.MFTab(uiApp, tabName); //AnalysisTab.AnalysisPanel(uiApp, tabName); //SchduleTab.SchedulePanel(uiApp, tabName); //uiApp.LoadFamPanel(tabName); //try { LineStyleUpdater.OnStartup(uiApp); } catch (Exception e) { e.OutputError(); } try { LineStyleNetworkUpdater.OnStartup(uiApp); } catch (Exception e) { e.OutputError(); } try { MFTypeNameChange.OnStartup(uiApp); } catch (Exception e) { e.OutputError(); } try { TypeNamingUpdater.OnStartup(uiApp); } catch (Exception e) { e.OutputError(); } try { DocumentSaved.OnStartup(uiApp); } catch (Exception e) { e.OutputError(); } try { PlaneTypeUpdater.OnStartup(uiApp); } catch (Exception e) { e.OutputError(); } //try { ObjStyleUpdater.OnStartup(uiApp); } catch (Exception e) { e.OutputError(); } try { ObjStyleNetworkUpdater.OnStartup(uiApp); } catch (Exception e) { e.OutputError(); } return(Result.Succeeded); }
private static void RegisterUpdater(AddInId id) { ElementId FamName = new ElementId(BuiltInParameter.SYMBOL_NAME_PARAM); MFTypeNameChange updater = new MFTypeNameChange(id); UpdaterRegistry.RegisterUpdater(updater, true); UpdaterRegistry.AddTrigger(updater.GetUpdaterId(), new ElementClassFilter(typeof(FamilySymbol)), Element.GetChangeTypeParameter(FamName)); }
public static Result OnShutdown(UIControlledApplication app) { MFElePlaced.ShutDown(app.ActiveAddInId); app.ControlledApplication.DocumentOpened -= new EventHandler <DocumentOpenedEventArgs>(OpenedEvent); app.ControlledApplication.DocumentClosing -= new EventHandler <DocumentClosingEventArgs>(ClosingEvent); app.ControlledApplication.DocumentCreated -= new EventHandler <DocumentCreatedEventArgs>(CreatedEvent); MFTypeNameChange updater = new MFTypeNameChange(app.ActiveAddInId); UpdaterRegistry.UnregisterUpdater(updater.GetUpdaterId()); return(Result.Succeeded); }
public Result OnShutdown(UIControlledApplication uiApp) { //LineStyleUpdater.OnShutdown(uiApp); LineStyleNetworkUpdater.OnShutdown(uiApp); MFTypeNameChange.OnShutdown(uiApp); TypeNamingUpdater.OnShutdown(uiApp); DocumentSaved.OnShutdown(uiApp); PlaneTypeUpdater.OnShutdown(uiApp); //ObjStyleUpdater.OnShutdown(uiApp); ObjStyleNetworkUpdater.OnShutdown(uiApp); return(Result.Succeeded); }