qin
2024-09-28 e358beb08f5be49703009b64f058ecfbcfeefbd9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
using Autodesk.Revit.UI;
using HStation.RevitDev.Model.ModelEnum;
using HStation.RevitDev.RevitDataExport.Common;
using System;
 
namespace HStation.RevitDev.RevitDataExport.Utility
{
    public class DockablePaneUtils
    {
        public static void ShowDockablePanel(ExternalCommandData commandData, RevitType type)
        {
            UIApplication uiapp = commandData.Application;
            DockPaneUtil.HideAllDockablePane(uiapp);
            var strGuid = Common.GlobalResource.DockablePanelDict[type];
            Guid guid = new Guid(strGuid);
            DockablePaneId paneId = new DockablePaneId(guid: guid);
            DockablePane pane = uiapp.GetDockablePane(paneId);
            pane.Show();
        }
 
        public static void ShowInstancePanel(ExternalCommandData commandData)
        {
            UIApplication uiapp = commandData.Application;
            Guid guid = new Guid(GlobalResource.InstancePaneGuid);
            DockablePaneId paneId = new DockablePaneId(guid: guid);
            DockablePane pane = uiapp.GetDockablePane(paneId);
            pane.Show();
        }
    }
}