Beispiel #1
0
        private void SelectAutoCADFile_Click(object sender, EventArgs e)
        {
            resetActiveView();

            DialogResult result = this.openAutoCADFileDialog.ShowDialog();

            if (result == DialogResult.OK)
            {
                string selectedFileName = this.openAutoCADFileDialog.FileName;

                if (File.Exists(selectedFileName))
                {
                    try
                    {
                        Autodesk.Revit.DB.View curView = GetViewByName(this.comboBoxImportView.SelectedItem.ToString());
                        if (curView != null)
                        {
                            uiapp.ActiveUIDocument.ActiveView = curView;
                            CadDetailConverterHandler handler = new CadDetailConverterHandler(curView, selectedFileName);
                            ExternalEvent             exEvent = ExternalEvent.Create(handler);
                            exEvent.Raise();

                            this.Close();
                            this.Dispose();
                        }
                    }
                    catch (Exception ex)
                    {
                        TaskDialog.Show("Exception", ex.Message);
                    }
                }
            }
        }
        public CadDetailConverterOutputForm(CadDetailConverterHandler handler)
        {
            this.handler = handler;

            InitializeComponent();

            InitUI();
        }
Beispiel #3
0
 public CadDetailConverterHandlerFinal(CadDetailConverterHandler parentHandler)
 {
     this.parentHandler = parentHandler;
 }