| | |
| | | } |
| | | } |
| | | } |
| | | if (rhs.Coolings != null && rhs.Coolings.Count > 0) |
| | | {//冷却塔 |
| | | var coolingNameList = rhs.Coolings.Where(x => !string.IsNullOrEmpty(x.Name)).Select(x => x.Name).Distinct().ToList(); |
| | | foreach (var cooling in rhs.Coolings) |
| | | { |
| | | if (string.IsNullOrEmpty(cooling.Name)) |
| | | { |
| | | var coolingName = Yw.Untity.UniqueHelper.CreateFromFirst("冷却塔", coolingNameList); |
| | | cooling.Name = coolingName; |
| | | coolingNameList.Add(coolingName); |
| | | } |
| | | } |
| | | } |
| | | if (rhs.Meters != null && rhs.Meters.Count > 0) |
| | | {//水表 |
| | | var meterNameList = rhs.Meters.Where(x => !string.IsNullOrEmpty(x.Name)).Select(x => x.Name).Distinct().ToList(); |
| | |
| | | result = false; |
| | | continue; |
| | | } |
| | | |
| | | var startJunction = new Model.RevitJunction(); |
| | | startJunction.Id = Yw.Untity.UniqueHelper.CreateFromFirst("junction", allParterList.Select(x => x.Id).ToList()); |
| | | startJunction.Name = UniqueHelper.CreateFromFirst("连接节点", allParterList.Select(x => x.Name).Distinct().ToList()); |
| | |
| | | startJunction.Description = "换热器修正时,自动添加"; |
| | | startJunction.Position = startConnectList.GetCenterPosition(); |
| | | startJunction.Elev = exchanger.Elev; |
| | | startJunction.Demand = null; |
| | | startJunction.Demand = 0; |
| | | startJunction.DemandPattern = null; |
| | | rhs.Junctions.Add(startJunction); |
| | | exchanger.StartCode = startJunction.Id; |
| | | |
| | | foreach (var startConnect in startConnectList) |
| | | { |
| | | var startConnectParter = allParterList.Find(x => x.Id == startConnect.Id); |
| | |
| | | { |
| | | revitLink.EndCode = startJunction.Id; |
| | | } |
| | | if (!rhs.Junctions.Exists(t => t.Id == startJunction.Id)) |
| | | { |
| | | rhs.Junctions.Add(startJunction); |
| | | exchanger.StartCode = startJunction.Id; |
| | | allParterList.Add(startJunction); |
| | | } |
| | | } |
| | | } |
| | | allParterList.Add(startJunction); |
| | | |
| | | |
| | | #endregion |
| | | |
| | |
| | | result = false; |
| | | continue; |
| | | } |
| | | |
| | | var endJunction = new Model.RevitJunction(); |
| | | endJunction.Id = Yw.Untity.UniqueHelper.CreateFromFirst("junction", allParterList.Select(x => x.Id).ToList()); |
| | | endJunction.Name = UniqueHelper.CreateFromFirst("连接节点", allParterList.Select(x => x.Name).Distinct().ToList()); |
| | |
| | | endJunction.Description = "换热器修正时,自动添加"; |
| | | endJunction.Position = endConnectList.GetCenterPosition(); |
| | | endJunction.Elev = exchanger.Elev; |
| | | endJunction.Demand = null; |
| | | endJunction.Demand = 0; |
| | | endJunction.DemandPattern = null; |
| | | rhs.Junctions.Add(endJunction); |
| | | exchanger.EndCode = endJunction.Id; |
| | | |
| | | foreach (var endConnect in endConnectList) |
| | | { |
| | | var endConnectParter = allParterList.Find(x => x.Id == endConnect.Id); |
| | |
| | | { |
| | | revitLink.EndCode = endJunction.Id; |
| | | } |
| | | if (!rhs.Junctions.Exists(t => t.Id == endJunction.Id)) |
| | | { |
| | | rhs.Junctions.Add(endJunction); |
| | | exchanger.EndCode = endJunction.Id; |
| | | allParterList.Add(endJunction); |
| | | } |
| | | } |
| | | } |
| | | allParterList.Add(endJunction); |
| | | |
| | | |
| | | #endregion |
| | | } |
| | |
| | | startJunction.Description = "空压机修正时,自动添加"; |
| | | startJunction.Position = startConnectList.GetCenterPosition(); |
| | | startJunction.Elev = compressor.Elev; |
| | | startJunction.Demand = null; |
| | | startJunction.Demand = 0; |
| | | startJunction.DemandPattern = null; |
| | | rhs.Junctions.Add(startJunction); |
| | | compressor.StartCode = startJunction.Id; |
| | |
| | | endJunction.Description = "空压机修正时,自动添加"; |
| | | endJunction.Position = endConnectList.GetCenterPosition(); |
| | | endJunction.Elev = compressor.Elev; |
| | | endJunction.Demand = null; |
| | | endJunction.Demand = 0; |
| | | endJunction.DemandPattern = null; |
| | | rhs.Junctions.Add(endJunction); |
| | | compressor.EndCode = endJunction.Id; |
| | |
| | | junction.Description = "水力修正时,自动添加"; |
| | | junction.Position = link.StartPosition; |
| | | junction.Elev = link.StartPosition.Z; |
| | | junction.Demand = null; |
| | | junction.Demand = 0; |
| | | junction.DemandPattern = null; |
| | | rhs.Junctions.Add(junction); |
| | | link.StartCode = junction.Id; |
| | |
| | | junction.Description = "水力修正时,自动添加"; |
| | | junction.Position = link.EndPosition; |
| | | junction.Elev = link.EndPosition.Z; |
| | | junction.Demand = null; |
| | | junction.Demand = 0; |
| | | junction.DemandPattern = null; |
| | | rhs.Junctions.Add(junction); |
| | | link.EndCode = junction.Id; |