Exemple #1
0
        public Result Execute(ExternalCommandData commandData,
                              ref string message, ElementSet elements)
        {
            UIApplication uiapp = commandData.Application;
            UIDocument    uidoc = uiapp.ActiveUIDocument;
            Application   app   = uiapp.Application;
            Document      doc   = uidoc.Document;

            // code

            ExportScheduleToExcelViewModel viewModel =
                new ExportScheduleToExcelViewModel(uidoc);

            ExportScheduleToExcelWindow window =
                new ExportScheduleToExcelWindow(viewModel);

            if (window.ShowDialog() == false)
            {
                return(Result.Cancelled);
            }

            return(Result.Succeeded);
        }
Exemple #2
0
 public ExportScheduleToExcelWindow(ExportScheduleToExcelViewModel viewModel)
 {
     InitializeComponent();
     _viewModel  = viewModel;
     DataContext = _viewModel;
 }