/// <inheritdoc/> public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements) { #if !DEBUG Statistic.SendCommandStarting(new ModPlusConnector()); #endif UIApplication appRevit = commandData.Application; if (ScrollerWin != null) { return(Result.Cancelled); } if (!SetSelection(appRevit)) { return(Result.Cancelled); } SectionBox sectionBox = new SectionBox(); sectionBox.SetSectionBox(appRevit, 0); ExternalEventApplication handler = new ExternalEventApplication(); ExternalEvent exEvent = ExternalEvent.Create(handler); // Создаем событие ScrollerWin = new Scroller(appRevit, exEvent); ScrollerWin.Closed += ScrollerWin_Closed; ScrollerWin.Show(); return(Result.Succeeded); }
/// <inheritdoc/> public void Execute(UIApplication app) { SectionBox sectionBox = new SectionBox(); sectionBox.SetSectionBox(app, ExternalCommands.ScrollerWin.Offset); }