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/Command.cs | 187 ++++++++++++++++++++++++++++++++++++++++++++-- 1 files changed, 178 insertions(+), 9 deletions(-) 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