1. 程式人生 > >Revit開發之選項對話方塊擴充套件

Revit開發之選項對話方塊擴充套件

Revit裡有一個選項介面 這個選項介面裡預設包括了: 常規、使用者介面、圖形、檔案位置、等等 其實這個介面是可以擴充套件的 直接上程式碼:         public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
        {
            UIApplication uiapp = commandData.Application;
            uiapp.DisplayingOptionsDialog += MyFun; 
            return Result.Succeeded;
        }
        private void MyFunt()
        {
            TaskDialog.Show("info", "OK");
        }


        private void MyFun(object sender, Autodesk.Revit.UI.Events.DisplayingOptionsDialogEventArgs e)
        {
            TabbedDialogAction tda = new TabbedDialogAction(MyFunt);
            UserControl1 con = new UserControl1(); 
            TabbedDialogExtension tde = new TabbedDialogExtension(con,tda);
            e.AddTab("MyTab",tde);
        }
下面是這段程式碼的效果

博主會經常更新一些技術文章,請大家多多關注,

原始碼下載請加qq群480950299