From 4321701fc4d83d0a25bf6889a2ffe50d22b94d51 Mon Sep 17 00:00:00 2001
From: zhangyk-c <zhangyk-c@glodon.com>
Date: 星期日, 14 七月 2024 01:49:54 +0800
Subject: [PATCH] 族库类型完善

---
 HStation.RevitDev/RevitDataExport/Plugin/Application.cs                    |  127 +++++++--------
 HStation.RevitDev/RevitDataExport/Entity/CategoryConfig.cs                 |    8 
 HStation.RevitDev/RevitDataExport/Common/Global.cs                         |   66 +++++++-
 HStation.RevitDev/RevitDataExport/Plugin/Command.cs                        |  187 ++++++++++++++++++++++-
 HStation.RevitDev/RevitDataExport/HStation.RevitDev.RevitDataExport.csproj |   35 ++--
 5 files changed, 315 insertions(+), 108 deletions(-)

diff --git a/HStation.RevitDev/RevitDataExport/Common/Global.cs b/HStation.RevitDev/RevitDataExport/Common/Global.cs
index 534a207..f014290 100644
--- a/HStation.RevitDev/RevitDataExport/Common/Global.cs
+++ b/HStation.RevitDev/RevitDataExport/Common/Global.cs
@@ -1,19 +1,69 @@
-锘縰sing System;
+锘縰sing HStation.RevitDev.RevitDataExport.Enum;
 using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
