From bcb4c04c1391246bb99981c8898f9d692da8eaf8 Mon Sep 17 00:00:00 2001
From: zhangyk-c <zhangyk-c@glodon.com>
Date: 星期二, 16 七月 2024 20:07:47 +0800
Subject: [PATCH] 族库更新

---
 HStation.RevitDev/RevitDataExport/Plugin/Application.cs                    |    2 +-
 HStation.RevitDev/RevitDataExport/Plugin/Command.cs                        |   28 +++++++++++++++-------------
 HStation.RevitDev/RevitDataExport/HStation.RevitDev.RevitDataExport.csproj |    8 +++++---
 3 files changed, 21 insertions(+), 17 deletions(-)

diff --git a/HStation.RevitDev/RevitDataExport/HStation.RevitDev.RevitDataExport.csproj b/HStation.RevitDev/RevitDataExport/HStation.RevitDev.RevitDataExport.csproj
index d35f67b..33c2da7 100644
--- a/HStation.RevitDev/RevitDataExport/HStation.RevitDev.RevitDataExport.csproj
+++ b/HStation.RevitDev/RevitDataExport/HStation.RevitDev.RevitDataExport.csproj
@@ -104,12 +104,12 @@
   </ItemGroup>
   <ItemGroup>
     <Compile Include="Common\DescriptionExtension.cs" />
-    <Compile Include="Common\Global.cs" />
+    <Compile Include="Common\GlobalResource.cs" />
     <Compile Include="Common\Log.cs" />
     <Compile Include="Common\MEPHelper.cs" />
     <Compile Include="Common\NetWorkHelper.cs" />
     <Compile Include="Common\ThumbnailUtils.cs" />
-    <Compile Include="Entity\ExternalEvent_CreateInstance.cs" />
+    <Compile Include="Entity\ExternalEvent.cs" />
     <Compile Include="Entity\FamilyLoadOptions.cs" />
     <Compile Include="Entity\UnitType.cs" />
     <Compile Include="Enum\FamilyType.cs" />
@@ -127,8 +127,9 @@
     <Compile Include="Utility\BoundingBoxHelper.cs" />
     <Compile Include="Utility\DialogHelper.cs" />
     <Compile Include="Utility\DockPaneUtil.cs" />
+    <Compile Include="Utility\DocumentUtil.cs" />
     <Compile Include="Utility\ExcelHelper.cs" />
-    <Compile Include="Utility\ExternalCommandUtils.cs" />
+    <Compile Include="Utility\DockablePaneUtils.cs" />
     <Compile Include="Utility\ParameterOperator.cs" />
     <Compile Include="Entity\CategoryConfig.cs" />
     <Compile Include="Forms\Form_SystemSelect.cs">
@@ -168,6 +169,7 @@
     <Compile Include="Service\SearchService.cs" />
     <Compile Include="Utility\RevitUtil.cs" />
     <Compile Include="Utility\Ribbon.cs" />
+    <Compile Include="Entity\Updater.cs" />
     <Compile Include="Utility\VersionUtil.cs" />
     <Compile Include="Utility\ViewHelper.cs" />
   </ItemGroup>
diff --git a/HStation.RevitDev/RevitDataExport/Plugin/Application.cs b/HStation.RevitDev/RevitDataExport/Plugin/Application.cs
index 2e63bba..1df0a76 100644
--- a/HStation.RevitDev/RevitDataExport/Plugin/Application.cs
+++ b/HStation.RevitDev/RevitDataExport/Plugin/Application.cs
@@ -1,4 +1,5 @@
 锘縰sing Autodesk.Revit.Attributes;
+using Autodesk.Revit.DB;
 using Autodesk.Revit.UI;
 using HStation.RevitDev.RevitDataExport.Common;
 using HStation.RevitDev.RevitDataExport.Utility;
@@ -27,7 +28,6 @@
             ribbonPanel.AddSeparator();
             GlobalResource.CurrentRevitVersion = application.ControlledApplication.VersionNumber;
 
-            //鍒涘缓button
             CreateBottons(ribbon, ribbonPanel);
 
             ribbonPanel.AddSeparator();
diff --git a/HStation.RevitDev/RevitDataExport/Plugin/Command.cs b/HStation.RevitDev/RevitDataExport/Plugin/Command.cs
index a3fec71..31b6671 100644
--- a/HStation.RevitDev/RevitDataExport/Plugin/Command.cs
+++ b/HStation.RevitDev/RevitDataExport/Plugin/Command.cs
@@ -40,7 +40,7 @@
         YWFamilyType m_type = YWFamilyType.YWFT_Pump;
         public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
         {
-            ExternalCommandUtils.ShowDockablePanel(commandData, m_type);
+            DockablePaneUtils.ShowDockablePanel(commandData, m_type);
             return Result.Succeeded;
         }
     }
