Ejemplo n.º 1
0
        public void RunDynamo()
        {
            try
            {
                InitializeCore();

                Model.DynamoModel = InitializeCoreModel();

                Model.DynamoModel.HostAnalyticsInfo = new Models.HostAnalyticsInfo()
                {
                    HostName = "Dynamo AS",
                };
                Model.DynamoModel.HostVersion = Assembly.GetExecutingAssembly().GetName().Version.ToString();
                Model.DynamoModel.UpdateManager.RegisterExternalApplicationProcessId(Process.GetCurrentProcess().Id);

                Model.ViewModel = InitializeCoreViewModel(Model.DynamoModel);

                Autodesk.AutoCAD.ApplicationServices.Application.ShowModelessWindow(InitializeCoreView());

                RibbonUtils.SetEnabled(RibbonUtils.DynamoASTabUID, RibbonUtils.DynamoASPanelUID, RibbonUtils.DynamoASButtonUID, false);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }
Ejemplo n.º 2
0
        protected override void ShutDownCore(bool shutdownHost)
        {
            Services.DisposeLogic.IsShuttingDown = true;
            //Autodesk.AutoCAD.ApplicationServices.Core.Application.DocumentManager.DocumentActivationEnabled = true;

            base.ShutDownCore(shutdownHost);

            RibbonUtils.SetEnabled(RibbonUtils.DynamoASTabUID, RibbonUtils.DynamoASPanelUID, RibbonUtils.DynamoASButtonUID, true);
        }