+using System.IO;
+using System.Reflection;
 
 namespace HStation.RevitDev.RevitDataExport.Common
 {
     public static class GlobalResource
     {
-        public static List<string> DockablePanelIds => new List<string> 
-        { 
-            "8AF8DA72-120F-44A0-81DD-5DD24EDAB919",
-            "1A2728E3-51FF-4084-B0B6-F6DAD26A56FB"
+        public static Dictionary<YWFamilyType, string> DockablePanelDict => new Dictionary<YWFamilyType, string>
+        {          
+            {YWFamilyType.YWFT_Pump, "8AF8DA72-120F-44A0-81DD-5DD24EDAB919"},
+            {YWFamilyType.YWFT_Valve, "1A2728E3-51FF-4084-B0B6-F6DAD26A56FB"},
+            {YWFamilyType.YWFT_Pipe, "CB879681-B8E8-4FE2-BF57-4C86068D2C89"},
+
+            {YWFamilyType.YWFT_Four_Joint, "AAB55EEE-8450-4848-9C89-0322BBE94F5A"},
+            {YWFamilyType.YWFT_Elbow, "C357EC81-09FF-41C5-8E32-FE71E30EA394"},
+            {YWFamilyType.YWFT_Blocker, "0250FA8F-56C3-4355-817D-60B515CAD90E"},
+            {YWFamilyType.YWFT_Fire_Hydrant, "34E2EAD1-3D49-46C9-9942-451DD0192229"},
+            {YWFamilyType.YWFT_Heat_Exchanger, "056EAACD-ED75-4854-8F3C-A4A43007BF31"},
+
+            {YWFamilyType.YWFT_Shower, "D4AA8261-406E-44FF-A1EE-531153FA9709"},
+            {YWFamilyType.YWFT_Three_Joint, "1BAA114A-E355-402C-B91D-569882D12987"},
+            {YWFamilyType.YWFT_Water_Box, "44951F67-0C2F-4B02-B988-8B5F06295A18"},
+            {YWFamilyType.YWFT_Water_Meter, "28354DCD-C11F-4EE8-89F8-72B9A93FD9E6"},
+            {YWFamilyType.YWFT_Water_Pool, "2DFB190E-1FD9-4CC6-8F85-AD3B19745ACF"},
         };
 
         public static int ThumbnailSize => 150;
+
+        public static string CurrentRevitVersion = string.Empty;
+
+        public static string BinDirectory
+        {
+            get
+            {
+                string result = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
+                return result;
+            }
+        }
+
+        public static string DataDirectory
+        {
+            get
+            {
+                string result = Path.Combine(Path.GetDirectoryName(BinDirectory), "Data");
+                return result;
+            }
+        }
+
+        public static string FamilysDirectory
+        {
+            get
+            {
+                string result = Path.Combine(DataDirectory, "Familys");
+                return result;
+            }
+        }
+
+        public static string ImageDirectory
+        {
+            get
+            {
+                string result = Path.Combine(DataDirectory, "Image");
+                return result;
+            }
+        }
     }
 }
diff --git a/HStation.RevitDev/RevitDataExport/Entity/CategoryConfig.cs b/HStation.RevitDev/RevitDataExport/Entity/CategoryConfig.cs
index b780696..7699f30 100644
--- a/HStation.RevitDev/RevitDataExport/Entity/CategoryConfig.cs
+++ b/HStation.RevitDev/RevitDataExport/Entity/CategoryConfig.cs
@@ -1,10 +1,4 @@
-锘縰sing System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-using System.Threading.Tasks;
-
-namespace HStation.RevitDev.RevitDataExport.Entity
+锘縩amespace HStation.RevitDev.RevitDataExport.Entity
 {
     public class CategoryConfig
     {
diff --git a/HStation.RevitDev/RevitDataExport/HStation.RevitDev.RevitDataExport.csproj b/HStation.RevitDev/RevitDataExport/HStation.RevitDev.RevitDataExport.csproj
index 1d19f59..d35f67b 100644
--- a/HStation.RevitDev/RevitDataExport/HStation.RevitDev.RevitDataExport.csproj
+++ b/HStation.RevitDev/RevitDataExport/HStation.RevitDev.RevitDataExport.csproj
@@ -66,11 +66,15 @@
     </Reference>
     <Reference Include="PresentationCore" />
     <Reference Include="PresentationFramework" />
-    <Reference Include="RevitAPI">
-      <HintPath>..\..\..\Program Files\Autodesk\Revit 2022\RevitAPI.dll</HintPath>
+    <Reference Include="RevitAPI, Version=22.0.0.0, Culture=neutral, processorArchitecture=AMD64">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>Reference\RevitAPI.dll</HintPath>
+      <Private>False</Private>
     </Reference>
-    <Reference Include="RevitAPIUI">
-      <HintPath>..\..\..\Program Files\Autodesk\Revit 2022\RevitAPIUI.dll</HintPath>
+    <Reference Include="RevitAPIUI, Version=22.0.0.0, Culture=neutral, processorArchitecture=AMD64">
+      <SpecificVersion>False</SpecificVersion>
+      <HintPath>Reference\RevitAPIUI.dll</HintPath>
+      <Private>False</Private>
     </Reference>
     <Reference Include="Spire.XLS, Version=13.10.1.0, Culture=neutral, PublicKeyToken=663f351905198cb3, processorArchitecture=MSIL">
       <HintPath>..\packages\Spire.XLS.13.10.1\lib\net40\Spire.XLS.dll</HintPath>
@@ -99,25 +103,24 @@
     <Reference Include="WindowsBase" />
   </ItemGroup>
   <ItemGroup>
+    <Compile Include="Common\DescriptionExtension.cs" />
     <Compile Include="Common\Global.cs" />
     <Compile Include="Common\Log.cs" />
     <Compile Include="Common\MEPHelper.cs" />
     <Compile Include="Common\NetWorkHelper.cs" />
     <Compile Include="Common\ThumbnailUtils.cs" />
-    <Compile Include="Entity\ExternalCommand_CreateInstance.cs" />
+    <Compile Include="Entity\ExternalEvent_CreateInstance.cs" />
     <Compile Include="Entity\FamilyLoadOptions.cs" />
     <Compile Include="Entity\UnitType.cs" />
+    <Compile Include="Enum\FamilyType.cs" />
     <Compile Include="Forms\Form_CheckResult.cs">
       <SubType>Form</SubType>
     </Compile>
     <Compile Include="Forms\Form_CheckResult.Designer.cs">
       <DependentUpon>Form_CheckResult.cs</DependentUpon>
     </Compile>
-    <Compile Include="Forms\Wpf_FamilyPanel_Wall.xaml.cs">
-      <DependentUpon>Wpf_FamilyPanel_Wall.xaml</DependentUpon>
-    </Compile>
-    <Compile Include="Forms\Wpf_FamilyPanel_Foundation.xaml.cs">
-      <DependentUpon>Wpf_FamilyPanel_Foundation.xaml</DependentUpon>
+    <Compile Include="Forms\Wpf_FamilyPanel.xaml.cs">
+      <DependentUpon>Wpf_FamilyPanel.xaml</DependentUpon>
     </Compile>
     <Compile Include="Parser\Qita.cs" />
     <Compile Include="Plugin\Application.cs" />
@@ -125,6 +128,7 @@
     <Compile Include="Utility\DialogHelper.cs" />
     <Compile Include="Utility\DockPaneUtil.cs" />
     <Compile Include="Utility\ExcelHelper.cs" />
+    <Compile Include="Utility\ExternalCommandUtils.cs" />
     <Compile Include="Utility\ParameterOperator.cs" />
     <Compile Include="Entity\CategoryConfig.cs" />
     <Compile Include="Forms\Form_SystemSelect.cs">
@@ -161,10 +165,13 @@
     <Compile Include="Common\WaterRemark.cs" />
     <Compile Include="Utility\ParserManager.cs" />
     <Compile Include="Utility\PropertyUitlity.cs" />
+    <Compile Include="Service\SearchService.cs" />
+    <Compile Include="Utility\RevitUtil.cs" />
+    <Compile Include="Utility\Ribbon.cs" />
+    <Compile Include="Utility\VersionUtil.cs" />
     <Compile Include="Utility\ViewHelper.cs" />
   </ItemGroup>
   <ItemGroup>
-    <Folder Include="Enum\" />
     <Folder Include="Interface\" />
   </ItemGroup>
   <ItemGroup>
@@ -185,11 +192,7 @@
     <EmbeddedResource Include="Resources\piping_system_detect2.png" />
   </ItemGroup>
   <ItemGroup>
-    <Page Include="Forms\Wpf_FamilyPanel_Wall.xaml">
-      <Generator>MSBuild:Compile</Generator>
-      <SubType>Designer</SubType>
-    </Page>
-    <Page Include="Forms\Wpf_FamilyPanel_Foundation.xaml">
+    <Page Include="Forms\Wpf_FamilyPanel.xaml">
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
diff --git a/HStation.RevitDev/RevitDataExport/Plugin/Application.cs b/HStation.RevitDev/RevitDataExport/Plugin/Application.cs
index 0d55a5f..2e63bba 100644
--- a/HStation.RevitDev/RevitDataExport/Plugin/Application.cs
+++ b/HStation.RevitDev/RevitDataExport/Plugin/Application.cs
@@ -1,12 +1,10 @@
 锘縰sing Autodesk.Revit.Attributes;
 using Autodesk.Revit.UI;
-using HStation.RevitDev.RevitDataExport.Forms;
-using Spire.AI.Api;
+using HStation.RevitDev.RevitDataExport.Common;
+using HStation.RevitDev.RevitDataExport.Utility;
 using System;
-using System.Collections.Generic;
 using System.IO;
 using System.Reflection;
-using System.Windows.Documents;
 using System.Windows.Media.Imaging;
 
 namespace HStation.RevitDev.RevitDataExport.Plugin
@@ -14,9 +12,8 @@
     [Transaction(TransactionMode.Manual)]
     public class Application : IExternalApplication
     {
-        UIControlledApplication m_uiControlledApp;
-        private readonly string m_panelFoundationName = "鍩虹鏃忓垪琛�";
-        private readonly string m_panelWallName = "鎸″鏃忓垪琛�";
+        UIControlledApplication m_application;
+
         public Result OnShutdown(UIControlledApplication application)
         {
             return Result.Succeeded;
@@ -24,94 +21,88 @@
 
         public Result OnStartup(UIControlledApplication application)
         {
-            m_uiControlledApp = application;
+            m_application = application;
+            Ribbon ribbon = new Ribbon(application);
+            RibbonPanel ribbonPanel = ribbon.CreateRibbon();
+            ribbonPanel.AddSeparator();
+            GlobalResource.CurrentRevitVersion = application.ControlledApplication.VersionNumber;
 
-            //鍒涘缓鑿滃崟 绠¢亾绯荤粺鍒嗘瀽
-            CreateRibbon_PipeSystemAnalysis(application);
+            //鍒涘缓button
+            CreateBottons(ribbon, ribbonPanel);
 
-            //鍒涘缓鑿滃崟 娉电郴缁熷垎鏋�
-            CreateRibbon_PumpSystemAnalysis(application);
-
+            ribbonPanel.AddSeparator();
+            RegistEvent();
             return Result.Succeeded;
         }
 
-        private void CreateRibbon_PumpSystemAnalysis(UIControlledApplication application)
+        private static void CreateBottons(Ribbon ribbon, RibbonPanel ribbonPanel)
         {
-            application.CreateRibbonTab("娉电郴缁熷垎鏋�");
-            RibbonPanel panel = application.CreateRibbonPanel("娉电郴缁熷垎鏋�", "娉电郴缁熷垎鏋�");
+            string className1 = "HStation.RevitDev.RevitDataExport.PumpSystem";
+            ribbon.CreateButton_SystemAnalysis(ribbonPanel, Enum.YWFamilyType.YWFT_Pump, className1);
 
-            string path = Assembly.GetExecutingAssembly().Location;                            
-            string className = "HStation.RevitDev.RevitDataExport.PumpSystemAnalysis";
-            PushButtonData pdata = new PushButtonData("鍛戒护鎸夐挳", "绯荤粺璇︽儏", path, className);
-            PushButton pBtn = panel.AddItem(pdata) as PushButton;
+            string className2 = "HStation.RevitDev.RevitDataExport.ValveSystem";
+            ribbon.CreateButton_SystemAnalysis(ribbonPanel, Enum.YWFamilyType.YWFT_Valve, className2);
 
-            string imagePath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "../../../../Data/Image/analysis.png";
-            pBtn.LargeImage = new BitmapImage(new Uri(imagePath));//32 * 32
-            pBtn.ToolTip = "Revit鎻掍欢绠�浠�";
+            string className3 = "HStation.RevitDev.RevitDataExport.PipeSystem";
+            ribbon.CreateButton_PipeSystem(ribbonPanel, Enum.YWFamilyType.YWFT_Pipe, className3);
 
-            //娉ㄥ唽鍋滈潬闈㈡澘
-            RegistDockablePanel(application);
-            application.ControlledApplication.DocumentOpened += ControlledApplication_DocumentOpened;
-            application.ControlledApplication.DocumentOpening += ControlledApplication_DocumentOpening;
-            application.ControlledApplication.DocumentCreated += ControlledApplication_DocumentCreated;
-            application.ControlledApplication.DocumentCreating += ControlledApplication_DocumentCreating;
+            string className4 = "HStation.RevitDev.RevitDataExport.HeatExchangerSystem";
+            ribbon.CreateButton_SystemAnalysis(ribbonPanel, Enum.YWFamilyType.YWFT_Heat_Exchanger, className4);
+
+            string className5 = "HStation.RevitDev.RevitDataExport.BlockerSystem";
+            ribbon.CreateButton_SystemAnalysis(ribbonPanel, Enum.YWFamilyType.YWFT_Blocker, className5);
+
+            string className6 = "HStation.RevitDev.RevitDataExport.ShowerSystem";
+            ribbon.CreateButton_SystemAnalysis(ribbonPanel, Enum.YWFamilyType.YWFT_Shower, className6);
+
+            string className7 = "HStation.RevitDev.RevitDataExport.ThreeJointSystem";
+            ribbon.CreateButton_SystemAnalysis(ribbonPanel, Enum.YWFamilyType.YWFT_Three_Joint, className7);
+
+            string className8 = "HStation.RevitDev.RevitDataExport.FourJointSystem";
+            ribbon.CreateButton_SystemAnalysis(ribbonPanel, Enum.YWFamilyType.YWFT_Four_Joint, className8);
+
+            string className9 = "HStation.RevitDev.RevitDataExport.WaterMeterSystem";
+            ribbon.CreateButton_SystemAnalysis(ribbonPanel, Enum.YWFamilyType.YWFT_Water_Meter, className9);
+
+            string className10 = "HStation.RevitDev.RevitDataExport.WaterPoolSystem";
+            ribbon.CreateButton_SystemAnalysis(ribbonPanel, Enum.YWFamilyType.YWFT_Water_Pool, className10);
+
+            string className11 = "HStation.RevitDev.RevitDataExport.WaterBoxSystem";
+            ribbon.CreateButton_SystemAnalysis(ribbonPanel, Enum.YWFamilyType.YWFT_Water_Box, className11);
+
+            string className12 = "HStation.RevitDev.RevitDataExport.ElbowSystem";
+            ribbon.CreateButton_SystemAnalysis(ribbonPanel, Enum.YWFamilyType.YWFT_Elbow, className12);
+
+            string className13 = "HStation.RevitDev.RevitDataExport.FireHydrantSystem";
+            ribbon.CreateButton_SystemAnalysis(ribbonPanel, Enum.YWFamilyType.YWFT_Fire_Hydrant, className13);
         }
 
-        private void ControlledApplication_DocumentCreating(object sender, Autodesk.Revit.DB.Events.DocumentCreatingEventArgs e)
+        private void RegistEvent()
         {
-            Utility.DockPaneUtil.HideAllDockablePane(m_uiControlledApp);
+            m_application.ControlledApplication.DocumentOpened += ControlledApplication_DocumentOpened;
+            m_application.ControlledApplication.DocumentOpening += ControlledApplication_DocumentOpening;
+            m_application.ControlledApplication.DocumentCreated += ControlledApplication_DocumentCreated;
+            m_application.ControlledApplication.DocumentCreating += ControlledApplication_DocumentCreating;
         }
 
         private void ControlledApplication_DocumentOpening(object sender, Autodesk.Revit.DB.Events.DocumentOpeningEventArgs e)
         {
-            Utility.DockPaneUtil.HideAllDockablePane(m_uiControlledApp);
+            DockPaneUtil.HideAllDockablePane(m_application);
         }
 
         private void ControlledApplication_DocumentCreated(object sender, Autodesk.Revit.DB.Events.DocumentCreatedEventArgs e)
         {
-            Utility.DockPaneUtil.HideAllDockablePane(m_uiControlledApp);
+            DockPaneUtil.HideAllDockablePane(m_application);
         }
 
         private void ControlledApplication_DocumentOpened(object sender, Autodesk.Revit.DB.Events.DocumentOpenedEventArgs e)
         {
-            Utility.DockPaneUtil.HideAllDockablePane(m_uiControlledApp);
+            DockPaneUtil.HideAllDockablePane(m_application);
         }
 
-
-        private void CreateRibbon_PipeSystemAnalysis(UIControlledApplication application)
+        private void ControlledApplication_DocumentCreating(object sender, Autodesk.Revit.DB.Events.DocumentCreatingEventArgs e)
         {
-            //1.鍒涘缓RibbonTab閫夐」鍗¢〉
-            application.CreateRibbonTab("涔夌淮瀹氬埗");
-            //2.鍦≧ibbonTab閫夐」鍗¢〉涓垱寤篟ibbonPanel闈㈡澘
-            RibbonPanel panel1 = application.CreateRibbonPanel("涔夌淮瀹氬埗", "绠¢亾绯荤粺閾捐矾妫�娴�");
-
-            //3.鍛戒护鎸夐挳
-            //3.1鎸囧畾绋嬪簭闆嗙殑鍚嶇О銆佹墍浣跨敤鐨勭被鍚嶃�佺▼搴忛泦璺緞
-            //绋嬪簭闆嗚矾寰�--鏈�濂藉啓鎴愮浉瀵逛綅缃�
-            string Path1 = Assembly.GetExecutingAssembly().Location;
-            //绋嬪簭闆嗙殑鍚嶇О銆佹墍浣跨敤鐨勭被鍚嶁�斺��"涓荤▼搴忛泦鍛藉悕绌洪棿.涓荤▼搴忕被鍚�"                                
-            string Class1 = "HStation.RevitDev.RevitDataExport.Export";
-            //3.2瀹氫箟PushButtonData鍛戒护鎸夐挳鏁版嵁璧勬枡锛岀粦瀹氱▼搴忛泦
-            PushButtonData pdata = new PushButtonData("鍛戒护鎸夐挳", "绯荤粺璇︽儏", Path1, Class1);
-            //3.3灏哖ushButton娣诲姞鍒伴潰鏉夸腑
-            PushButton push = panel1.AddItem(pdata) as PushButton;
-            //3.4涓篜ushButton娣诲姞鍥炬爣
-            //鍙妸鍥剧墖璧勬簮鍔犺浇鍏ラ」鐩腑锛屾柟渚挎妸鍥剧墖鐨勮矾寰勫啓鎴愮浉瀵硅矾寰勶紝骞惰繘琛屼慨鏀瑰睘鎬э紙鍥剧墖鐨勭敓鎴愭搷浣�,鏀逛綅锛氬祵鍏ョ殑璧勬簮锛�
-            string imagePath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location) + "../../../../Data/Image/analysis.png";
-            push.LargeImage = new BitmapImage(new Uri(imagePath));//32 * 32
-            //3.5璁剧疆鍛戒护鎸夐挳鐨勯粯璁ゆ彁绀轰俊鎭�
-            push.ToolTip = "Revit鎻掍欢绠�浠�";
-        }
-
-        private void RegistDockablePanel(UIControlledApplication uiApp)
-        {
-            foreach (var panelId in Common.GlobalResource.DockablePanelIds)
-            {
-                Guid guid = new Guid(panelId);
-                DockablePaneId id = new DockablePaneId(guid);
-                Wpf_FamilyPanel_Foundation panel = new Wpf_FamilyPanel_Foundation("C:\\Users\\zhangyk-c\\Desktop\\rfa");
-                uiApp.RegisterDockablePane(id, m_panelFoundationName, panel);
-            }
+            DockPaneUtil.HideAllDockablePane(m_application);
         }
     }
 }
diff --git a/HStation.RevitDev/RevitDataExport/Plugin/Command.cs b/HStation.RevitDev/RevitDataExport/Plugin/Command.cs
index 83e0e43..a3fec71 100644
--- a/HStation.RevitDev/RevitDataExport/Plugin/Command.cs
+++ b/HStation.RevitDev/RevitDataExport/Plugin/Command.cs
@@ -1,9 +1,14 @@
 锘縰sing Autodesk.Revit.Attributes;
 using Autodesk.Revit.DB;
+using Autodesk.Revit.DB.Plumbing;
 using Autodesk.Revit.UI;
+using HStation.RevitDev.RevitDataExport.Common;
+using HStation.RevitDev.RevitDataExport.Enum;
 using HStation.RevitDev.RevitDataExport.Forms;
+using HStation.RevitDev.RevitDataExport.Utility;
 using Spire.AI.Api;
 using System;
+using System.Collections.Generic;
 using System.Diagnostics;
 using System.Drawing.Drawing2D;
 using System.Windows.Controls;
@@ -26,23 +31,187 @@
         }
     }
 
