From e239fe58afb2f9637754fc33da7c0ece5d33e7dd Mon Sep 17 00:00:00 2001 From: zhangyk-c <zhangyk-c@glodon.com> Date: 星期二, 16 七月 2024 20:07:15 +0800 Subject: [PATCH] 更新族库功能 --- HStation.RevitDev/RevitDataExport/Plugin/Command.cs | 183 ++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 179 insertions(+), 4 deletions(-) diff --git a/HStation.RevitDev/RevitDataExport/Plugin/Command.cs b/HStation.RevitDev/RevitDataExport/Plugin/Command.cs index 219fa25..a3fec71 100644 --- a/HStation.RevitDev/RevitDataExport/Plugin/Command.cs +++ b/HStation.RevitDev/RevitDataExport/Plugin/Command.cs @@ -1,10 +1,17 @@ 锘縰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; using System.Windows.Forms; namespace HStation.RevitDev.RevitDataExport @@ -20,23 +27,191 @@ //瀹炰緥WPF绐椾綋 var revitHandle = Process.GetCurrentProcess().MainWindowHandle; form.Show(new WindowHandle(revitHandle)); - - return Result.Succeeded; } } + /// <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) { - TaskDialog.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