lixiaojun
2024-09-15 f62dd6b3de7dae88ac638267a040e48a4d941e08
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>
        /// 获取所有水池
        /// 获取所有扩散器
        /// </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;
        }
    }