@@ -54,7 +54,9 @@
         YWFamilyType m_type = YWFamilyType.YWFT_Pipe;
         public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
         {
-            ExternalCommandUtils.ShowDockablePanel(commandData, m_type);
+            Common.GlobalResource.CurrentAddinId = commandData.Application.ActiveAddInId;
+            DocumentUtil.RegistDocumentEvent(commandData.Application.Application);
+            DockablePaneUtils.ShowDockablePanel(commandData, m_type);
             return Result.Succeeded;
         }
     }
@@ -68,7 +70,7 @@
         YWFamilyType m_type = YWFamilyType.YWFT_Valve;
         public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
         {
-            ExternalCommandUtils.ShowDockablePanel(commandData, m_type);
+            DockablePaneUtils.ShowDockablePanel(commandData, m_type);
             return Result.Succeeded;
         }
     }
@@ -82,7 +84,7 @@
         YWFamilyType m_type = YWFamilyType.YWFT_Heat_Exchanger;
         public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
         {
-            ExternalCommandUtils.ShowDockablePanel(commandData, m_type);
+            DockablePaneUtils.ShowDockablePanel(commandData, m_type);
             return Result.Succeeded;
         }
     }
@@ -96,7 +98,7 @@
         YWFamilyType m_type = YWFamilyType.YWFT_Blocker;
         public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
         {
-            ExternalCommandUtils.ShowDockablePanel(commandData, m_type);
+            DockablePaneUtils.ShowDockablePanel(commandData, m_type);
             return Result.Succeeded;
         }
     }
@@ -110,7 +112,7 @@
         YWFamilyType m_type = YWFamilyType.YWFT_Shower;
         public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
         {
-            ExternalCommandUtils.ShowDockablePanel(commandData, m_type);
+            DockablePaneUtils.ShowDockablePanel(commandData, m_type);
             return Result.Succeeded;
         }
     }
@@ -124,7 +126,7 @@
         YWFamilyType m_type = YWFamilyType.YWFT_Three_Joint;
         public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
         {
-            ExternalCommandUtils.ShowDockablePanel(commandData, m_type);
+            DockablePaneUtils.ShowDockablePanel(commandData, m_type);
             return Result.Succeeded;
         }
     }
@@ -138,7 +140,7 @@
         YWFamilyType m_type = YWFamilyType.YWFT_Four_Joint;
         public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
         {
-            ExternalCommandUtils.ShowDockablePanel(commandData, m_type);
+            DockablePaneUtils.ShowDockablePanel(commandData, m_type);
             return Result.Succeeded;
         }
     }
@@ -152,7 +154,7 @@
         YWFamilyType m_type = YWFamilyType.YWFT_Water_Meter;
         public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
         {
-            ExternalCommandUtils.ShowDockablePanel(commandData, m_type);
+            DockablePaneUtils.ShowDockablePanel(commandData, m_type);
             return Result.Succeeded;
         }
     }
@@ -166,7 +168,7 @@
         YWFamilyType m_type = YWFamilyType.YWFT_Water_Pool;
         public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
         {
-            ExternalCommandUtils.ShowDockablePanel(commandData, m_type);
+            DockablePaneUtils.ShowDockablePanel(commandData, m_type);
             return Result.Succeeded;
         }
     }
@@ -180,7 +182,7 @@
         YWFamilyType m_type = YWFamilyType.YWFT_Water_Box;
         public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
         {
-            ExternalCommandUtils.ShowDockablePanel(commandData, m_type);
+            DockablePaneUtils.ShowDockablePanel(commandData, m_type);
             return Result.Succeeded;
         }
     }
@@ -194,7 +196,7 @@
         YWFamilyType m_type = YWFamilyType.YWFT_Elbow;
         public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
         {
-            ExternalCommandUtils.ShowDockablePanel(commandData, m_type);
+            DockablePaneUtils.ShowDockablePanel(commandData, m_type);
             return Result.Succeeded;
         }
     }
@@ -208,7 +210,7 @@
         YWFamilyType m_type = YWFamilyType.YWFT_Fire_Hydrant;
         public Result Execute(ExternalCommandData commandData, ref string message, ElementSet elements)
         {
-            ExternalCommandUtils.ShowDockablePanel(commandData, m_type);
+            DockablePaneUtils.ShowDockablePanel(commandData, m_type);
             return Result.Succeeded;
         }
     }

--
Gitblit v1.9.3