From 28152aec3c4ff451586615aed5cc23e26b320cae Mon Sep 17 00:00:00 2001 From: lixiaojun <1287241240@qq.com> Date: 星期五, 27 九月 2024 17:08:39 +0800 Subject: [PATCH] 组件列表修改 --- Service/HStation.Service.Revit.Core/01-model/RevitModel_Method.cs | 145 +++++++++++++++++++++--------------------------- 1 files changed, 63 insertions(+), 82 deletions(-) diff --git a/Service/HStation.Service.Revit.Core/01-model/RevitModel_Method.cs b/Service/HStation.Service.Revit.Core/01-model/RevitModel_Method.cs index b90609d..29724a1 100644 --- a/Service/HStation.Service.Revit.Core/01-model/RevitModel_Method.cs +++ b/Service/HStation.Service.Revit.Core/01-model/RevitModel_Method.cs @@ -8,9 +8,9 @@ /// <summary> /// 鑾峰彇鎵�鏈夌粍浠� /// </summary> - public List<IRevitParter> GetAllParters() + public List<RevitParter> GetAllParters() { - var list = new List<IRevitParter>(); + var list = new List<RevitParter>(); if (this.Reservoirs != null && this.Reservoirs.Count > 0) { list.AddRange(this.Reservoirs); @@ -34,6 +34,10 @@ if (this.Hydrants != null && this.Hydrants.Count > 0) { list.AddRange(this.Hydrants); + } + if (this.Meters != null && this.Meters.Count > 0) + { + list.AddRange(this.Meters); } if (this.Flowmeters != null && this.Flowmeters.Count > 0) { @@ -60,6 +64,7 @@ list.AddRange(this.Bluntheads); } + if (this.Pipes != null && this.Pipes.Count > 0) { list.AddRange(this.Pipes); @@ -67,6 +72,10 @@ if (this.Translations != null && this.Translations.Count > 0) { list.AddRange(this.Translations); + } + if (this.Exchangers != null && this.Exchangers.Count > 0) + { + list.AddRange(this.Exchangers); } if (this.Pumps != null && this.Pumps.Count > 0) { @@ -85,9 +94,9 @@ /// <summary> /// 鑾峰彇鎵�鏈夎妭鐐� /// </summary> - public List<IRevitNode> GetAllNodes() + public List<RevitNode> GetAllNodes() { - var list = new List<IRevitNode>(); + var list = new List<RevitNode>(); if (this.Reservoirs != null && this.Reservoirs.Count > 0) { list.AddRange(this.Reservoirs); @@ -111,6 +120,10 @@ if (this.Hydrants != null && this.Hydrants.Count > 0) { list.AddRange(this.Hydrants); + } + if (this.Meters != null && this.Meters.Count > 0) + { + list.AddRange(this.Meters); } if (this.Flowmeters != null && this.Flowmeters.Count > 0) { @@ -137,38 +150,15 @@ list.AddRange(this.Bluntheads); } - - return list; - } - - /// <summary> - /// 鑾峰彇鎵�鏈夋按婧� - /// </summary> - /// <returns></returns> - public List<IRevitNode> GetAllWaterSources() - { - var list = new List<IRevitNode>(); - if (this.Reservoirs != null && this.Reservoirs.Count > 0) - { - list.AddRange(this.Reservoirs); - } - if (this.Tanks != null && this.Tanks.Count > 0) - { - list.AddRange(this.Tanks); - } - if (this.Waterboxs != null && this.Waterboxs.Count > 0) - { - list.AddRange(this.Waterboxs); - } return list; } /// <summary> /// 鑾峰彇鎵�鏈夌娈� /// </summary> - public List<IRevitLink> GetAllLinks() + public List<RevitLink> GetAllLinks() { - var list = new List<IRevitLink>(); + var list = new List<RevitLink>(); if (this.Pipes != null && this.Pipes.Count > 0) @@ -178,6 +168,10 @@ if (this.Translations != null && this.Translations.Count > 0) { list.AddRange(this.Translations); + } + if (this.Exchangers != null && this.Exchangers.Count > 0) + { + list.AddRange(this.Exchangers); } if (this.Pumps != null && this.Pumps.Count > 0) { @@ -194,11 +188,33 @@ } /// <summary> + /// 鑾峰彇鎵�鏈夋按婧� + /// </summary> + /// <returns></returns> + public List<RevitSource> GetAllWaterSources() + { + var list = new List<RevitSource>(); + if (this.Reservoirs != null && this.Reservoirs.Count > 0) + { + list.AddRange(this.Reservoirs); + } + if (this.Tanks != null && this.Tanks.Count > 0) + { + list.AddRange(this.Tanks); + } + if (this.Waterboxs != null && this.Waterboxs.Count > 0) + { + list.AddRange(this.Waterboxs); + } + return list; + } + + /// <summary> /// 鑾峰彇鎵�鏈夎繛鎺ヨ妭鐐� /// </summary> - public List<IRevitJunction> GetAllJunctions() + public List<RevitJunction> GetAllJunctions() { - var list = new List<IRevitJunction>(); + var list = new List<RevitJunction>(); if (this.Junctions != null && this.Junctions.Count > 0) { list.AddRange(this.Junctions); @@ -210,6 +226,10 @@ if (this.Hydrants != null && this.Hydrants.Count > 0) { list.AddRange(this.Hydrants); + } + if (this.Meters != null && this.Meters.Count > 0) + { + list.AddRange(this.Meters); } if (this.Flowmeters != null && this.Flowmeters.Count > 0) { @@ -236,48 +256,34 @@ list.AddRange(this.Bluntheads); } - return list; } /// <summary> - /// 鑾峰彇鎵�鏈夋按姹� + /// 鑾峰彇鎵�鏈夋墿鏁e櫒 /// </summary> - /// <returns></returns> - public List<IRevitTank> GetAllTanks() + public List<RevitEmitter> GetAllEmitters() { - var list = new List<IRevitTank>(); - if (this.Tanks != null && this.Tanks.Count > 0) + var list = new List<RevitEmitter>(); + + if (this.Nozzles != null && this.Nozzles.Count > 0) { - list.AddRange(this.Tanks); + list.AddRange(this.Nozzles); } - if (this.Waterboxs != null && this.Waterboxs.Count > 0) + if (this.Hydrants != null && this.Hydrants.Count > 0) { - list.AddRange(this.Waterboxs); + list.AddRange(this.Hydrants); } - return list; - } - - /// <summary> - /// 鑾峰彇鎵�鏈夋按搴� - /// </summary> - public List<IRevitReservoir> GetAllReservoirs() - { - var list = new List<IRevitReservoir>(); - if (this.Reservoirs != null && this.Reservoirs.Count > 0) - { - list.AddRange(this.Reservoirs); - } return list; } /// <summary> /// 鑾峰彇鎵�鏈夌閬� /// </summary> - public List<IRevitPipe> GetAllPipes() + public List<RevitPipe> GetAllPipes() { - var list = new List<IRevitPipe>(); + var list = new List<RevitPipe>(); if (this.Pipes != null && this.Pipes.Count > 0) { @@ -287,39 +293,14 @@ { list.AddRange(this.Translations); } - - return list; - } - - /// <summary> - /// 鑾峰彇鎵�鏈夋按娉� - /// </summary> - public List<IRevitPump> GetAllPumps() - { - var list = new List<IRevitPump>(); - - if (this.Pumps != null && this.Pumps.Count > 0) + if (this.Exchangers != null && this.Exchangers.Count > 0) { - list.AddRange(this.Pumps); + list.AddRange(this.Exchangers); } return list; } - /// <summary> - /// 鑾峰彇鎵�鏈夐榾闂� - /// </summary> - public List<IRevitValve> GetAllValves() - { - var list = new List<IRevitValve>(); - - if (this.Valves != null && this.Valves.Count > 0) - { - list.AddRange(this.Valves); - } - - return list; - } } -- Gitblit v1.9.3