+    /// <summary>
+    /// 姘存车
+    /// </summary>
     [Transaction(TransactionMode.Manual)]
-    public class PumpSystemAnalysis : IExternalCommand
+    public class PumpSystem : IExternalCommand
     {
+        YWFamilyType m_type = YWFamilyType.YWFT_Pump;
         public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
         {
-            UIApplication uiapp = commandData.Application;
-            foreach (var panelId in Common.GlobalResource.DockablePanelIds)
-            {
-                Guid guid = new Guid(panelId);
-                DockablePaneId paneId = new DockablePaneId(guid);
-                DockablePane pane = uiapp.GetDockablePane(paneId);
-                pane.Show();
-            }
+            ExternalCommandUtils.ShowDockablePanel(commandData, m_type);
             return Result.Succeeded;
         }
     }
 
+    /// <summary>
+    /// 绠¢亾
+    /// </summary>
+    [Transaction(TransactionMode.Manual)]
+    public class PipeSystem : IExternalCommand
+    {
+        YWFamilyType m_type = YWFamilyType.YWFT_Pipe;
+        public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
+        {
+            ExternalCommandUtils.ShowDockablePanel(commandData, m_type);
+            return Result.Succeeded;
+        }
+    }
+
+    /// <summary>
+    /// 闃�闂�
+    /// </summary>
+    [Transaction(TransactionMode.Manual)]
+    public class ValveSystem : IExternalCommand
+    {
+        YWFamilyType m_type = YWFamilyType.YWFT_Valve;
+        public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
+        {
+            ExternalCommandUtils.ShowDockablePanel(commandData, m_type);
+            return Result.Succeeded;
+        }
+    }
+
+    /// <summary>
+    /// 鎹㈢儹姘�
+    /// </summary>
+    [Transaction(TransactionMode.Manual)]
+    public class HeatExchangerSystem : IExternalCommand
+    {
+        YWFamilyType m_type = YWFamilyType.YWFT_Heat_Exchanger;
+        public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
+        {
+            ExternalCommandUtils.ShowDockablePanel(commandData, m_type);
+            return Result.Succeeded;
+        }
+    }
+
+    /// <summary>
+    /// 闂峰ご
+    /// </summary>
+    [Transaction(TransactionMode.Manual)]
+    public class BlockerSystem : IExternalCommand
+    {
+        YWFamilyType m_type = YWFamilyType.YWFT_Blocker;
+        public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
+        {
+            ExternalCommandUtils.ShowDockablePanel(commandData, m_type);
+            return Result.Succeeded;
+        }
+    }
+
+    /// <summary>
+    /// 鍠锋穻澶�
+    /// </summary>
+    [Transaction(TransactionMode.Manual)]
+    public class ShowerSystem : IExternalCommand
+    {
+        YWFamilyType m_type = YWFamilyType.YWFT_Shower;
+        public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
+        {
+            ExternalCommandUtils.ShowDockablePanel(commandData, m_type);
+            return Result.Succeeded;
+        }
+    }
+
+    /// <summary>
+    /// 涓夐��
+    /// </summary>
+    [Transaction(TransactionMode.Manual)]
+    public class ThreeJointSystem : IExternalCommand
+    {
+        YWFamilyType m_type = YWFamilyType.YWFT_Three_Joint;
+        public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
+        {
+            ExternalCommandUtils.ShowDockablePanel(commandData, m_type);
+            return Result.Succeeded;
+        }
+    }
+
+    /// <summary>
+    /// 鍥涢��
+    /// </summary>
+    [Transaction(TransactionMode.Manual)]
+    public class FourJointSystem : IExternalCommand
+    {
+        YWFamilyType m_type = YWFamilyType.YWFT_Four_Joint;
+        public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
+        {
+            ExternalCommandUtils.ShowDockablePanel(commandData, m_type);
+            return Result.Succeeded;
+        }
+    }
+
+    /// <summary>
+    /// 姘磋〃
+    /// </summary>
+    [Transaction(TransactionMode.Manual)]
+    public class WaterMeterSystem : IExternalCommand
+    {
+        YWFamilyType m_type = YWFamilyType.YWFT_Water_Meter;
+        public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
+        {
+            ExternalCommandUtils.ShowDockablePanel(commandData, m_type);
+            return Result.Succeeded;
+        }
+    }
+
+    /// <summary>
+    /// 姘村簱
+    /// </summary>
+    [Transaction(TransactionMode.Manual)]
+    public class WaterPoolSystem : IExternalCommand
+    {
+        YWFamilyType m_type = YWFamilyType.YWFT_Water_Pool;
+        public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
+        {
+            ExternalCommandUtils.ShowDockablePanel(commandData, m_type);
+            return Result.Succeeded;
+        }
+    }
+
+    /// <summary>
+    /// 姘寸
+    /// </summary>
+    [Transaction(TransactionMode.Manual)]
+    public class WaterBoxSystem : IExternalCommand
+    {
+        YWFamilyType m_type = YWFamilyType.YWFT_Water_Box;
+        public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
+        {
+            ExternalCommandUtils.ShowDockablePanel(commandData, m_type);
+            return Result.Succeeded;
+        }
+    }
+
+    /// <summary>
+    /// 寮ご
+    /// </summary>
+    [Transaction(TransactionMode.Manual)]
+    public class ElbowSystem : IExternalCommand
+    {
+        YWFamilyType m_type = YWFamilyType.YWFT_Elbow;
+        public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
+        {
+            ExternalCommandUtils.ShowDockablePanel(commandData, m_type);
+            return Result.Succeeded;
+        }
+    }
+
+    /// <summary>
+    /// 寮ご
+    /// </summary>
+    [Transaction(TransactionMode.Manual)]
+    public class FireHydrantSystem : IExternalCommand
+    {
+        YWFamilyType m_type = YWFamilyType.YWFT_Fire_Hydrant;
+        public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
+        {
+            ExternalCommandUtils.ShowDockablePanel(commandData, m_type);
+            return Result.Succeeded;
+        }
+    }
 
     public class WindowHandle : IWin32Window
     {

--
Gitblit v1.9.3