示例#1
0
 public GraphAppViewModel(RevitToGraphPublisher pubisher, GraphApp app)
 {
     _publishToGraphCommand = new Command(PublishToGraph);
     _cancelCommand         = new Command(Close);
     _publisher             = pubisher;
     _settings = app.SessionSettings;
     _app      = app;
 }
示例#2
0
        public Result Execute(ExternalCommandData cmdData, ref string message, ElementSet elements)
        {
            Document          rDoc      = cmdData.Application.ActiveUIDocument.Document;
            var               gdApp     = GraphApp.Instance;
            var               publisher = new RevitToGraphPublisher(rDoc);
            GraphAppViewModel gvm       = new GraphAppViewModel(publisher, gdApp);

            gdApp.GraphAppWindow = new GraphAppWindow(gvm);
            gdApp.GraphAppWindow.ShowDialog();

            return(Result.Succeeded);
        }