public void Execute(UIApplication app) { uidoc = app.ActiveUIDocument; doc = uidoc.Document; sel = uidoc.Selection; currentUI = ONBOXApplication.onboxApp.beamsFromWallsWindow; //BeamsFromColumnsWindow.beamFromColumnsCurrentOperation if (app != null) { switch (currentUI.beamFromWallsCurrentOperation) { case ExternalOperation.Create: CreateBeams(); break; case ExternalOperation.Reload: Reload(); break; case ExternalOperation.Unsubscribe: Unsubscribe(); break; case ExternalOperation.LoadFamily: LoadFamily(); break; default: break; } } }
internal void ShowBeamsFromWallsUI() { if (beamsFromWallsWindow == null || beamsFromWallsWindow.isShowned == false) { //Implements the viewChange(view activated) event if (uiApp != null) { uiApp.ViewActivated += BeamsFromWalls_ViewActivated; } //Impements the create (Beams from walls) events requestBeamsFromWallsHandler = new RequestBeamsFromWallsHandler(); externalBeamsFromWallsEvent = ExternalEvent.Create(requestBeamsFromWallsHandler); //Implements the BeamsFromWalls UI Window //Pass the external event and the event handler to the instance of the UI beamsFromWallsWindow = new BeamsFromWallsUI(externalBeamsFromWallsEvent, requestBeamsFromWallsHandler); beamsFromWallsWindow.Show(); } }