| | |
| | | namespace HStation.Hydro |
| | | using HStation.Model; |
| | | |
| | | namespace HStation.Hydro |
| | | { |
| | | /// <summary> |
| | | /// 转换辅助类 |
| | |
| | | /// <summary> |
| | | /// 从Revit转换 |
| | | /// </summary> |
| | | public static Yw.Model.HydroModelInfo FromRevit(HStation.Model.RevitModel revitModel, out string msg) |
| | | public static Yw.Model.HydroModelInfo FromRevit |
| | | ( |
| | | HStation.Model.RevitModel revitModel, |
| | | out List<Yw.Model.HydroParterPropStatusInfo> allPropStatusList, |
| | | out List<Yw.Model.HydroParterScenePropValueInfo> allScenePropValueList, |
| | | out List<Yw.Model.HydroDecoratorInfo> allDecoratorList, |
| | | out string msg |
| | | ) |
| | | { |
| | | msg = string.Empty; |
| | | |
| | | var hydro = new Yw.Model.HydroModelInfo(); |
| | | hydro.Name = revitModel.Name; |
| | | hydro.Code = null; |
| | | hydro.Paras = null; |
| | | hydro.Flags = null; |
| | | hydro.TagName = null; |
| | | hydro.Description = revitModel.Description; |
| | | var hydroInfo = new Yw.Model.HydroModelInfo(); |
| | | hydroInfo.Name = revitModel.Name; |
| | | hydroInfo.Code = null; |
| | | hydroInfo.Paras = null; |
| | | hydroInfo.Flags = new List<string>(); |
| | | hydroInfo.TagName = null; |
| | | hydroInfo.Description = revitModel.Description; |
| | | |
| | | var propStatusHelper = new PropStatusHelper(hydroInfo); |
| | | allScenePropValueList = new List<HydroParterScenePropValueInfo>();//场景属性列表 |
| | | |
| | | //水库 |
| | | if (revitModel.Reservoirs != null && revitModel.Reservoirs.Count > 0) |
| | | { |
| | | if (hydroInfo.Reservoirs == null) |
| | | { |
| | | hydroInfo.Reservoirs = new List<Yw.Model.HydroReservoirInfo>(); |
| | | } |
| | | foreach (var revitReservoir in revitModel.Reservoirs) |
| | | { |
| | | var reservoir = new Yw.Model.HydroReservoirInfo(); |
| | | reservoir.Catalog = Yw.Hydro.ParterCatalog.Reservoir; |
| | | reservoir.Name = revitReservoir.Name; |
| | | reservoir.Code = revitReservoir.Code; |
| | | reservoir.ModelType = revitReservoir.ModelType; |
| | | reservoir.Flags = revitReservoir.Flags; |
| | | reservoir.Description = revitReservoir.Description; |
| | | reservoir.Quality = revitReservoir.Quality; |
| | | reservoir.PoolElev = revitReservoir.PoolElev; |
| | | reservoir.Head = revitReservoir.Head; |
| | | reservoir.HeadPattern = revitReservoir.HeadPattern; |
| | | reservoir.Position2d = new Yw.Model.Hydro.Position2d(revitReservoir.Position.X, revitReservoir.Position.Y); |
| | | reservoir.Position3d = new Yw.Model.Hydro.Position3d(revitReservoir.Position.X, revitReservoir.Position.Y, revitReservoir.Position.Z); |
| | | reservoir.ScenePropValueList = revitReservoir.PropValueList?.Select(x => new Yw.Model.HydroParterScenePropValueInfo() |
| | | { |
| | | Scene = HStation.Revit.ConstParas.Scene, |
| | | PropName = x.PropName, |
| | | PropValue = x.PropValue |
| | | }).ToList(); |
| | | hydro.Reservoirs.Add(reservoir); |
| | | var reservoir = FromRevit(revitReservoir, propStatusHelper, ref allScenePropValueList); |
| | | hydroInfo.Reservoirs.Add(reservoir); |
| | | } |
| | | } |
| | | |
| | | //水池 |
| | | if (revitModel.Tanks != null && revitModel.Tanks.Count > 0) |
| | | { |
| | | if (hydroInfo.Tanks == null) |
| | | { |
| | | hydroInfo.Tanks = new List<Yw.Model.HydroTankInfo>(); |
| | | } |
| | | foreach (var revitTank in revitModel.Tanks) |
| | | { |
| | | var tank = new Yw.Model.HydroTankInfo(); |
| | | tank.Catalog = Yw.Hydro.ParterCatalog.Tank; |
| | | tank.Name = revitTank.Name; |
| | | tank.Code = revitTank.Code; |
| | | tank.ModelType = revitTank.ModelType; |
| | | tank.Flags = revitTank.Flags; |
| | | tank.Description = revitTank.Description; |
| | | tank.Quality = revitTank.Quality; |
| | | tank.PoolElev = revitTank.PoolElev; |
| | | tank.InitLevel = revitTank.InitLevel; |
| | | tank.MinLevel = revitTank.MinLevel; |
| | | tank.MaxLevel = revitTank.MaxLevel; |
| | | tank.Diameter = revitTank.DN; |
| | | tank.MinVol = revitTank.MinVol; |
| | | tank.VolCurve = revitTank.VolCurve; |
| | | tank.Position2d = new Yw.Model.Hydro.Position2d(revitTank.Position.X, revitTank.Position.Y); |
| | | tank.Position3d = new Yw.Model.Hydro.Position3d(revitTank.Position.X, revitTank.Position.Y, revitTank.Position.Z); |
| | | tank.ScenePropValueList = revitTank.PropValueList?.Select(x => new Yw.Model.HydroParterScenePropValueInfo() |
| | | { |
| | | Scene = HStation.Revit.ConstParas.Scene, |
| | | PropName = x.PropName, |
| | | PropValue = x.PropValue |
| | | }).ToList(); |
| | | hydro.Tanks.Add(tank); |
| | | var tank = FromRevit(revitTank, propStatusHelper, ref allScenePropValueList); |
| | | hydroInfo.Tanks.Add(tank); |
| | | } |
| | | } |
| | | |
| | | //水箱 |
| | | if (revitModel.Waterboxs != null && revitModel.Waterboxs.Count > 0) |
| | | { |
| | | if (hydroInfo.Waterboxs == null) |
| | | { |
| | | hydroInfo.Waterboxs = new List<Yw.Model.HydroWaterboxInfo>(); |
| | | } |
| | | foreach (var revitWaterbox in revitModel.Waterboxs) |
| | | { |
| | | var waterbox = new Yw.Model.HydroWaterboxInfo(); |
| | | waterbox.Catalog = Yw.Hydro.ParterCatalog.Waterbox; |
| | | waterbox.Name = revitWaterbox.Name; |
| | | waterbox.Code = revitWaterbox.Code; |
| | | waterbox.ModelType = revitWaterbox.ModelType; |
| | | waterbox.Flags = revitWaterbox.Flags; |
| | | waterbox.Description = revitWaterbox.Description; |
| | | waterbox.Quality = revitWaterbox.Quality; |
| | | waterbox.PoolElev = revitWaterbox.PoolElev; |
| | | waterbox.InitLevel = revitWaterbox.InitLevel; |
| | | waterbox.MinLevel = revitWaterbox.MinLevel; |
| | | waterbox.MaxLevel = revitWaterbox.MaxLevel; |
| | | waterbox.Diameter = revitWaterbox.DN; |
| | | waterbox.MinVol = revitWaterbox.MinVol; |
| | | waterbox.VolCurve = revitWaterbox.VolCurve; |
| | | waterbox.Position2d = new Yw.Model.Hydro.Position2d(revitWaterbox.Position.X, revitWaterbox.Position.Y); |
| | | waterbox.Position3d = new Yw.Model.Hydro.Position3d(revitWaterbox.Position.X, revitWaterbox.Position.Y, revitWaterbox.Position.Z); |
| | | waterbox.ScenePropValueList = revitWaterbox.PropValueList?.Select(x => new Yw.Model.HydroParterScenePropValueInfo() |
| | | { |
| | | Scene = HStation.Revit.ConstParas.Scene, |
| | | PropName = x.PropName, |
| | | PropValue = x.PropValue |
| | | }).ToList(); |
| | | hydro.Waterboxs.Add(waterbox); |
| | | var waterbox = FromRevit(revitWaterbox, propStatusHelper, ref allScenePropValueList); |
| | | hydroInfo.Waterboxs.Add(waterbox); |
| | | } |
| | | } |
| | | |
| | | //连接节点 |
| | | if (revitModel.Junctions != null && revitModel.Junctions.Count > 0) |
| | | { |
| | | if (hydroInfo.Junctions == null) |
| | | { |
| | | hydroInfo.Junctions = new List<Yw.Model.HydroJunctionInfo>(); |
| | | } |
| | | foreach (var revitJunction in revitModel.Junctions) |
| | | { |
| | | var junction = new Yw.Model.HydroJunctionInfo(); |
| | | junction.Catalog = Yw.Hydro.ParterCatalog.Junction; |
| | | junction.Name = revitJunction.Name; |
| | | junction.Code = revitJunction.Code; |
| | | junction.ModelType = revitJunction.ModelType; |
| | | junction.Flags = revitJunction.Flags; |
| | | junction.Description = revitJunction.Description; |
| | | junction.Quality = revitJunction.Quality; |
| | | junction.Elev = revitJunction.Elev; |
| | | junction.Demand = revitJunction.Demand; |
| | | junction.DemandPattern = revitJunction.DemandPattern; |
| | | junction.Position2d = new Yw.Model.Hydro.Position2d(revitJunction.Position.X, revitJunction.Position.Y); |
| | | junction.Position3d = new Yw.Model.Hydro.Position3d(revitJunction.Position.X, revitJunction.Position.Y, revitJunction.Position.Z); |
| | | junction.ScenePropValueList = revitJunction.PropValueList?.Select(x => new Yw.Model.HydroParterScenePropValueInfo() |
| | | { |
| | | Scene = HStation.Revit.ConstParas.Scene, |
| | | PropName = x.PropName, |
| | | PropValue = x.PropValue |
| | | }).ToList(); |
| | | hydro.Junctions.Add(junction); |
| | | } |
| | | } |
| | | |
| | | //弯头 |
| | | if (revitModel.Elbows != null && revitModel.Elbows.Count > 0) |
| | | { |
| | | foreach (var revitElbow in revitModel.Elbows) |
| | | { |
| | | var elbow = new Yw.Model.HydroElbowInfo(); |
| | | elbow.Catalog = Yw.Hydro.ParterCatalog.Elbow; |
| | | elbow.Name = revitElbow.Name; |
| | | elbow.Code = revitElbow.Code; |
| | | elbow.ModelType = revitElbow.ModelType; |
| | | elbow.Flags = revitElbow.Flags; |
| | | elbow.Description = revitElbow.Description; |
| | | elbow.Quality = revitElbow.Quality; |
| | | elbow.Elev = revitElbow.Elev; |
| | | elbow.Demand = revitElbow.Demand; |
| | | elbow.DemandPattern = revitElbow.DemandPattern; |
| | | elbow.Position2d = new Yw.Model.Hydro.Position2d(revitElbow.Position.X, revitElbow.Position.Y); |
| | | elbow.Position3d = new Yw.Model.Hydro.Position3d(revitElbow.Position.X, revitElbow.Position.Y, revitElbow.Position.Z); |
| | | elbow.ScenePropValueList = revitElbow.PropValueList?.Select(x => new Yw.Model.HydroParterScenePropValueInfo() |
| | | { |
| | | Scene = HStation.Revit.ConstParas.Scene, |
| | | PropName = x.PropName, |
| | | PropValue = x.PropValue |
| | | }).ToList(); |
| | | hydro.Elbows.Add(elbow); |
| | | } |
| | | } |
| | | |
| | | //三通 |
| | | if (revitModel.Threelinks != null && revitModel.Threelinks.Count > 0) |
| | | { |
| | | foreach (var revitThreelink in revitModel.Threelinks) |
| | | { |
| | | var threelink = new Yw.Model.HydroThreelinkInfo(); |
| | | threelink.Catalog = Yw.Hydro.ParterCatalog.Threelink; |
| | | threelink.Name = revitThreelink.Name; |
| | | threelink.Code = revitThreelink.Code; |
| | | threelink.ModelType = revitThreelink.ModelType; |
| | | threelink.Flags = revitThreelink.Flags; |
| | | threelink.Description = revitThreelink.Description; |
| | | threelink.Quality = revitThreelink.Quality; |
| | | threelink.Elev = revitThreelink.Elev; |
| | | threelink.Demand = revitThreelink.Demand; |
| | | threelink.DemandPattern = revitThreelink.DemandPattern; |
| | | threelink.Position2d = new Yw.Model.Hydro.Position2d(revitThreelink.Position.X, revitThreelink.Position.Y); |
| | | threelink.Position3d = new Yw.Model.Hydro.Position3d(revitThreelink.Position.X, revitThreelink.Position.Y, revitThreelink.Position.Z); |
| | | threelink.ScenePropValueList = revitThreelink.PropValueList?.Select(x => new Yw.Model.HydroParterScenePropValueInfo() |
| | | { |
| | | Scene = HStation.Revit.ConstParas.Scene, |
| | | PropName = x.PropName, |
| | | PropValue = x.PropValue |
| | | }).ToList(); |
| | | hydro.Threelinks.Add(threelink); |
| | | } |
| | | } |
| | | |
| | | //四通 |
| | | if (revitModel.Fourlinks != null && revitModel.Fourlinks.Count > 0) |
| | | { |
| | | foreach (var revitFourlink in revitModel.Fourlinks) |
| | | { |
| | | var fourlink = new Yw.Model.HydroFourlinkInfo(); |
| | | fourlink.Catalog = Yw.Hydro.ParterCatalog.Fourlink; |
| | | fourlink.Name = revitFourlink.Name; |
| | | fourlink.Code = revitFourlink.Code; |
| | | fourlink.ModelType = revitFourlink.ModelType; |
| | | fourlink.Flags = revitFourlink.Flags; |
| | | fourlink.Description = revitFourlink.Description; |
| | | fourlink.Quality = revitFourlink.Quality; |
| | | fourlink.Elev = revitFourlink.Elev; |
| | | fourlink.Demand = revitFourlink.Demand; |
| | | fourlink.DemandPattern = revitFourlink.DemandPattern; |
| | | fourlink.Position2d = new Yw.Model.Hydro.Position2d(revitFourlink.Position.X, revitFourlink.Position.Y); |
| | | fourlink.Position3d = new Yw.Model.Hydro.Position3d(revitFourlink.Position.X, revitFourlink.Position.Y, revitFourlink.Position.Z); |
| | | fourlink.ScenePropValueList = revitFourlink.PropValueList?.Select(x => new Yw.Model.HydroParterScenePropValueInfo() |
| | | { |
| | | Scene = HStation.Revit.ConstParas.Scene, |
| | | PropName = x.PropName, |
| | | PropValue = x.PropValue |
| | | }).ToList(); |
| | | hydro.Fourlinks.Add(fourlink); |
| | | } |
| | | } |
| | | |
| | | //喷嘴 |
| | | if (revitModel.Nozzles != null && revitModel.Nozzles.Count > 0) |
| | | { |
| | | foreach (var revitNozzle in revitModel.Nozzles) |
| | | { |
| | | var nozzle = new Yw.Model.HydroNozzleInfo(); |
| | | nozzle.Catalog = Yw.Hydro.ParterCatalog.Nozzle; |
| | | nozzle.Name = revitNozzle.Name; |
| | | nozzle.Code = revitNozzle.Code; |
| | | nozzle.ModelType = revitNozzle.ModelType; |
| | | nozzle.Flags = revitNozzle.Flags; |
| | | nozzle.Description = revitNozzle.Description; |
| | | nozzle.Quality = revitNozzle.Quality; |
| | | nozzle.Coefficient = revitNozzle.Coefficient; |
| | | nozzle.Elev = revitNozzle.Elev; |
| | | nozzle.Demand = revitNozzle.Demand; |
| | | nozzle.DemandPattern = revitNozzle.DemandPattern; |
| | | nozzle.Position2d = new Yw.Model.Hydro.Position2d(revitNozzle.Position.X, revitNozzle.Position.Y); |
| | | nozzle.Position3d = new Yw.Model.Hydro.Position3d(revitNozzle.Position.X, revitNozzle.Position.Y, revitNozzle.Position.Z); |
| | | nozzle.ScenePropValueList = revitNozzle.PropValueList?.Select(x => new Yw.Model.HydroParterScenePropValueInfo() |
| | | { |
| | | Scene = HStation.Revit.ConstParas.Scene, |
| | | PropName = x.PropName, |
| | | PropValue = x.PropValue |
| | | }).ToList(); |
| | | hydro.Nozzles.Add(nozzle); |
| | | } |
| | | } |
| | | |
| | | //消火栓 |
| | | if (revitModel.Hydrants != null && revitModel.Hydrants.Count > 0) |
| | | { |
| | | foreach (var revitHydrant in revitModel.Hydrants) |
| | | { |
| | | var hydrant = new Yw.Model.HydroHydrantInfo(); |
| | | hydrant.Catalog = Yw.Hydro.ParterCatalog.Hydrant; |
| | | hydrant.Name = revitHydrant.Name; |
| | | hydrant.Code = revitHydrant.Code; |
| | | hydrant.ModelType = revitHydrant.ModelType; |
| | | hydrant.Flags = revitHydrant.Flags; |
| | | hydrant.Description = revitHydrant.Description; |
| | | hydrant.Quality = revitHydrant.Quality; |
| | | hydrant.Coefficient = revitHydrant.Coefficient; |
| | | hydrant.Elev = revitHydrant.Elev; |
| | | hydrant.Demand = revitHydrant.Demand; |
| | | hydrant.DemandPattern = revitHydrant.DemandPattern; |
| | | hydrant.Position2d = new Yw.Model.Hydro.Position2d(revitHydrant.Position.X, revitHydrant.Position.Y); |
| | | hydrant.Position3d = new Yw.Model.Hydro.Position3d(revitHydrant.Position.X, revitHydrant.Position.Y, revitHydrant.Position.Z); |
| | | hydrant.ScenePropValueList = revitHydrant.PropValueList?.Select(x => new Yw.Model.HydroParterScenePropValueInfo() |
| | | { |
| | | Scene = HStation.Revit.ConstParas.Scene, |
| | | PropName = x.PropName, |
| | | PropValue = x.PropValue |
| | | }).ToList(); |
| | | hydro.Hydrants.Add(hydrant); |
| | | } |
| | | } |
| | | |
| | | //水表 |
| | | if (revitModel.Meters != null && revitModel.Meters.Count > 0) |
| | | { |
| | | foreach (var revitMeter in revitModel.Meters) |
| | | { |
| | | var meter = new Yw.Model.HydroMeterInfo(); |
| | | meter.Catalog = Yw.Hydro.ParterCatalog.Meter; |
| | | meter.Name = revitMeter.Name; |
| | | meter.Code = revitMeter.Code; |
| | | meter.ModelType = revitMeter.ModelType; |
| | | meter.Flags = revitMeter.Flags; |
| | | meter.Description = revitMeter.Description; |
| | | meter.Quality = revitMeter.Quality; |
| | | meter.Elev = revitMeter.Elev; |
| | | meter.Demand = revitMeter.Demand; |
| | | meter.DemandPattern = revitMeter.DemandPattern; |
| | | meter.Position2d = new Yw.Model.Hydro.Position2d(revitMeter.Position.X, revitMeter.Position.Y); |
| | | meter.Position3d = new Yw.Model.Hydro.Position3d(revitMeter.Position.X, revitMeter.Position.Y, revitMeter.Position.Z); |
| | | meter.ScenePropValueList = revitMeter.PropValueList?.Select(x => new Yw.Model.HydroParterScenePropValueInfo() |
| | | { |
| | | Scene = HStation.Revit.ConstParas.Scene, |
| | | PropName = x.PropName, |
| | | PropValue = x.PropValue |
| | | }).ToList(); |
| | | hydro.Meters.Add(meter); |
| | | } |
| | | } |
| | | |
| | | //流量计 |
| | | if (revitModel.Flowmeters != null && revitModel.Flowmeters.Count > 0) |
| | | { |
| | | foreach (var revitFlowmeter in revitModel.Flowmeters) |
| | | { |
| | | var flowmeter = new Yw.Model.HydroFlowmeterInfo(); |
| | | flowmeter.Catalog = Yw.Hydro.ParterCatalog.Flowmeter; |
| | | flowmeter.Name = revitFlowmeter.Name; |
| | | flowmeter.Code = revitFlowmeter.Code; |
| | | flowmeter.ModelType = revitFlowmeter.ModelType; |
| | | flowmeter.Flags = revitFlowmeter.Flags; |
| | | flowmeter.Description = revitFlowmeter.Description; |
| | | flowmeter.Quality = revitFlowmeter.Quality; |
| | | flowmeter.Elev = revitFlowmeter.Elev; |
| | | flowmeter.Demand = revitFlowmeter.Demand; |
| | | flowmeter.DemandPattern = revitFlowmeter.DemandPattern; |
| | | flowmeter.Position2d = new Yw.Model.Hydro.Position2d(revitFlowmeter.Position.X, revitFlowmeter.Position.Y); |
| | | flowmeter.Position3d = new Yw.Model.Hydro.Position3d(revitFlowmeter.Position.X, revitFlowmeter.Position.Y, revitFlowmeter.Position.Z); |
| | | flowmeter.ScenePropValueList = revitFlowmeter.PropValueList?.Select(x => new Yw.Model.HydroParterScenePropValueInfo() |
| | | { |
| | | Scene = HStation.Revit.ConstParas.Scene, |
| | | PropName = x.PropName, |
| | | PropValue = x.PropValue |
| | | }).ToList(); |
| | | hydro.Flowmeters.Add(flowmeter); |
| | | } |
| | | } |
| | | |
| | | //压力表 |
| | | if (revitModel.Pressmeters != null && revitModel.Pressmeters.Count > 0) |
| | | { |
| | | foreach (var revitPressmeter in revitModel.Pressmeters) |
| | | { |
| | | var pressmeter = new Yw.Model.HydroPressmeterInfo(); |
| | | pressmeter.Catalog = Yw.Hydro.ParterCatalog.Pressmeter; |
| | | pressmeter.Name = revitPressmeter.Name; |
| | | pressmeter.Code = revitPressmeter.Code; |
| | | pressmeter.ModelType = revitPressmeter.ModelType; |
| | | pressmeter.Flags = revitPressmeter.Flags; |
| | | pressmeter.Description = revitPressmeter.Description; |
| | | pressmeter.Quality = revitPressmeter.Quality; |
| | | pressmeter.Elev = revitPressmeter.Elev; |
| | | pressmeter.Demand = revitPressmeter.Demand; |
| | | pressmeter.DemandPattern = revitPressmeter.DemandPattern; |
| | | pressmeter.Position2d = new Yw.Model.Hydro.Position2d(revitPressmeter.Position.X, revitPressmeter.Position.Y); |
| | | pressmeter.Position3d = new Yw.Model.Hydro.Position3d(revitPressmeter.Position.X, revitPressmeter.Position.Y, revitPressmeter.Position.Z); |
| | | pressmeter.ScenePropValueList = revitPressmeter.PropValueList?.Select(x => new Yw.Model.HydroParterScenePropValueInfo() |
| | | { |
| | | Scene = HStation.Revit.ConstParas.Scene, |
| | | PropName = x.PropName, |
| | | PropValue = x.PropValue |
| | | }).ToList(); |
| | | hydro.Pressmeters.Add(pressmeter); |
| | | var junction = FromRevit(revitJunction, propStatusHelper, ref allScenePropValueList); |
| | | hydroInfo.Junctions.Add(junction); |
| | | } |
| | | } |
| | | |
| | | //闷头 |
| | | if (revitModel.Bluntheads != null && revitModel.Bluntheads.Count > 0) |
| | | { |
| | | if (hydroInfo.Bluntheads == null) |
| | | { |
| | | hydroInfo.Bluntheads = new List<Yw.Model.HydroBluntheadInfo>(); |
| | | } |
| | | foreach (var revitBlunthead in revitModel.Bluntheads) |
| | | { |
| | | var blunthead = new Yw.Model.HydroBluntheadInfo(); |
| | | blunthead.Catalog = Yw.Hydro.ParterCatalog.Blunthead; |
| | | blunthead.Name = revitBlunthead.Name; |
| | | blunthead.Code = revitBlunthead.Code; |
| | | blunthead.ModelType = revitBlunthead.ModelType; |
| | | blunthead.Flags = revitBlunthead.Flags; |
| | | blunthead.Description = revitBlunthead.Description; |
| | | blunthead.Quality = revitBlunthead.Quality; |
| | | blunthead.Elev = revitBlunthead.Elev; |
| | | blunthead.Demand = revitBlunthead.Demand; |
| | | blunthead.DemandPattern = revitBlunthead.DemandPattern; |
| | | blunthead.Position2d = new Yw.Model.Hydro.Position2d(revitBlunthead.Position.X, revitBlunthead.Position.Y); |
| | | blunthead.Position3d = new Yw.Model.Hydro.Position3d(revitBlunthead.Position.X, revitBlunthead.Position.Y, revitBlunthead.Position.Z); |
| | | blunthead.ScenePropValueList = revitBlunthead.PropValueList?.Select(x => new Yw.Model.HydroParterScenePropValueInfo() |
| | | { |
| | | Scene = HStation.Revit.ConstParas.Scene, |
| | | PropName = x.PropName, |
| | | PropValue = x.PropValue |
| | | }).ToList(); |
| | | hydro.Bluntheads.Add(blunthead); |
| | | var blunthead = FromRevit(revitBlunthead, propStatusHelper, ref allScenePropValueList); |
| | | hydroInfo.Bluntheads.Add(blunthead); |
| | | } |
| | | } |
| | | |
| | | //水泵 |
| | | if (revitModel.Pumps != null && revitModel.Pumps.Count > 0) |
| | | //弯头 |
| | | if (revitModel.Elbows != null && revitModel.Elbows.Count > 0) |
| | | { |
| | | foreach (var revitPump in revitModel.Pumps) |
| | | if (hydroInfo.Elbows == null) |
| | | { |
| | | var pump = new Yw.Model.HydroPumpInfo(); |
| | | pump.Catalog = Yw.Hydro.ParterCatalog.Pump; |
| | | pump.Name = revitPump.Name; |
| | | pump.Code = revitPump.Code; |
| | | pump.ModelType = revitPump.ModelType; |
| | | pump.Flags = revitPump.Flags; |
| | | pump.Description = revitPump.Description; |
| | | pump.StartCode = revitPump.StartCode; |
| | | pump.EndCode = revitPump.EndCode; |
| | | pump.LinkStatus = revitPump.LinkStatus; |
| | | pump.RatedP = revitPump.RatedP; |
| | | pump.CurveQH = revitPump.CurveQH; |
| | | pump.Price = revitPump.Price; |
| | | pump.PricePattern = revitPump.PricePattern; |
| | | pump.CurveQE = revitPump.CurveQE; |
| | | pump.ScenePropValueList = revitPump.PropValueList?.Select(x => new Yw.Model.HydroParterScenePropValueInfo() |
| | | { |
| | | Scene = HStation.Revit.ConstParas.Scene, |
| | | PropName = x.PropName, |
| | | PropValue = x.PropValue |
| | | }).ToList(); |
| | | hydro.Pumps.Add(pump); |
| | | hydroInfo.Elbows = new List<HydroElbowInfo>(); |
| | | } |
| | | foreach (var revitElbow in revitModel.Elbows) |
| | | { |
| | | var elbow = FromRevit(revitElbow, propStatusHelper, ref allScenePropValueList); |
| | | hydroInfo.Elbows.Add(elbow); |
| | | } |
| | | } |
| | | |
| | | //阀门 |
| | | if (revitModel.Valves != null && revitModel.Valves.Count > 0) |
| | | //三通 |
| | | if (revitModel.Threelinks != null && revitModel.Threelinks.Count > 0) |
| | | { |
| | | foreach (var revitValve in revitModel.Valves) |
| | | if (hydroInfo.Threelinks == null) |
| | | { |
| | | var valve = new Yw.Model.HydroValveInfo(); |
| | | valve.Catalog = Yw.Hydro.ParterCatalog.Valve; |
| | | valve.Name = revitValve.Name; |
| | | valve.Code = revitValve.Code; |
| | | valve.ModelType = revitValve.ModelType; |
| | | valve.Flags = revitValve.Flags; |
| | | valve.Description = revitValve.Description; |
| | | valve.StartCode = revitValve.StartCode; |
| | | valve.EndCode = revitValve.EndCode; |
| | | valve.LinkStatus = revitValve.LinkStatus; |
| | | valve.Diameter = revitValve.Diameter; |
| | | valve.MinorLoss = revitValve.MinorLoss; |
| | | valve.ValveType = revitValve.ValveType; |
| | | valve.ValveSetting = revitValve.ValveSetting; |
| | | valve.ScenePropValueList = revitValve.PropValueList?.Select(x => new Yw.Model.HydroParterScenePropValueInfo() |
| | | { |
| | | Scene = HStation.Revit.ConstParas.Scene, |
| | | PropName = x.PropName, |
| | | PropValue = x.PropValue |
| | | }).ToList(); |
| | | hydro.Valves.Add(valve); |
| | | hydroInfo.Threelinks = new List<HydroThreelinkInfo>(); |
| | | } |
| | | foreach (var revitThreelink in revitModel.Threelinks) |
| | | { |
| | | var threelink = FromRevit(revitThreelink, propStatusHelper, ref allScenePropValueList); |
| | | hydroInfo.Threelinks.Add(threelink); |
| | | } |
| | | } |
| | | |
| | | //四通 |
| | | if (revitModel.Fourlinks != null && revitModel.Fourlinks.Count > 0) |
| | | { |
| | | if (hydroInfo.Fourlinks == null) |
| | | { |
| | | hydroInfo.Fourlinks = new List<HydroFourlinkInfo>(); |
| | | } |
| | | foreach (var revitFourlink in revitModel.Fourlinks) |
| | | { |
| | | var fourlink = FromRevit(revitFourlink, propStatusHelper, ref allScenePropValueList); |
| | | hydroInfo.Fourlinks.Add(fourlink); |
| | | } |
| | | } |
| | | |
| | | //消火栓 |
| | | if (revitModel.Hydrants != null && revitModel.Hydrants.Count > 0) |
| | | { |
| | | if (hydroInfo.Hydrants == null) |
| | | { |
| | | hydroInfo.Hydrants = new List<HydroHydrantInfo>(); |
| | | } |
| | | foreach (var revitHydrant in revitModel.Hydrants) |
| | | { |
| | | var hydrant = FromRevit(revitHydrant, propStatusHelper, ref allScenePropValueList); |
| | | hydroInfo.Hydrants.Add(hydrant); |
| | | } |
| | | } |
| | | |
| | | //喷嘴 |
| | | if (revitModel.Nozzles != null && revitModel.Nozzles.Count > 0) |
| | | { |
| | | if (hydroInfo.Nozzles == null) |
| | | { |
| | | hydroInfo.Nozzles = new List<HydroNozzleInfo>(); |
| | | } |
| | | foreach (var revitNozzle in revitModel.Nozzles) |
| | | { |
| | | var nozzle = FromRevit(revitNozzle, propStatusHelper, ref allScenePropValueList); |
| | | hydroInfo.Nozzles.Add(nozzle); |
| | | } |
| | | } |
| | | |
| | | //冷却塔 |
| | | if (revitModel.Coolings != null && revitModel.Coolings.Count > 0) |
| | | { |
| | | if (hydroInfo.Coolings == null) |
| | | { |
| | | hydroInfo.Coolings = new List<HydroCoolingInfo>(); |
| | | } |
| | | foreach (var revitCooling in revitModel.Coolings) |
| | | { |
| | | var cooling = FromRevit(revitCooling, propStatusHelper, ref allScenePropValueList); |
| | | hydroInfo.Coolings.Add(cooling); |
| | | } |
| | | } |
| | | |
| | | //水表 |
| | | if (revitModel.Meters != null && revitModel.Meters.Count > 0) |
| | | { |
| | | if (hydroInfo.Meters == null) |
| | | { |
| | | hydroInfo.Meters = new List<HydroMeterInfo>(); |
| | | } |
| | | foreach (var revitMeter in revitModel.Meters) |
| | | { |
| | | var meter = FromRevit(revitMeter, propStatusHelper, ref allScenePropValueList); |
| | | hydroInfo.Meters.Add(meter); |
| | | } |
| | | } |
| | | |
| | | //流量计 |
| | | if (revitModel.Flowmeters != null && revitModel.Flowmeters.Count > 0) |
| | | { |
| | | if (hydroInfo.Flowmeters == null) |
| | | { |
| | | hydroInfo.Flowmeters = new List<HydroFlowmeterInfo>(); |
| | | } |
| | | foreach (var revitFlowmeter in revitModel.Flowmeters) |
| | | { |
| | | var flowmeter = FromRevit(revitFlowmeter, propStatusHelper, ref allScenePropValueList); |
| | | hydroInfo.Flowmeters.Add(flowmeter); |
| | | } |
| | | } |
| | | |
| | | //压力表 |
| | | if (revitModel.Pressmeters != null && revitModel.Pressmeters.Count > 0) |
| | | { |
| | | if (hydroInfo.Pressmeters == null) |
| | | { |
| | | hydroInfo.Pressmeters = new List<HydroPressmeterInfo>(); |
| | | } |
| | | foreach (var revitPressmeter in revitModel.Pressmeters) |
| | | { |
| | | var pressmeter = FromRevit(revitPressmeter, propStatusHelper, ref allScenePropValueList); |
| | | hydroInfo.Pressmeters.Add(pressmeter); |
| | | } |
| | | } |
| | | |
| | | //管道 |
| | | if (revitModel.Pipes != null && revitModel.Pipes.Count > 0) |
| | | { |
| | | if (hydroInfo.Pipes == null) |
| | | { |
| | | hydroInfo.Pipes = new List<HydroPipeInfo>(); |
| | | } |
| | | foreach (var revitPipe in revitModel.Pipes) |
| | | { |
| | | var pipe = new Yw.Model.HydroPipeInfo(); |
| | | pipe.Catalog = Yw.Hydro.ParterCatalog.Pipe; |
| | | pipe.Name = revitPipe.Name; |
| | | pipe.Code = revitPipe.Code; |
| | | pipe.ModelType = revitPipe.ModelType; |
| | | pipe.Flags = revitPipe.Flags; |
| | | pipe.Description = revitPipe.Description; |
| | | pipe.StartCode = revitPipe.StartCode; |
| | | pipe.EndCode = revitPipe.EndCode; |
| | | pipe.LinkStatus = revitPipe.LinkStatus; |
| | | pipe.Material = revitPipe.Material; |
| | | pipe.Diameter = revitPipe.Diameter; |
| | | pipe.Length = revitPipe.Length; |
| | | pipe.Roughness = revitPipe.Roughness; |
| | | pipe.MinorLoss = revitPipe.MinorLoss; |
| | | pipe.ScenePropValueList = revitPipe.PropValueList?.Select(x => new Yw.Model.HydroParterScenePropValueInfo() |
| | | { |
| | | Scene = HStation.Revit.ConstParas.Scene, |
| | | PropName = x.PropName, |
| | | PropValue = x.PropValue |
| | | }).ToList(); |
| | | hydro.Pipes.Add(pipe); |
| | | var pipe = FromRevit(revitPipe, propStatusHelper, ref allScenePropValueList); |
| | | hydroInfo.Pipes.Add(pipe); |
| | | } |
| | | } |
| | | |
| | | //过渡件 |
| | | if (revitModel.Translations != null && revitModel.Translations.Count > 0) |
| | | { |
| | | if (hydroInfo.Translations == null) |
| | | { |
| | | hydroInfo.Translations = new List<HydroTranslationInfo>(); |
| | | } |
| | | foreach (var revitTranslation in revitModel.Translations) |
| | | { |
| | | var translation = new Yw.Model.HydroTranslationInfo(); |
| | | translation.Catalog = Yw.Hydro.ParterCatalog.Translation; |
| | | translation.Name = revitTranslation.Name; |
| | | translation.Code = revitTranslation.Code; |
| | | translation.ModelType = revitTranslation.ModelType; |
| | | translation.Flags = revitTranslation.Flags; |
| | | translation.Description = revitTranslation.Description; |
| | | translation.StartCode = revitTranslation.StartCode; |
| | | translation.EndCode = revitTranslation.EndCode; |
| | | translation.LinkStatus = revitTranslation.LinkStatus; |
| | | translation.Diameter = revitTranslation.Diameter; |
| | | translation.Length = revitTranslation.Length; |
| | | translation.Material = revitTranslation.Material; |
| | | translation.Roughness = revitTranslation.Roughness; |
| | | translation.MinorLoss = revitTranslation.MinorLoss; |
| | | translation.ScenePropValueList = revitTranslation.PropValueList?.Select(x => new Yw.Model.HydroParterScenePropValueInfo() |
| | | { |
| | | Scene = HStation.Revit.ConstParas.Scene, |
| | | PropName = x.PropName, |
| | | PropValue = x.PropValue |
| | | }).ToList(); |
| | | hydro.Translations.Add(translation); |
| | | var translation = FromRevit(revitTranslation, propStatusHelper, ref allScenePropValueList); |
| | | hydroInfo.Translations.Add(translation); |
| | | } |
| | | } |
| | | |
| | | //水泵 |
| | | if (revitModel.Pumps != null && revitModel.Pumps.Count > 0) |
| | | { |
| | | if (hydroInfo.Pumps == null) |
| | | { |
| | | hydroInfo.Pumps = new List<HydroPumpInfo>(); |
| | | } |
| | | foreach (var revitPump in revitModel.Pumps) |
| | | { |
| | | var pump = FromRevit(revitPump, propStatusHelper, ref allScenePropValueList); |
| | | hydroInfo.Pumps.Add(pump); |
| | | } |
| | | } |
| | | |
| | | //阀门 |
| | | if (revitModel.Valves != null && revitModel.Valves.Count > 0) |
| | | { |
| | | if (hydroInfo.Valves == null) |
| | | { |
| | | hydroInfo.Valves = new List<HydroValveInfo>(); |
| | | } |
| | | foreach (var revitValve in revitModel.Valves) |
| | | { |
| | | var valve = FromRevit(revitValve, propStatusHelper, ref allScenePropValueList); |
| | | hydroInfo.Valves.Add(valve); |
| | | } |
| | | } |
| | | |
| | | //换热器 |
| | | if (revitModel.Exchangers != null && revitModel.Exchangers.Count > 0) |
| | | { |
| | | if (hydroInfo.Exchangers == null) |
| | | { |
| | | hydroInfo.Exchangers = new List<HydroExchangerInfo>(); |
| | | } |
| | | foreach (var revitExchanger in revitModel.Exchangers) |
| | | { |
| | | var exchanger = new Yw.Model.HydroExchangerInfo(); |
| | | exchanger.Catalog = Yw.Hydro.ParterCatalog.Exchanger; |
| | | exchanger.Name = revitExchanger.Name; |
| | | exchanger.Code = revitExchanger.Code; |
| | | exchanger.ModelType = revitExchanger.ModelType; |
| | | exchanger.Flags = revitExchanger.Flags; |
| | | exchanger.Description = revitExchanger.Description; |
| | | exchanger.StartCode = revitExchanger.StartCode; |
| | | exchanger.EndCode = revitExchanger.EndCode; |
| | | exchanger.LinkStatus = revitExchanger.LinkStatus; |
| | | exchanger.Diameter = revitExchanger.Diameter; |
| | | exchanger.Length = revitExchanger.Length; |
| | | exchanger.Material = revitExchanger.Material; |
| | | exchanger.Roughness = revitExchanger.Roughness; |
| | | exchanger.MinorLoss = revitExchanger.MinorLoss; |
| | | exchanger.ScenePropValueList = revitExchanger.PropValueList?.Select(x => new Yw.Model.HydroParterScenePropValueInfo() |
| | | { |
| | | Scene = HStation.Revit.ConstParas.Scene, |
| | | PropName = x.PropName, |
| | | PropValue = x.PropValue |
| | | }).ToList(); |
| | | hydro.Exchangers.Add(exchanger); |
| | | var exchanger = FromRevit(revitExchanger, propStatusHelper, ref allScenePropValueList); |
| | | hydroInfo.Exchangers.Add(exchanger); |
| | | } |
| | | } |
| | | |
| | | //空压机 |
| | | if (revitModel.Compressors != null && revitModel.Compressors.Count > 0) |
| | | { |
| | | if (hydroInfo.Compressors == null) |
| | | { |
| | | hydroInfo.Compressors = new List<HydroCompressorInfo>(); |
| | | } |
| | | foreach (var revitCompressor in revitModel.Compressors) |
| | | { |
| | | var compressor = FromRevit(revitCompressor, propStatusHelper, ref allScenePropValueList); |
| | | hydroInfo.Compressors.Add(compressor); |
| | | } |
| | | } |
| | | |
| | | //装饰件 |
| | | allDecoratorList = new List<Yw.Model.HydroDecoratorInfo>(); |
| | | if (revitModel.Decorators != null && revitModel.Decorators.Count > 0) |
| | | { |
| | | hydro.Decorators = new List<Yw.Model.HydroDecoratorInfo>(); |
| | | foreach (var revitDecorator in revitModel.Decorators) |
| | | { |
| | | var decorator = new Yw.Model.HydroDecoratorInfo(); |
| | | decorator.Scene = HStation.Revit.ConstParas.Scene; |
| | | decorator.Name = revitDecorator.Name; |
| | | decorator.Code = revitDecorator.Code; |
| | | decorator.Code = revitDecorator.Id; |
| | | decorator.Category = revitDecorator.Category; |
| | | decorator.Decoration = revitDecorator.Decoration; |
| | | decorator.Description = revitDecorator.Description; |
| | | hydro.Decorators.Add(decorator); |
| | | allDecoratorList.Add(decorator); |
| | | } |
| | | } |
| | | |
| | | return hydro; |
| | | allPropStatusList = propStatusHelper.GetPropStatusDbList(); |
| | | return hydroInfo; |
| | | } |
| | | |
| | | //水库 |
| | | private static Yw.Model.HydroReservoirInfo FromRevit |
| | | ( |
| | | HStation.Model.RevitReservoir revitReservoir, |
| | | PropStatusHelper propStatusHelper, |
| | | ref List<Yw.Model.HydroParterScenePropValueInfo> allScenePropValueList |
| | | ) |
| | | { |
| | | if (revitReservoir == null) |
| | | { |
| | | return default; |
| | | } |
| | | var reservoir = new Yw.Model.HydroReservoirInfo(); |
| | | reservoir.Catalog = Yw.Hydro.ParterCatalog.Reservoir; |
| | | reservoir.Name = revitReservoir.Name; |
| | | propStatusHelper.UpdatePropStatusInfo(revitReservoir.Id, nameof(reservoir.Name), revitReservoir, nameof(revitReservoir.Name)); |
| | | reservoir.Code = revitReservoir.Id; |
| | | propStatusHelper.UpdatePropStatusInfo(revitReservoir.Id, nameof(reservoir.Code), revitReservoir, nameof(revitReservoir.Id)); |
| | | reservoir.ModelType = revitReservoir.ModelType; |
| | | propStatusHelper.UpdatePropStatusInfo(revitReservoir.Id, nameof(reservoir.ModelType), revitReservoir, nameof(revitReservoir.ModelType)); |
| | | reservoir.Flags = revitReservoir.Flags; |
| | | if (reservoir.Flags == null) |
| | | { |
| | | reservoir.Flags = new List<string>(); |
| | | } |
| | | propStatusHelper.UpdatePropStatusInfo(revitReservoir.Id, nameof(reservoir.Flags), revitReservoir, nameof(revitReservoir.Flags)); |
| | | reservoir.Description = revitReservoir.Description; |
| | | propStatusHelper.UpdatePropStatusInfo(revitReservoir.Id, nameof(reservoir.Description), revitReservoir, nameof(revitReservoir.Description)); |
| | | reservoir.PoolElev = revitReservoir.PoolElev; |
| | | propStatusHelper.UpdatePropStatusInfo(revitReservoir.Id, nameof(reservoir.PoolElev), revitReservoir, nameof(revitReservoir.PoolElev)); |
| | | reservoir.Head = revitReservoir.Head; |
| | | propStatusHelper.UpdatePropStatusInfo(revitReservoir.Id, nameof(reservoir.Head), revitReservoir, nameof(revitReservoir.Head)); |
| | | reservoir.Position2d = new Yw.Model.Hydro.Position2d(revitReservoir.Position.X, revitReservoir.Position.Y); |
| | | propStatusHelper.UpdatePropStatusInfo(revitReservoir.Id, nameof(reservoir.Position2d), revitReservoir, nameof(revitReservoir.Position)); |
| | | reservoir.Position3d = new Yw.Model.Hydro.Position3d(revitReservoir.Position.X, revitReservoir.Position.Y, revitReservoir.Position.Z); |
| | | propStatusHelper.UpdatePropStatusInfo(revitReservoir.Id, nameof(reservoir.Position3d), revitReservoir, nameof(revitReservoir.Position)); |
| | | |
| | | if (allScenePropValueList == null) |
| | | { |
| | | allScenePropValueList = new List<HydroParterScenePropValueInfo>(); |
| | | } |
| | | |
| | | var scenePropValueList = revitReservoir.PropValueList?.Select(x => new Yw.Model.HydroParterScenePropValueInfo() |
| | | { |
| | | Parter = revitReservoir.Id, |
| | | Scene = HStation.Revit.ConstParas.Scene, |
| | | PropName = x.PropName, |
| | | PropValue = x.PropValue |
| | | }).ToList(); |
| | | if (scenePropValueList != null && scenePropValueList.Count > 0) |
| | | { |
| | | allScenePropValueList.AddRange(scenePropValueList); |
| | | } |
| | | |
| | | return reservoir; |
| | | } |
| | | |
| | | //水池 |
| | | private static Yw.Model.HydroTankInfo FromRevit |
| | | ( |
| | | HStation.Model.RevitTank revitTank, |
| | | PropStatusHelper propStatusHelper, |
| | | ref List<Yw.Model.HydroParterScenePropValueInfo> allScenePropValueList |
| | | ) |
| | | { |
| | | if (revitTank == null) |
| | | { |
| | | return default; |
| | | } |
| | | var tank = new Yw.Model.HydroTankInfo(); |
| | | tank.Catalog = Yw.Hydro.ParterCatalog.Tank; |
| | | tank.Name = revitTank.Name; |
| | | propStatusHelper.UpdatePropStatusInfo(revitTank.Id, nameof(tank.Name), revitTank, nameof(revitTank.Name)); |
| | | tank.Code = revitTank.Id; |
| | | propStatusHelper.UpdatePropStatusInfo(revitTank.Id, nameof(tank.Code), revitTank, nameof(revitTank.Id)); |
| | | tank.ModelType = revitTank.ModelType; |
| | | propStatusHelper.UpdatePropStatusInfo(revitTank.Id, nameof(tank.ModelType), revitTank, nameof(revitTank.ModelType)); |
| | | tank.Flags = revitTank.Flags; |
| | | if (tank.Flags == null) |
| | | { |
| | | tank.Flags = new List<string>(); |
| | | } |
| | | propStatusHelper.UpdatePropStatusInfo(revitTank.Id, nameof(tank.Flags), revitTank, nameof(revitTank.Flags)); |
| | | tank.Description = revitTank.Description; |
| | | propStatusHelper.UpdatePropStatusInfo(revitTank.Id, nameof(tank.Description), revitTank, nameof(revitTank.Description)); |
| | | tank.PoolElev = revitTank.PoolElev; |
| | | propStatusHelper.UpdatePropStatusInfo(revitTank.Id, nameof(tank.PoolElev), revitTank, nameof(revitTank.PoolElev)); |
| | | tank.InitLevel = revitTank.InitLevel; |
| | | propStatusHelper.UpdatePropStatusInfo(revitTank.Id, nameof(tank.InitLevel), revitTank, nameof(revitTank.InitLevel)); |
| | | tank.MinLevel = revitTank.MinLevel; |
| | | propStatusHelper.UpdatePropStatusInfo(revitTank.Id, nameof(tank.MinLevel), revitTank, nameof(revitTank.MinLevel)); |
| | | tank.MaxLevel = revitTank.MaxLevel; |
| | | propStatusHelper.UpdatePropStatusInfo(revitTank.Id, nameof(tank.MaxLevel), revitTank, nameof(revitTank.MaxLevel)); |
| | | tank.DN = revitTank.DN; |
| | | propStatusHelper.UpdatePropStatusInfo(revitTank.Id, nameof(tank.DN), revitTank, nameof(revitTank.DN)); |
| | | tank.MinVol = revitTank.MinVol; |
| | | propStatusHelper.UpdatePropStatusInfo(revitTank.Id, nameof(tank.MinVol), revitTank, nameof(revitTank.MinVol)); |
| | | tank.VolCurve = revitTank.VolCurve; |
| | | propStatusHelper.UpdatePropStatusInfo(revitTank.Id, nameof(tank.VolCurve), revitTank, nameof(revitTank.VolCurve)); |
| | | tank.OverFlow = revitTank.OverFlow; |
| | | propStatusHelper.UpdatePropStatusInfo(revitTank.Id, nameof(tank.OverFlow), revitTank, nameof(revitTank.OverFlow)); |
| | | tank.Position2d = new Yw.Model.Hydro.Position2d(revitTank.Position.X, revitTank.Position.Y); |
| | | propStatusHelper.UpdatePropStatusInfo(revitTank.Id, nameof(tank.Position2d), revitTank, nameof(revitTank.Position)); |
| | | tank.Position3d = new Yw.Model.Hydro.Position3d(revitTank.Position.X, revitTank.Position.Y, revitTank.Position.Z); |
| | | propStatusHelper.UpdatePropStatusInfo(revitTank.Id, nameof(tank.Position3d), revitTank, nameof(revitTank.Position)); |
| | | |
| | | if (allScenePropValueList == null) |
| | | { |
| | | allScenePropValueList = new List<HydroParterScenePropValueInfo>(); |
| | | } |
| | | |
| | | var scenePropValueList = revitTank.PropValueList?.Select(x => new Yw.Model.HydroParterScenePropValueInfo() |
| | | { |
| | | Parter = revitTank.Id, |
| | | Scene = HStation.Revit.ConstParas.Scene, |
| | | PropName = x.PropName, |
| | | PropValue = x.PropValue |
| | | }).ToList(); |
| | | if (scenePropValueList != null && scenePropValueList.Count > 0) |
| | | { |
| | | allScenePropValueList.AddRange(scenePropValueList); |
| | | } |
| | | |
| | | return tank; |
| | | } |
| | | |
| | | //水箱 |
| | | private static Yw.Model.HydroWaterboxInfo FromRevit |
| | | ( |
| | | HStation.Model.RevitWaterbox revitWaterbox, |
| | | PropStatusHelper propStatusHelper, |
| | | ref List<Yw.Model.HydroParterScenePropValueInfo> allScenePropValueList |
| | | ) |
| | | { |
| | | if (revitWaterbox == null) |
| | | { |
| | | return default; |
| | | } |
| | | var waterbox = new Yw.Model.HydroWaterboxInfo(); |
| | | waterbox.Catalog = Yw.Hydro.ParterCatalog.Waterbox; |
| | | waterbox.Name = revitWaterbox.Name; |
| | | propStatusHelper.UpdatePropStatusInfo(revitWaterbox.Id, nameof(waterbox.Name), revitWaterbox, nameof(revitWaterbox.Name)); |
| | | waterbox.Code = revitWaterbox.Id; |
| | | propStatusHelper.UpdatePropStatusInfo(revitWaterbox.Id, nameof(waterbox.Code), revitWaterbox, nameof(revitWaterbox.Id)); |
| | | waterbox.ModelType = revitWaterbox.ModelType; |
| | | propStatusHelper.UpdatePropStatusInfo(revitWaterbox.Id, nameof(waterbox.ModelType), revitWaterbox, nameof(revitWaterbox.ModelType)); |
| | | waterbox.Flags = revitWaterbox.Flags; |
| | | if (waterbox.Flags == null) |
| | | { |
| | | waterbox.Flags = new List<string>(); |
| | | } |
| | | propStatusHelper.UpdatePropStatusInfo(revitWaterbox.Id, nameof(waterbox.Flags), revitWaterbox, nameof(revitWaterbox.Flags)); |
| | | waterbox.Description = revitWaterbox.Description; |
| | | propStatusHelper.UpdatePropStatusInfo(revitWaterbox.Id, nameof(waterbox.Description), revitWaterbox, nameof(revitWaterbox.Description)); |
| | | waterbox.PoolElev = revitWaterbox.PoolElev; |
| | | propStatusHelper.UpdatePropStatusInfo(revitWaterbox.Id, nameof(waterbox.PoolElev), revitWaterbox, nameof(revitWaterbox.PoolElev)); |
| | | waterbox.InitLevel = revitWaterbox.InitLevel; |
| | | propStatusHelper.UpdatePropStatusInfo(revitWaterbox.Id, nameof(waterbox.InitLevel), revitWaterbox, nameof(revitWaterbox.InitLevel)); |
| | | waterbox.MinLevel = revitWaterbox.MinLevel; |
| | | propStatusHelper.UpdatePropStatusInfo(revitWaterbox.Id, nameof(waterbox.MinLevel), revitWaterbox, nameof(revitWaterbox.MinLevel)); |
| | | waterbox.MaxLevel = revitWaterbox.MaxLevel; |
| | | propStatusHelper.UpdatePropStatusInfo(revitWaterbox.Id, nameof(waterbox.MaxLevel), revitWaterbox, nameof(revitWaterbox.MaxLevel)); |
| | | waterbox.DN = revitWaterbox.DN; |
| | | propStatusHelper.UpdatePropStatusInfo(revitWaterbox.Id, nameof(waterbox.DN), revitWaterbox, nameof(revitWaterbox.DN)); |
| | | waterbox.MinVol = revitWaterbox.MinVol; |
| | | propStatusHelper.UpdatePropStatusInfo(revitWaterbox.Id, nameof(waterbox.MinVol), revitWaterbox, nameof(revitWaterbox.MinVol)); |
| | | waterbox.VolCurve = revitWaterbox.VolCurve; |
| | | propStatusHelper.UpdatePropStatusInfo(revitWaterbox.Id, nameof(waterbox.VolCurve), revitWaterbox, nameof(revitWaterbox.VolCurve)); |
| | | waterbox.OverFlow = revitWaterbox.OverFlow; |
| | | propStatusHelper.UpdatePropStatusInfo(revitWaterbox.Id, nameof(waterbox.OverFlow), revitWaterbox, nameof(revitWaterbox.OverFlow)); |
| | | waterbox.Position2d = new Yw.Model.Hydro.Position2d(revitWaterbox.Position.X, revitWaterbox.Position.Y); |
| | | propStatusHelper.UpdatePropStatusInfo(revitWaterbox.Id, nameof(waterbox.Position2d), revitWaterbox, nameof(revitWaterbox.Position)); |
| | | waterbox.Position3d = new Yw.Model.Hydro.Position3d(revitWaterbox.Position.X, revitWaterbox.Position.Y, revitWaterbox.Position.Z); |
| | | propStatusHelper.UpdatePropStatusInfo(revitWaterbox.Id, nameof(waterbox.Position3d), revitWaterbox, nameof(revitWaterbox.Position)); |
| | | |
| | | if (allScenePropValueList == null) |
| | | { |
| | | allScenePropValueList = new List<HydroParterScenePropValueInfo>(); |
| | | } |
| | | |
| | | var scenePropValueList = revitWaterbox.PropValueList?.Select(x => new Yw.Model.HydroParterScenePropValueInfo() |
| | | { |
| | | Parter = revitWaterbox.Id, |
| | | Scene = HStation.Revit.ConstParas.Scene, |
| | | PropName = x.PropName, |
| | | PropValue = x.PropValue |
| | | }).ToList(); |
| | | if (scenePropValueList != null && scenePropValueList.Count > 0) |
| | | { |
| | | allScenePropValueList.AddRange(scenePropValueList); |
| | | } |
| | | |
| | | return waterbox; |
| | | } |
| | | |
| | | //连接节点 |
| | | private static Yw.Model.HydroJunctionInfo FromRevit |
| | | ( |
| | | HStation.Model.RevitJunction revitJunction, |
| | | PropStatusHelper propStatusHelper, |
| | | ref List<Yw.Model.HydroParterScenePropValueInfo> allScenePropValueList |
| | | ) |
| | | { |
| | | if (revitJunction == null) |
| | | { |
| | | return default; |
| | | } |
| | | var junction = new Yw.Model.HydroJunctionInfo(); |
| | | junction.Catalog = Yw.Hydro.ParterCatalog.Junction; |
| | | junction.Name = revitJunction.Name; |
| | | propStatusHelper.UpdatePropStatusInfo(revitJunction.Id, nameof(junction.Name), revitJunction, nameof(revitJunction.Name)); |
| | | junction.Code = revitJunction.Id; |
| | | propStatusHelper.UpdatePropStatusInfo(revitJunction.Id, nameof(junction.Code), revitJunction, nameof(revitJunction.Id)); |
| | | junction.ModelType = revitJunction.ModelType; |
| | | propStatusHelper.UpdatePropStatusInfo(revitJunction.Id, nameof(junction.ModelType), revitJunction, nameof(revitJunction.ModelType)); |
| | | junction.Flags = revitJunction.Flags; |
| | | if (junction.Flags == null) |
| | | { |
| | | junction.Flags = new List<string>(); |
| | | } |
| | | propStatusHelper.UpdatePropStatusInfo(revitJunction.Id, nameof(junction.Flags), revitJunction, nameof(revitJunction.Flags)); |
| | | junction.Description = revitJunction.Description; |
| | | propStatusHelper.UpdatePropStatusInfo(revitJunction.Id, nameof(junction.Description), revitJunction, nameof(revitJunction.Description)); |
| | | junction.Elev = revitJunction.Elev; |
| | | propStatusHelper.UpdatePropStatusInfo(revitJunction.Id, nameof(junction.Elev), revitJunction, nameof(revitJunction.Elev)); |
| | | junction.MinorLoss = revitJunction.MinorLoss; |
| | | propStatusHelper.UpdatePropStatusInfo(revitJunction.Id, nameof(junction.MinorLoss), revitJunction, nameof(revitJunction.MinorLoss)); |
| | | junction.Position2d = new Yw.Model.Hydro.Position2d(revitJunction.Position.X, revitJunction.Position.Y); |
| | | propStatusHelper.UpdatePropStatusInfo(revitJunction.Id, nameof(junction.Position2d), revitJunction, nameof(revitJunction.Position)); |
| | | junction.Position3d = new Yw.Model.Hydro.Position3d(revitJunction.Position.X, revitJunction.Position.Y, revitJunction.Position.Z); |
| | | propStatusHelper.UpdatePropStatusInfo(revitJunction.Id, nameof(junction.Position3d), revitJunction, nameof(revitJunction.Position)); |
| | | |
| | | if (allScenePropValueList == null) |
| | | { |
| | | allScenePropValueList = new List<HydroParterScenePropValueInfo>(); |
| | | } |
| | | |
| | | var scenePropValueList = revitJunction.PropValueList?.Select(x => new Yw.Model.HydroParterScenePropValueInfo() |
| | | { |
| | | Parter = revitJunction.Id, |
| | | Scene = HStation.Revit.ConstParas.Scene, |
| | | PropName = x.PropName, |
| | | PropValue = x.PropValue |
| | | }).ToList(); |
| | | if (scenePropValueList != null && scenePropValueList.Count > 0) |
| | | { |
| | | allScenePropValueList.AddRange(scenePropValueList); |
| | | } |
| | | return junction; |
| | | } |
| | | |
| | | //闷头 |
| | | private static Yw.Model.HydroBluntheadInfo FromRevit |
| | | ( |
| | | HStation.Model.RevitBlunthead revitBlunthead, |
| | | PropStatusHelper propStatusHelper, |
| | | ref List<Yw.Model.HydroParterScenePropValueInfo> allScenePropValueList |
| | | ) |
| | | { |
| | | if (revitBlunthead == null) |
| | | { |
| | | return default; |
| | | } |
| | | var blunthead = new Yw.Model.HydroBluntheadInfo(); |
| | | blunthead.Catalog = Yw.Hydro.ParterCatalog.Blunthead; |
| | | blunthead.Name = revitBlunthead.Name; |
| | | propStatusHelper.UpdatePropStatusInfo(revitBlunthead.Id, nameof(blunthead.Name), revitBlunthead, nameof(revitBlunthead.Name)); |
| | | blunthead.Code = revitBlunthead.Id; |
| | | propStatusHelper.UpdatePropStatusInfo(revitBlunthead.Id, nameof(blunthead.Code), revitBlunthead, nameof(revitBlunthead.Id)); |
| | | blunthead.ModelType = revitBlunthead.ModelType; |
| | | propStatusHelper.UpdatePropStatusInfo(revitBlunthead.Id, nameof(blunthead.ModelType), revitBlunthead, nameof(revitBlunthead.ModelType)); |
| | | blunthead.Flags = revitBlunthead.Flags; |
| | | if (blunthead.Flags == null) |
| | | { |
| | | blunthead.Flags = new List<string>(); |
| | | } |
| | | propStatusHelper.UpdatePropStatusInfo(revitBlunthead.Id, nameof(blunthead.Flags), revitBlunthead, nameof(revitBlunthead.Flags)); |
| | | blunthead.Description = revitBlunthead.Description; |
| | | propStatusHelper.UpdatePropStatusInfo(revitBlunthead.Id, nameof(blunthead.Description), revitBlunthead, nameof(revitBlunthead.Description)); |
| | | blunthead.Elev = revitBlunthead.Elev; |
| | | propStatusHelper.UpdatePropStatusInfo(revitBlunthead.Id, nameof(blunthead.Elev), revitBlunthead, nameof(revitBlunthead.Elev)); |
| | | blunthead.MinorLoss = revitBlunthead.MinorLoss; |
| | | propStatusHelper.UpdatePropStatusInfo(revitBlunthead.Id, nameof(blunthead.MinorLoss), revitBlunthead, nameof(revitBlunthead.MinorLoss)); |
| | | blunthead.Position2d = new Yw.Model.Hydro.Position2d(revitBlunthead.Position.X, revitBlunthead.Position.Y); |
| | | propStatusHelper.UpdatePropStatusInfo(revitBlunthead.Id, nameof(blunthead.Position2d), revitBlunthead, nameof(revitBlunthead.Position)); |
| | | blunthead.Position3d = new Yw.Model.Hydro.Position3d(revitBlunthead.Position.X, revitBlunthead.Position.Y, revitBlunthead.Position.Z); |
| | | propStatusHelper.UpdatePropStatusInfo(revitBlunthead.Id, nameof(blunthead.Position3d), revitBlunthead, nameof(revitBlunthead.Position)); |
| | | blunthead.Material = revitBlunthead.Material; |
| | | propStatusHelper.UpdatePropStatusInfo(revitBlunthead.Id, nameof(blunthead.Material), revitBlunthead, nameof(revitBlunthead.Material)); |
| | | blunthead.Caliber = revitBlunthead.Caliber; |
| | | propStatusHelper.UpdatePropStatusInfo(revitBlunthead.Id, nameof(blunthead.Caliber), revitBlunthead, nameof(revitBlunthead.Caliber)); |
| | | |
| | | if (allScenePropValueList == null) |
| | | { |
| | | allScenePropValueList = new List<HydroParterScenePropValueInfo>(); |
| | | } |
| | | |
| | | var scenePropValueList = revitBlunthead.PropValueList?.Select(x => new Yw.Model.HydroParterScenePropValueInfo() |
| | | { |
| | | Parter = revitBlunthead.Id, |
| | | Scene = HStation.Revit.ConstParas.Scene, |
| | | PropName = x.PropName, |
| | | PropValue = x.PropValue |
| | | }).ToList(); |
| | | if (scenePropValueList != null && scenePropValueList.Count > 0) |
| | | { |
| | | allScenePropValueList.AddRange(scenePropValueList); |
| | | } |
| | | return blunthead; |
| | | } |
| | | |
| | | //弯头 |
| | | private static Yw.Model.HydroElbowInfo FromRevit |
| | | ( |
| | | HStation.Model.RevitElbow revitElbow, |
| | | PropStatusHelper propStatusHelper, |
| | | ref List<Yw.Model.HydroParterScenePropValueInfo> allScenePropValueList |
| | | ) |
| | | { |
| | | if (revitElbow == null) |
| | | { |
| | | return default; |
| | | } |
| | | var elbow = new Yw.Model.HydroElbowInfo(); |
| | | elbow.Catalog = Yw.Hydro.ParterCatalog.Elbow; |
| | | elbow.Name = revitElbow.Name; |
| | | propStatusHelper.UpdatePropStatusInfo(revitElbow.Id, nameof(elbow.Name), revitElbow, nameof(revitElbow.Name)); |
| | | elbow.Code = revitElbow.Id; |
| | | propStatusHelper.UpdatePropStatusInfo(revitElbow.Id, nameof(elbow.Code), revitElbow, nameof(revitElbow.Id)); |
| | | elbow.ModelType = revitElbow.ModelType; |
| | | propStatusHelper.UpdatePropStatusInfo(revitElbow.Id, nameof(elbow.ModelType), revitElbow, nameof(revitElbow.ModelType)); |
| | | elbow.Flags = revitElbow.Flags; |
| | | if (elbow.Flags == null) |
| | | { |
| | | elbow.Flags = new List<string>(); |
| | | } |
| | | propStatusHelper.UpdatePropStatusInfo(revitElbow.Id, nameof(elbow.Flags), revitElbow, nameof(revitElbow.Flags)); |
| | | elbow.Description = revitElbow.Description; |
| | | propStatusHelper.UpdatePropStatusInfo(revitElbow.Id, nameof(elbow.Description), revitElbow, nameof(revitElbow.Description)); |
| | | elbow.Elev = revitElbow.Elev; |
| | | propStatusHelper.UpdatePropStatusInfo(revitElbow.Id, nameof(elbow.Elev), revitElbow, nameof(revitElbow.Elev)); |
| | | elbow.MinorLoss = revitElbow.MinorLoss; |
| | | propStatusHelper.UpdatePropStatusInfo(revitElbow.Id, nameof(elbow.MinorLoss), revitElbow, nameof(revitElbow.MinorLoss)); |
| | | elbow.Position2d = new Yw.Model.Hydro.Position2d(revitElbow.Position.X, revitElbow.Position.Y); |
| | | propStatusHelper.UpdatePropStatusInfo(revitElbow.Id, nameof(elbow.Position2d), revitElbow, nameof(revitElbow.Position)); |
| | | elbow.Position3d = new Yw.Model.Hydro.Position3d(revitElbow.Position.X, revitElbow.Position.Y, revitElbow.Position.Z); |
| | | propStatusHelper.UpdatePropStatusInfo(revitElbow.Id, nameof(elbow.Position3d), revitElbow, nameof(revitElbow.Position)); |
| | | elbow.Material = revitElbow.Material; |
| | | propStatusHelper.UpdatePropStatusInfo(revitElbow.Id, nameof(elbow.Material), revitElbow, nameof(revitElbow.Material)); |
| | | elbow.Caliber = revitElbow.Caliber; |
| | | propStatusHelper.UpdatePropStatusInfo(revitElbow.Id, nameof(elbow.Caliber), revitElbow, nameof(revitElbow.Caliber)); |
| | | elbow.BendingAngle = revitElbow.BendingAngle; |
| | | propStatusHelper.UpdatePropStatusInfo(revitElbow.Id, nameof(elbow.BendingAngle), revitElbow, nameof(revitElbow.BendingAngle)); |
| | | elbow.ElbowType = revitElbow.ElbowType; |
| | | propStatusHelper.UpdatePropStatusInfo(revitElbow.Id, nameof(elbow.ElbowType), revitElbow, nameof(revitElbow.ElbowType)); |
| | | |
| | | if (allScenePropValueList == null) |
| | | { |
| | | allScenePropValueList = new List<HydroParterScenePropValueInfo>(); |
| | | } |
| | | |
| | | var scenePropValueList = revitElbow.PropValueList?.Select(x => new Yw.Model.HydroParterScenePropValueInfo() |
| | | { |
| | | Parter = revitElbow.Id, |
| | | Scene = HStation.Revit.ConstParas.Scene, |
| | | PropName = x.PropName, |
| | | PropValue = x.PropValue |
| | | }).ToList(); |
| | | if (scenePropValueList != null && scenePropValueList.Count > 0) |
| | | { |
| | | allScenePropValueList.AddRange(scenePropValueList); |
| | | } |
| | | return elbow; |
| | | } |
| | | |
| | | //三通 |
| | | private static Yw.Model.HydroThreelinkInfo FromRevit |
| | | ( |
| | | HStation.Model.RevitThreelink revitThreelink, |
| | | PropStatusHelper propStatusHelper, |
| | | ref List<Yw.Model.HydroParterScenePropValueInfo> allScenePropValueList |
| | | ) |
| | | { |
| | | if (revitThreelink == null) |
| | | { |
| | | return default; |
| | | } |
| | | var threelink = new Yw.Model.HydroThreelinkInfo(); |
| | | threelink.Catalog = Yw.Hydro.ParterCatalog.Threelink; |
| | | threelink.Name = revitThreelink.Name; |
| | | propStatusHelper.UpdatePropStatusInfo(revitThreelink.Id, nameof(threelink.Name), revitThreelink, nameof(revitThreelink.Name)); |
| | | threelink.Code = revitThreelink.Id; |
| | | propStatusHelper.UpdatePropStatusInfo(revitThreelink.Id, nameof(threelink.Code), revitThreelink, nameof(revitThreelink.Id)); |
| | | threelink.ModelType = revitThreelink.ModelType; |
| | | propStatusHelper.UpdatePropStatusInfo(revitThreelink.Id, nameof(threelink.ModelType), revitThreelink, nameof(revitThreelink.ModelType)); |
| | | threelink.Flags = revitThreelink.Flags; |
| | | if (threelink.Flags == null) |
| | | { |
| | | threelink.Flags = new List<string>(); |
| | | } |
| | | propStatusHelper.UpdatePropStatusInfo(revitThreelink.Id, nameof(threelink.Flags), revitThreelink, nameof(revitThreelink.Flags)); |
| | | threelink.Description = revitThreelink.Description; |
| | | propStatusHelper.UpdatePropStatusInfo(revitThreelink.Id, nameof(threelink.Description), revitThreelink, nameof(revitThreelink.Description)); |
| | | threelink.Elev = revitThreelink.Elev; |
| | | propStatusHelper.UpdatePropStatusInfo(revitThreelink.Id, nameof(threelink.Elev), revitThreelink, nameof(revitThreelink.Elev)); |
| | | threelink.MinorLoss = revitThreelink.MinorLoss; |
| | | propStatusHelper.UpdatePropStatusInfo(revitThreelink.Id, nameof(threelink.MinorLoss), revitThreelink, nameof(revitThreelink.MinorLoss)); |
| | | threelink.Position2d = new Yw.Model.Hydro.Position2d(revitThreelink.Position.X, revitThreelink.Position.Y); |
| | | propStatusHelper.UpdatePropStatusInfo(revitThreelink.Id, nameof(threelink.Position2d), revitThreelink, nameof(revitThreelink.Position)); |
| | | threelink.Position3d = new Yw.Model.Hydro.Position3d(revitThreelink.Position.X, revitThreelink.Position.Y, revitThreelink.Position.Z); |
| | | propStatusHelper.UpdatePropStatusInfo(revitThreelink.Id, nameof(threelink.Position3d), revitThreelink, nameof(revitThreelink.Position)); |
| | | threelink.Material = revitThreelink.Material; |
| | | propStatusHelper.UpdatePropStatusInfo(revitThreelink.Id, nameof(threelink.Material), revitThreelink, nameof(revitThreelink.Material)); |
| | | threelink.Caliber = revitThreelink.Caliber; |
| | | propStatusHelper.UpdatePropStatusInfo(revitThreelink.Id, nameof(threelink.Caliber), revitThreelink, nameof(revitThreelink.Caliber)); |
| | | threelink.RunningThroughLoss = revitThreelink.RunningThroughLoss; |
| | | propStatusHelper.UpdatePropStatusInfo(revitThreelink.Id, nameof(threelink.RunningThroughLoss), revitThreelink, nameof(revitThreelink.RunningThroughLoss)); |
| | | threelink.BranchThroughLoss = revitThreelink.BranchThroughLoss; |
| | | propStatusHelper.UpdatePropStatusInfo(revitThreelink.Id, nameof(threelink.BranchThroughLoss), revitThreelink, nameof(revitThreelink.BranchThroughLoss)); |
| | | |
| | | if (allScenePropValueList == null) |
| | | { |
| | | allScenePropValueList = new List<HydroParterScenePropValueInfo>(); |
| | | } |
| | | |
| | | var scenePropValueList = revitThreelink.PropValueList?.Select(x => new Yw.Model.HydroParterScenePropValueInfo() |
| | | { |
| | | Parter = revitThreelink.Id, |
| | | Scene = HStation.Revit.ConstParas.Scene, |
| | | PropName = x.PropName, |
| | | PropValue = x.PropValue |
| | | }).ToList(); |
| | | if (scenePropValueList != null && scenePropValueList.Count > 0) |
| | | { |
| | | allScenePropValueList.AddRange(scenePropValueList); |
| | | } |
| | | return threelink; |
| | | } |
| | | |
| | | //四通 |
| | | private static Yw.Model.HydroFourlinkInfo FromRevit |
| | | ( |
| | | HStation.Model.RevitFourlink revitFourlink, |
| | | PropStatusHelper propStatusHelper, |
| | | ref List<Yw.Model.HydroParterScenePropValueInfo> allScenePropValueList |
| | | ) |
| | | { |
| | | if (revitFourlink == null) |
| | | { |
| | | return default; |
| | | } |
| | | var fourlink = new Yw.Model.HydroFourlinkInfo(); |
| | | fourlink.Catalog = Yw.Hydro.ParterCatalog.Fourlink; |
| | | fourlink.Name = revitFourlink.Name; |
| | | propStatusHelper.UpdatePropStatusInfo(revitFourlink.Id, nameof(fourlink.Name), revitFourlink, nameof(revitFourlink.Name)); |
| | | fourlink.Code = revitFourlink.Id; |
| | | propStatusHelper.UpdatePropStatusInfo(revitFourlink.Id, nameof(fourlink.Code), revitFourlink, nameof(revitFourlink.Id)); |
| | | fourlink.ModelType = revitFourlink.ModelType; |
| | | propStatusHelper.UpdatePropStatusInfo(revitFourlink.Id, nameof(fourlink.ModelType), revitFourlink, nameof(revitFourlink.ModelType)); |
| | | fourlink.Flags = revitFourlink.Flags; |
| | | if (fourlink.Flags == null) |
| | | { |
| | | fourlink.Flags = new List<string>(); |
| | | } |
| | | propStatusHelper.UpdatePropStatusInfo(revitFourlink.Id, nameof(fourlink.Flags), revitFourlink, nameof(revitFourlink.Flags)); |
| | | fourlink.Description = revitFourlink.Description; |
| | | propStatusHelper.UpdatePropStatusInfo(revitFourlink.Id, nameof(fourlink.Description), revitFourlink, nameof(revitFourlink.Description)); |
| | | fourlink.Elev = revitFourlink.Elev; |
| | | propStatusHelper.UpdatePropStatusInfo(revitFourlink.Id, nameof(fourlink.Elev), revitFourlink, nameof(revitFourlink.Elev)); |
| | | fourlink.MinorLoss = revitFourlink.MinorLoss; |
| | | propStatusHelper.UpdatePropStatusInfo(revitFourlink.Id, nameof(fourlink.MinorLoss), revitFourlink, nameof(revitFourlink.MinorLoss)); |
| | | fourlink.Position2d = new Yw.Model.Hydro.Position2d(revitFourlink.Position.X, revitFourlink.Position.Y); |
| | | propStatusHelper.UpdatePropStatusInfo(revitFourlink.Id, nameof(fourlink.Position2d), revitFourlink, nameof(revitFourlink.Position)); |
| | | fourlink.Position3d = new Yw.Model.Hydro.Position3d(revitFourlink.Position.X, revitFourlink.Position.Y, revitFourlink.Position.Z); |
| | | propStatusHelper.UpdatePropStatusInfo(revitFourlink.Id, nameof(fourlink.Position3d), revitFourlink, nameof(revitFourlink.Position)); |
| | | fourlink.Material = revitFourlink.Material; |
| | | propStatusHelper.UpdatePropStatusInfo(revitFourlink.Id, nameof(fourlink.Material), revitFourlink, nameof(revitFourlink.Material)); |
| | | fourlink.Caliber = revitFourlink.Caliber; |
| | | propStatusHelper.UpdatePropStatusInfo(revitFourlink.Id, nameof(fourlink.Caliber), revitFourlink, nameof(revitFourlink.Caliber)); |
| | | |
| | | if (allScenePropValueList == null) |
| | | { |
| | | allScenePropValueList = new List<HydroParterScenePropValueInfo>(); |
| | | } |
| | | |
| | | var scenePropValueList = revitFourlink.PropValueList?.Select(x => new Yw.Model.HydroParterScenePropValueInfo() |
| | | { |
| | | Parter = revitFourlink.Id, |
| | | Scene = HStation.Revit.ConstParas.Scene, |
| | | PropName = x.PropName, |
| | | PropValue = x.PropValue |
| | | }).ToList(); |
| | | if (scenePropValueList != null && scenePropValueList.Count > 0) |
| | | { |
| | | allScenePropValueList.AddRange(scenePropValueList); |
| | | } |
| | | return fourlink; |
| | | } |
| | | |
| | | //喷嘴 |
| | | private static Yw.Model.HydroNozzleInfo FromRevit |
| | | ( |
| | | HStation.Model.RevitNozzle revitNozzle, |
| | | PropStatusHelper propStatusHelper, |
| | | ref List<Yw.Model.HydroParterScenePropValueInfo> allScenePropValueList |
| | | ) |
| | | { |
| | | if (revitNozzle == null) |
| | | { |
| | | return default; |
| | | } |
| | | var nozzle = new Yw.Model.HydroNozzleInfo(); |
| | | nozzle.Catalog = Yw.Hydro.ParterCatalog.Nozzle; |
| | | nozzle.Name = revitNozzle.Name; |
| | | propStatusHelper.UpdatePropStatusInfo(revitNozzle.Id, nameof(nozzle.Name), revitNozzle, nameof(revitNozzle.Name)); |
| | | nozzle.Code = revitNozzle.Id; |
| | | propStatusHelper.UpdatePropStatusInfo(revitNozzle.Id, nameof(nozzle.Code), revitNozzle, nameof(revitNozzle.Id)); |
| | | nozzle.ModelType = revitNozzle.ModelType; |
| | | propStatusHelper.UpdatePropStatusInfo(revitNozzle.Id, nameof(nozzle.ModelType), revitNozzle, nameof(revitNozzle.ModelType)); |
| | | nozzle.Flags = revitNozzle.Flags; |
| | | if (nozzle.Flags == null) |
| | | { |
| | | nozzle.Flags = new List<string>(); |
| | | } |
| | | propStatusHelper.UpdatePropStatusInfo(revitNozzle.Id, nameof(nozzle.Flags), revitNozzle, nameof(revitNozzle.Flags)); |
| | | nozzle.Description = revitNozzle.Description; |
| | | propStatusHelper.UpdatePropStatusInfo(revitNozzle.Id, nameof(nozzle.Description), revitNozzle, nameof(revitNozzle.Description)); |
| | | nozzle.Elev = revitNozzle.Elev; |
| | | propStatusHelper.UpdatePropStatusInfo(revitNozzle.Id, nameof(nozzle.Elev), revitNozzle, nameof(revitNozzle.Elev)); |
| | | nozzle.MinorLoss = revitNozzle.MinorLoss; |
| | | propStatusHelper.UpdatePropStatusInfo(revitNozzle.Id, nameof(nozzle.MinorLoss), revitNozzle, nameof(revitNozzle.MinorLoss)); |
| | | nozzle.Position2d = new Yw.Model.Hydro.Position2d(revitNozzle.Position.X, revitNozzle.Position.Y); |
| | | propStatusHelper.UpdatePropStatusInfo(revitNozzle.Id, nameof(nozzle.Position2d), revitNozzle, nameof(revitNozzle.Position)); |
| | | nozzle.Position3d = new Yw.Model.Hydro.Position3d(revitNozzle.Position.X, revitNozzle.Position.Y, revitNozzle.Position.Z); |
| | | propStatusHelper.UpdatePropStatusInfo(revitNozzle.Id, nameof(nozzle.Position3d), revitNozzle, nameof(revitNozzle.Position)); |
| | | nozzle.Material = revitNozzle.Material; |
| | | propStatusHelper.UpdatePropStatusInfo(revitNozzle.Id, nameof(nozzle.Material), revitNozzle, nameof(revitNozzle.Material)); |
| | | nozzle.Caliber = revitNozzle.Caliber; |
| | | propStatusHelper.UpdatePropStatusInfo(revitNozzle.Id, nameof(nozzle.Caliber), revitNozzle, nameof(revitNozzle.Caliber)); |
| | | nozzle.Coefficient = revitNozzle.Coefficient; |
| | | propStatusHelper.UpdatePropStatusInfo(revitNozzle.Id, nameof(nozzle.Coefficient), revitNozzle, nameof(revitNozzle.Coefficient)); |
| | | |
| | | if (allScenePropValueList == null) |
| | | { |
| | | allScenePropValueList = new List<HydroParterScenePropValueInfo>(); |
| | | } |
| | | |
| | | var scenePropValueList = revitNozzle.PropValueList?.Select(x => new Yw.Model.HydroParterScenePropValueInfo() |
| | | { |
| | | Parter = revitNozzle.Id, |
| | | Scene = HStation.Revit.ConstParas.Scene, |
| | | PropName = x.PropName, |
| | | PropValue = x.PropValue |
| | | }).ToList(); |
| | | if (scenePropValueList != null && scenePropValueList.Count > 0) |
| | | { |
| | | allScenePropValueList.AddRange(scenePropValueList); |
| | | } |
| | | return nozzle; |
| | | } |
| | | |
| | | //消火栓 |
| | | private static Yw.Model.HydroHydrantInfo FromRevit |
| | | ( |
| | | HStation.Model.RevitHydrant revitHydrant, |
| | | PropStatusHelper propStatusHelper, |
| | | ref List<Yw.Model.HydroParterScenePropValueInfo> allScenePropValueList |
| | | ) |
| | | { |
| | | if (revitHydrant == null) |
| | | { |
| | | return default; |
| | | } |
| | | var hydrant = new Yw.Model.HydroHydrantInfo(); |
| | | hydrant.Catalog = Yw.Hydro.ParterCatalog.Hydrant; |
| | | hydrant.Name = revitHydrant.Name; |
| | | propStatusHelper.UpdatePropStatusInfo(revitHydrant.Id, nameof(hydrant.Name), revitHydrant, nameof(revitHydrant.Name)); |
| | | hydrant.Code = revitHydrant.Id; |
| | | propStatusHelper.UpdatePropStatusInfo(revitHydrant.Id, nameof(hydrant.Code), revitHydrant, nameof(revitHydrant.Id)); |
| | | hydrant.ModelType = revitHydrant.ModelType; |
| | | propStatusHelper.UpdatePropStatusInfo(revitHydrant.Id, nameof(hydrant.ModelType), revitHydrant, nameof(revitHydrant.ModelType)); |
| | | hydrant.Flags = revitHydrant.Flags; |
| | | if (hydrant.Flags == null) |
| | | { |
| | | hydrant.Flags = new List<string>(); |
| | | } |
| | | propStatusHelper.UpdatePropStatusInfo(revitHydrant.Id, nameof(hydrant.Flags), revitHydrant, nameof(revitHydrant.Flags)); |
| | | hydrant.Description = revitHydrant.Description; |
| | | propStatusHelper.UpdatePropStatusInfo(revitHydrant.Id, nameof(hydrant.Description), revitHydrant, nameof(revitHydrant.Description)); |
| | | hydrant.Elev = revitHydrant.Elev; |
| | | propStatusHelper.UpdatePropStatusInfo(revitHydrant.Id, nameof(hydrant.Elev), revitHydrant, nameof(revitHydrant.Elev)); |
| | | hydrant.MinorLoss = revitHydrant.MinorLoss; |
| | | propStatusHelper.UpdatePropStatusInfo(revitHydrant.Id, nameof(hydrant.MinorLoss), revitHydrant, nameof(revitHydrant.MinorLoss)); |
| | | hydrant.Position2d = new Yw.Model.Hydro.Position2d(revitHydrant.Position.X, revitHydrant.Position.Y); |
| | | propStatusHelper.UpdatePropStatusInfo(revitHydrant.Id, nameof(hydrant.Position2d), revitHydrant, nameof(revitHydrant.Position)); |
| | | hydrant.Position3d = new Yw.Model.Hydro.Position3d(revitHydrant.Position.X, revitHydrant.Position.Y, revitHydrant.Position.Z); |
| | | propStatusHelper.UpdatePropStatusInfo(revitHydrant.Id, nameof(hydrant.Position3d), revitHydrant, nameof(revitHydrant.Position)); |
| | | hydrant.Material = revitHydrant.Material; |
| | | propStatusHelper.UpdatePropStatusInfo(revitHydrant.Id, nameof(hydrant.Material), revitHydrant, nameof(revitHydrant.Material)); |
| | | hydrant.Caliber = revitHydrant.Caliber; |
| | | propStatusHelper.UpdatePropStatusInfo(revitHydrant.Id, nameof(hydrant.Caliber), revitHydrant, nameof(revitHydrant.Caliber)); |
| | | hydrant.Coefficient = revitHydrant.Coefficient; |
| | | propStatusHelper.UpdatePropStatusInfo(revitHydrant.Id, nameof(hydrant.Coefficient), revitHydrant, nameof(revitHydrant.Coefficient)); |
| | | |
| | | if (allScenePropValueList == null) |
| | | { |
| | | allScenePropValueList = new List<HydroParterScenePropValueInfo>(); |
| | | } |
| | | |
| | | var scenePropValueList = revitHydrant.PropValueList?.Select(x => new Yw.Model.HydroParterScenePropValueInfo() |
| | | { |
| | | Parter = revitHydrant.Id, |
| | | Scene = HStation.Revit.ConstParas.Scene, |
| | | PropName = x.PropName, |
| | | PropValue = x.PropValue |
| | | }).ToList(); |
| | | if (scenePropValueList != null && scenePropValueList.Count > 0) |
| | | { |
| | | allScenePropValueList.AddRange(scenePropValueList); |
| | | } |
| | | return hydrant; |
| | | } |
| | | |
| | | //冷却塔 |
| | | private static Yw.Model.HydroCoolingInfo FromRevit |
| | | ( |
| | | HStation.Model.RevitCooling revitCooling, |
| | | PropStatusHelper propStatusHelper, |
| | | ref List<Yw.Model.HydroParterScenePropValueInfo> allScenePropValueList |
| | | ) |
| | | { |
| | | if (revitCooling == null) |
| | | { |
| | | return default; |
| | | } |
| | | var cooling = new Yw.Model.HydroCoolingInfo(); |
| | | cooling.Catalog = Yw.Hydro.ParterCatalog.Cooling; |
| | | cooling.Name = revitCooling.Name; |
| | | propStatusHelper.UpdatePropStatusInfo(revitCooling.Id, nameof(cooling.Name), revitCooling, nameof(revitCooling.Name)); |
| | | cooling.Code = revitCooling.Id; |
| | | propStatusHelper.UpdatePropStatusInfo(revitCooling.Id, nameof(cooling.Code), revitCooling, nameof(revitCooling.Id)); |
| | | cooling.ModelType = revitCooling.ModelType; |
| | | propStatusHelper.UpdatePropStatusInfo(revitCooling.Id, nameof(cooling.ModelType), revitCooling, nameof(revitCooling.ModelType)); |
| | | cooling.Flags = revitCooling.Flags; |
| | | if (cooling.Flags == null) |
| | | { |
| | | cooling.Flags = new List<string>(); |
| | | } |
| | | propStatusHelper.UpdatePropStatusInfo(revitCooling.Id, nameof(cooling.Flags), revitCooling, nameof(revitCooling.Flags)); |
| | | cooling.Description = revitCooling.Description; |
| | | propStatusHelper.UpdatePropStatusInfo(revitCooling.Id, nameof(cooling.Description), revitCooling, nameof(revitCooling.Description)); |
| | | cooling.Elev = revitCooling.Elev; |
| | | propStatusHelper.UpdatePropStatusInfo(revitCooling.Id, nameof(cooling.Elev), revitCooling, nameof(revitCooling.Elev)); |
| | | cooling.MinorLoss = revitCooling.MinorLoss; |
| | | propStatusHelper.UpdatePropStatusInfo(revitCooling.Id, nameof(cooling.MinorLoss), revitCooling, nameof(revitCooling.MinorLoss)); |
| | | cooling.Position2d = new Yw.Model.Hydro.Position2d(revitCooling.Position.X, revitCooling.Position.Y); |
| | | propStatusHelper.UpdatePropStatusInfo(revitCooling.Id, nameof(cooling.Position2d), revitCooling, nameof(revitCooling.Position)); |
| | | cooling.Position3d = new Yw.Model.Hydro.Position3d(revitCooling.Position.X, revitCooling.Position.Y, revitCooling.Position.Z); |
| | | propStatusHelper.UpdatePropStatusInfo(revitCooling.Id, nameof(cooling.Position3d), revitCooling, nameof(revitCooling.Position)); |
| | | cooling.Material = revitCooling.Material; |
| | | propStatusHelper.UpdatePropStatusInfo(revitCooling.Id, nameof(cooling.Material), revitCooling, nameof(revitCooling.Material)); |
| | | cooling.Caliber = revitCooling.Caliber; |
| | | propStatusHelper.UpdatePropStatusInfo(revitCooling.Id, nameof(cooling.Caliber), revitCooling, nameof(revitCooling.Caliber)); |
| | | cooling.Coefficient = revitCooling.Coefficient; |
| | | propStatusHelper.UpdatePropStatusInfo(revitCooling.Id, nameof(cooling.Coefficient), revitCooling, nameof(revitCooling.Coefficient)); |
| | | cooling.LowerLimit = revitCooling.LowerLimit; |
| | | propStatusHelper.UpdatePropStatusInfo(revitCooling.Id, nameof(cooling.LowerLimit), revitCooling, nameof(revitCooling.LowerLimit)); |
| | | |
| | | if (allScenePropValueList == null) |
| | | { |
| | | allScenePropValueList = new List<HydroParterScenePropValueInfo>(); |
| | | } |
| | | |
| | | var scenePropValueList = revitCooling.PropValueList?.Select(x => new Yw.Model.HydroParterScenePropValueInfo() |
| | | { |
| | | Parter = revitCooling.Id, |
| | | Scene = HStation.Revit.ConstParas.Scene, |
| | | PropName = x.PropName, |
| | | PropValue = x.PropValue |
| | | }).ToList(); |
| | | if (scenePropValueList != null && scenePropValueList.Count > 0) |
| | | { |
| | | allScenePropValueList.AddRange(scenePropValueList); |
| | | } |
| | | return cooling; |
| | | } |
| | | |
| | | //水表 |
| | | private static Yw.Model.HydroMeterInfo FromRevit |
| | | ( |
| | | HStation.Model.RevitMeter revitMeter, |
| | | PropStatusHelper propStatusHelper, |
| | | ref List<Yw.Model.HydroParterScenePropValueInfo> allScenePropValueList |
| | | ) |
| | | { |
| | | if (revitMeter == null) |
| | | { |
| | | return default; |
| | | } |
| | | var meter = new Yw.Model.HydroMeterInfo(); |
| | | meter.Catalog = Yw.Hydro.ParterCatalog.Meter; |
| | | meter.Name = revitMeter.Name; |
| | | propStatusHelper.UpdatePropStatusInfo(revitMeter.Id, nameof(meter.Name), revitMeter, nameof(revitMeter.Name)); |
| | | meter.Code = revitMeter.Id; |
| | | propStatusHelper.UpdatePropStatusInfo(revitMeter.Id, nameof(meter.Code), revitMeter, nameof(revitMeter.Id)); |
| | | meter.ModelType = revitMeter.ModelType; |
| | | propStatusHelper.UpdatePropStatusInfo(revitMeter.Id, nameof(meter.ModelType), revitMeter, nameof(revitMeter.ModelType)); |
| | | meter.Flags = revitMeter.Flags; |
| | | if (meter.Flags == null) |
| | | { |
| | | meter.Flags = new List<string>(); |
| | | } |
| | | propStatusHelper.UpdatePropStatusInfo(revitMeter.Id, nameof(meter.Flags), revitMeter, nameof(revitMeter.Flags)); |
| | | meter.Description = revitMeter.Description; |
| | | propStatusHelper.UpdatePropStatusInfo(revitMeter.Id, nameof(meter.Description), revitMeter, nameof(revitMeter.Description)); |
| | | meter.Elev = revitMeter.Elev; |
| | | propStatusHelper.UpdatePropStatusInfo(revitMeter.Id, nameof(meter.Elev), revitMeter, nameof(revitMeter.Elev)); |
| | | meter.MinorLoss = revitMeter.MinorLoss; |
| | | propStatusHelper.UpdatePropStatusInfo(revitMeter.Id, nameof(meter.MinorLoss), revitMeter, nameof(revitMeter.MinorLoss)); |
| | | meter.Demand = revitMeter.Demand; |
| | | propStatusHelper.UpdatePropStatusInfo(revitMeter.Id, nameof(meter.Demand), revitMeter, nameof(revitMeter.Demand)); |
| | | meter.Position2d = new Yw.Model.Hydro.Position2d(revitMeter.Position.X, revitMeter.Position.Y); |
| | | propStatusHelper.UpdatePropStatusInfo(revitMeter.Id, nameof(meter.Position2d), revitMeter, nameof(revitMeter.Position)); |
| | | meter.Position3d = new Yw.Model.Hydro.Position3d(revitMeter.Position.X, revitMeter.Position.Y, revitMeter.Position.Z); |
| | | propStatusHelper.UpdatePropStatusInfo(revitMeter.Id, nameof(meter.Position3d), revitMeter, nameof(revitMeter.Position)); |
| | | |
| | | if (allScenePropValueList == null) |
| | | { |
| | | allScenePropValueList = new List<HydroParterScenePropValueInfo>(); |
| | | } |
| | | |
| | | var scenePropValueList = revitMeter.PropValueList?.Select(x => new Yw.Model.HydroParterScenePropValueInfo() |
| | | { |
| | | Parter = revitMeter.Id, |
| | | Scene = HStation.Revit.ConstParas.Scene, |
| | | PropName = x.PropName, |
| | | PropValue = x.PropValue |
| | | }).ToList(); |
| | | if (scenePropValueList != null && scenePropValueList.Count > 0) |
| | | { |
| | | allScenePropValueList.AddRange(scenePropValueList); |
| | | } |
| | | return meter; |
| | | } |
| | | |
| | | //流量计 |
| | | private static Yw.Model.HydroFlowmeterInfo FromRevit |
| | | ( |
| | | HStation.Model.RevitFlowmeter revitFlowmeter, |
| | | PropStatusHelper propStatusHelper, |
| | | ref List<Yw.Model.HydroParterScenePropValueInfo> allScenePropValueList |
| | | ) |
| | | { |
| | | if (revitFlowmeter == null) |
| | | { |
| | | return default; |
| | | } |
| | | var flowmeter = new Yw.Model.HydroFlowmeterInfo(); |
| | | flowmeter.Catalog = Yw.Hydro.ParterCatalog.Flowmeter; |
| | | flowmeter.Name = revitFlowmeter.Name; |
| | | propStatusHelper.UpdatePropStatusInfo(revitFlowmeter.Id, nameof(flowmeter.Name), revitFlowmeter, nameof(revitFlowmeter.Name)); |
| | | flowmeter.Code = revitFlowmeter.Id; |
| | | propStatusHelper.UpdatePropStatusInfo(revitFlowmeter.Id, nameof(flowmeter.Code), revitFlowmeter, nameof(revitFlowmeter.Id)); |
| | | flowmeter.ModelType = revitFlowmeter.ModelType; |
| | | propStatusHelper.UpdatePropStatusInfo(revitFlowmeter.Id, nameof(flowmeter.ModelType), revitFlowmeter, nameof(revitFlowmeter.ModelType)); |
| | | flowmeter.Flags = revitFlowmeter.Flags; |
| | | if (flowmeter.Flags == null) |
| | | { |
| | | flowmeter.Flags = new List<string>(); |
| | | } |
| | | propStatusHelper.UpdatePropStatusInfo(revitFlowmeter.Id, nameof(flowmeter.Flags), revitFlowmeter, nameof(revitFlowmeter.Flags)); |
| | | flowmeter.Description = revitFlowmeter.Description; |
| | | propStatusHelper.UpdatePropStatusInfo(revitFlowmeter.Id, nameof(flowmeter.Description), revitFlowmeter, nameof(revitFlowmeter.Description)); |
| | | flowmeter.Elev = revitFlowmeter.Elev; |
| | | propStatusHelper.UpdatePropStatusInfo(revitFlowmeter.Id, nameof(flowmeter.Elev), revitFlowmeter, nameof(revitFlowmeter.Elev)); |
| | | flowmeter.MinorLoss = revitFlowmeter.MinorLoss; |
| | | propStatusHelper.UpdatePropStatusInfo(revitFlowmeter.Id, nameof(flowmeter.MinorLoss), revitFlowmeter, nameof(revitFlowmeter.MinorLoss)); |
| | | flowmeter.Position2d = new Yw.Model.Hydro.Position2d(revitFlowmeter.Position.X, revitFlowmeter.Position.Y); |
| | | propStatusHelper.UpdatePropStatusInfo(revitFlowmeter.Id, nameof(flowmeter.Position2d), revitFlowmeter, nameof(revitFlowmeter.Position)); |
| | | flowmeter.Position3d = new Yw.Model.Hydro.Position3d(revitFlowmeter.Position.X, revitFlowmeter.Position.Y, revitFlowmeter.Position.Z); |
| | | propStatusHelper.UpdatePropStatusInfo(revitFlowmeter.Id, nameof(flowmeter.Position3d), revitFlowmeter, nameof(revitFlowmeter.Position)); |
| | | |
| | | if (allScenePropValueList == null) |
| | | { |
| | | allScenePropValueList = new List<HydroParterScenePropValueInfo>(); |
| | | } |
| | | |
| | | var scenePropValueList = revitFlowmeter.PropValueList?.Select(x => new Yw.Model.HydroParterScenePropValueInfo() |
| | | { |
| | | Parter = revitFlowmeter.Id, |
| | | Scene = HStation.Revit.ConstParas.Scene, |
| | | PropName = x.PropName, |
| | | PropValue = x.PropValue |
| | | }).ToList(); |
| | | if (scenePropValueList != null && scenePropValueList.Count > 0) |
| | | { |
| | | allScenePropValueList.AddRange(scenePropValueList); |
| | | } |
| | | return flowmeter; |
| | | } |
| | | |
| | | //压力表 |
| | | private static Yw.Model.HydroPressmeterInfo FromRevit |
| | | ( |
| | | HStation.Model.RevitPressmeter revitPressmeter, |
| | | PropStatusHelper propStatusHelper, |
| | | ref List<Yw.Model.HydroParterScenePropValueInfo> allScenePropValueList |
| | | ) |
| | | { |
| | | if (revitPressmeter == null) |
| | | { |
| | | return default; |
| | | } |
| | | var pressmeter = new Yw.Model.HydroPressmeterInfo(); |
| | | pressmeter.Catalog = Yw.Hydro.ParterCatalog.Pressmeter; |
| | | pressmeter.Name = revitPressmeter.Name; |
| | | propStatusHelper.UpdatePropStatusInfo(revitPressmeter.Id, nameof(pressmeter.Name), revitPressmeter, nameof(revitPressmeter.Name)); |
| | | pressmeter.Code = revitPressmeter.Id; |
| | | propStatusHelper.UpdatePropStatusInfo(revitPressmeter.Id, nameof(pressmeter.Code), revitPressmeter, nameof(revitPressmeter.Id)); |
| | | pressmeter.ModelType = revitPressmeter.ModelType; |
| | | propStatusHelper.UpdatePropStatusInfo(revitPressmeter.Id, nameof(pressmeter.ModelType), revitPressmeter, nameof(revitPressmeter.ModelType)); |
| | | pressmeter.Flags = revitPressmeter.Flags; |
| | | if (pressmeter.Flags == null) |
| | | { |
| | | pressmeter.Flags = new List<string>(); |
| | | } |
| | | propStatusHelper.UpdatePropStatusInfo(revitPressmeter.Id, nameof(pressmeter.Flags), revitPressmeter, nameof(revitPressmeter.Flags)); |
| | | pressmeter.Description = revitPressmeter.Description; |
| | | propStatusHelper.UpdatePropStatusInfo(revitPressmeter.Id, nameof(pressmeter.Description), revitPressmeter, nameof(revitPressmeter.Description)); |
| | | pressmeter.Elev = revitPressmeter.Elev; |
| | | propStatusHelper.UpdatePropStatusInfo(revitPressmeter.Id, nameof(pressmeter.Elev), revitPressmeter, nameof(revitPressmeter.Elev)); |
| | | pressmeter.MinorLoss = revitPressmeter.MinorLoss; |
| | | propStatusHelper.UpdatePropStatusInfo(revitPressmeter.Id, nameof(pressmeter.MinorLoss), revitPressmeter, nameof(revitPressmeter.MinorLoss)); |
| | | pressmeter.Position2d = new Yw.Model.Hydro.Position2d(revitPressmeter.Position.X, revitPressmeter.Position.Y); |
| | | propStatusHelper.UpdatePropStatusInfo(revitPressmeter.Id, nameof(pressmeter.Position2d), revitPressmeter, nameof(revitPressmeter.Position)); |
| | | pressmeter.Position3d = new Yw.Model.Hydro.Position3d(revitPressmeter.Position.X, revitPressmeter.Position.Y, revitPressmeter.Position.Z); |
| | | propStatusHelper.UpdatePropStatusInfo(revitPressmeter.Id, nameof(pressmeter.Position3d), revitPressmeter, nameof(revitPressmeter.Position)); |
| | | |
| | | if (allScenePropValueList == null) |
| | | { |
| | | allScenePropValueList = new List<HydroParterScenePropValueInfo>(); |
| | | } |
| | | |
| | | var scenePropValueList = revitPressmeter.PropValueList?.Select(x => new Yw.Model.HydroParterScenePropValueInfo() |
| | | { |
| | | Parter = revitPressmeter.Id, |
| | | Scene = HStation.Revit.ConstParas.Scene, |
| | | PropName = x.PropName, |
| | | PropValue = x.PropValue |
| | | }).ToList(); |
| | | if (scenePropValueList != null && scenePropValueList.Count > 0) |
| | | { |
| | | allScenePropValueList.AddRange(scenePropValueList); |
| | | } |
| | | return pressmeter; |
| | | } |
| | | |
| | | //管道 |
| | | private static Yw.Model.HydroPipeInfo FromRevit |
| | | ( |
| | | HStation.Model.RevitPipe revitPipe, |
| | | PropStatusHelper propStatusHelper, |
| | | ref List<Yw.Model.HydroParterScenePropValueInfo> allScenePropValueList |
| | | ) |
| | | { |
| | | if (revitPipe == null) |
| | | { |
| | | return default; |
| | | } |
| | | var pipe = new Yw.Model.HydroPipeInfo(); |
| | | pipe.Catalog = Yw.Hydro.ParterCatalog.Pipe; |
| | | pipe.Name = revitPipe.Name; |
| | | propStatusHelper.UpdatePropStatusInfo(revitPipe.Id, nameof(pipe.Name), revitPipe, nameof(revitPipe.Name)); |
| | | pipe.Code = revitPipe.Id; |
| | | propStatusHelper.UpdatePropStatusInfo(revitPipe.Id, nameof(pipe.Code), revitPipe, nameof(revitPipe.Id)); |
| | | pipe.ModelType = revitPipe.ModelType; |
| | | propStatusHelper.UpdatePropStatusInfo(revitPipe.Id, nameof(pipe.ModelType), revitPipe, nameof(revitPipe.ModelType)); |
| | | pipe.Flags = revitPipe.Flags; |
| | | if (pipe.Flags == null) |
| | | { |
| | | pipe.Flags = new List<string>(); |
| | | } |
| | | propStatusHelper.UpdatePropStatusInfo(revitPipe.Id, nameof(pipe.Flags), revitPipe, nameof(revitPipe.Flags)); |
| | | pipe.Description = revitPipe.Description; |
| | | propStatusHelper.UpdatePropStatusInfo(revitPipe.Id, nameof(pipe.Description), revitPipe, nameof(revitPipe.Description)); |
| | | pipe.StartCode = revitPipe.StartCode; |
| | | propStatusHelper.UpdatePropStatusInfo(revitPipe.Id, nameof(pipe.StartCode), revitPipe, nameof(revitPipe.StartCode)); |
| | | pipe.EndCode = revitPipe.EndCode; |
| | | propStatusHelper.UpdatePropStatusInfo(revitPipe.Id, nameof(pipe.EndCode), revitPipe, nameof(revitPipe.EndCode)); |
| | | pipe.Material = revitPipe.Material; |
| | | propStatusHelper.UpdatePropStatusInfo(revitPipe.Id, nameof(pipe.Material), revitPipe, nameof(revitPipe.Material)); |
| | | pipe.Diameter = revitPipe.Diameter; |
| | | propStatusHelper.UpdatePropStatusInfo(revitPipe.Id, nameof(pipe.Diameter), revitPipe, nameof(revitPipe.Diameter)); |
| | | pipe.Length = revitPipe.Length; |
| | | propStatusHelper.UpdatePropStatusInfo(revitPipe.Id, nameof(pipe.Length), revitPipe, nameof(revitPipe.Length)); |
| | | pipe.Roughness = revitPipe.Roughness; |
| | | propStatusHelper.UpdatePropStatusInfo(revitPipe.Id, nameof(pipe.Roughness), revitPipe, nameof(revitPipe.Roughness)); |
| | | |
| | | if (allScenePropValueList == null) |
| | | { |
| | | allScenePropValueList = new List<HydroParterScenePropValueInfo>(); |
| | | } |
| | | |
| | | var scenePropValueList = revitPipe.PropValueList?.Select(x => new Yw.Model.HydroParterScenePropValueInfo() |
| | | { |
| | | Parter = revitPipe.Id, |
| | | Scene = HStation.Revit.ConstParas.Scene, |
| | | PropName = x.PropName, |
| | | PropValue = x.PropValue |
| | | }).ToList(); |
| | | if (scenePropValueList != null && scenePropValueList.Count > 0) |
| | | { |
| | | allScenePropValueList.AddRange(scenePropValueList); |
| | | } |
| | | return pipe; |
| | | } |
| | | |
| | | //过渡件 |
| | | private static Yw.Model.HydroTranslationInfo FromRevit |
| | | ( |
| | | HStation.Model.RevitTranslation revitTranslation, |
| | | PropStatusHelper propStatusHelper, |
| | | ref List<Yw.Model.HydroParterScenePropValueInfo> allScenePropValueList |
| | | ) |
| | | { |
| | | if (revitTranslation == null) |
| | | { |
| | | return default; |
| | | } |
| | | var translation = new Yw.Model.HydroTranslationInfo(); |
| | | translation.Catalog = Yw.Hydro.ParterCatalog.Translation; |
| | | translation.Name = revitTranslation.Name; |
| | | propStatusHelper.UpdatePropStatusInfo(revitTranslation.Id, nameof(translation.Name), revitTranslation, nameof(revitTranslation.Name)); |
| | | translation.Code = revitTranslation.Id; |
| | | propStatusHelper.UpdatePropStatusInfo(revitTranslation.Id, nameof(translation.Code), revitTranslation, nameof(revitTranslation.Id)); |
| | | translation.ModelType = revitTranslation.ModelType; |
| | | propStatusHelper.UpdatePropStatusInfo(revitTranslation.Id, nameof(translation.ModelType), revitTranslation, nameof(revitTranslation.ModelType)); |
| | | translation.Flags = revitTranslation.Flags; |
| | | if (translation.Flags == null) |
| | | { |
| | | translation.Flags = new List<string>(); |
| | | } |
| | | propStatusHelper.UpdatePropStatusInfo(revitTranslation.Id, nameof(translation.Flags), revitTranslation, nameof(revitTranslation.Flags)); |
| | | translation.Description = revitTranslation.Description; |
| | | propStatusHelper.UpdatePropStatusInfo(revitTranslation.Id, nameof(translation.Description), revitTranslation, nameof(revitTranslation.Description)); |
| | | translation.Elev = revitTranslation.Elev; |
| | | propStatusHelper.UpdatePropStatusInfo(revitTranslation.Id, nameof(translation.Elev), revitTranslation, nameof(revitTranslation.Elev)); |
| | | translation.StartCode = revitTranslation.StartCode; |
| | | propStatusHelper.UpdatePropStatusInfo(revitTranslation.Id, nameof(translation.StartCode), revitTranslation, nameof(revitTranslation.StartCode)); |
| | | translation.EndCode = revitTranslation.EndCode; |
| | | propStatusHelper.UpdatePropStatusInfo(revitTranslation.Id, nameof(translation.EndCode), revitTranslation, nameof(revitTranslation.EndCode)); |
| | | |
| | | translation.Material = revitTranslation.Material; |
| | | propStatusHelper.UpdatePropStatusInfo(revitTranslation.Id, nameof(translation.Material), revitTranslation, nameof(revitTranslation.Material)); |
| | | translation.MinorLoss = revitTranslation.MinorLoss; |
| | | propStatusHelper.UpdatePropStatusInfo(revitTranslation.Id, nameof(translation.MinorLoss), revitTranslation, nameof(revitTranslation.MinorLoss)); |
| | | translation.StartDiameter = revitTranslation.StartDiameter; |
| | | propStatusHelper.UpdatePropStatusInfo(revitTranslation.Id, nameof(translation.StartDiameter), revitTranslation, nameof(revitTranslation.StartDiameter)); |
| | | translation.EndDiameter = revitTranslation.EndDiameter; |
| | | propStatusHelper.UpdatePropStatusInfo(revitTranslation.Id, nameof(translation.EndDiameter), revitTranslation, nameof(revitTranslation.EndDiameter)); |
| | | |
| | | if (allScenePropValueList == null) |
| | | { |
| | | allScenePropValueList = new List<HydroParterScenePropValueInfo>(); |
| | | } |
| | | |
| | | var scenePropValueList = revitTranslation.PropValueList?.Select(x => new Yw.Model.HydroParterScenePropValueInfo() |
| | | { |
| | | Parter = revitTranslation.Id, |
| | | Scene = HStation.Revit.ConstParas.Scene, |
| | | PropName = x.PropName, |
| | | PropValue = x.PropValue |
| | | }).ToList(); |
| | | if (scenePropValueList != null && scenePropValueList.Count > 0) |
| | | { |
| | | allScenePropValueList.AddRange(scenePropValueList); |
| | | } |
| | | return translation; |
| | | } |
| | | |
| | | //水泵 |
| | | private static Yw.Model.HydroPumpInfo FromRevit |
| | | ( |
| | | HStation.Model.RevitPump revitPump, |
| | | PropStatusHelper propStatusHelper, |
| | | ref List<Yw.Model.HydroParterScenePropValueInfo> allScenePropValueList |
| | | ) |
| | | { |
| | | if (revitPump == null) |
| | | { |
| | | return default; |
| | | } |
| | | var pump = new Yw.Model.HydroPumpInfo(); |
| | | pump.Catalog = Yw.Hydro.ParterCatalog.Pump; |
| | | pump.Name = revitPump.Name; |
| | | propStatusHelper.UpdatePropStatusInfo(revitPump.Id, nameof(pump.Name), revitPump, nameof(revitPump.Name)); |
| | | pump.Code = revitPump.Id; |
| | | propStatusHelper.UpdatePropStatusInfo(revitPump.Id, nameof(pump.Code), revitPump, nameof(revitPump.Id)); |
| | | pump.ModelType = revitPump.ModelType; |
| | | propStatusHelper.UpdatePropStatusInfo(revitPump.Id, nameof(pump.ModelType), revitPump, nameof(revitPump.ModelType)); |
| | | pump.Flags = revitPump.Flags; |
| | | if (pump.Flags == null) |
| | | { |
| | | pump.Flags = new List<string>(); |
| | | } |
| | | propStatusHelper.UpdatePropStatusInfo(revitPump.Id, nameof(pump.Flags), revitPump, nameof(revitPump.Flags)); |
| | | pump.Description = revitPump.Description; |
| | | propStatusHelper.UpdatePropStatusInfo(revitPump.Id, nameof(pump.Description), revitPump, nameof(revitPump.Description)); |
| | | pump.Elev = revitPump.Elev; |
| | | propStatusHelper.UpdatePropStatusInfo(revitPump.Id, nameof(pump.Elev), revitPump, nameof(revitPump.Elev)); |
| | | pump.StartCode = revitPump.StartCode; |
| | | propStatusHelper.UpdatePropStatusInfo(revitPump.Id, nameof(pump.StartCode), revitPump, nameof(revitPump.StartCode)); |
| | | pump.EndCode = revitPump.EndCode; |
| | | propStatusHelper.UpdatePropStatusInfo(revitPump.Id, nameof(pump.EndCode), revitPump, nameof(revitPump.EndCode)); |
| | | pump.LinkStatus = revitPump.LinkStatus; |
| | | propStatusHelper.UpdatePropStatusInfo(revitPump.Id, nameof(pump.LinkStatus), revitPump, nameof(revitPump.LinkStatus)); |
| | | pump.RatedQ = revitPump.RatedQ; |
| | | propStatusHelper.UpdatePropStatusInfo(revitPump.Id, nameof(pump.RatedQ), revitPump, nameof(revitPump.RatedQ)); |
| | | pump.RatedH = revitPump.RatedH; |
| | | propStatusHelper.UpdatePropStatusInfo(revitPump.Id, nameof(pump.RatedH), revitPump, nameof(revitPump.RatedH)); |
| | | pump.RatedP = revitPump.RatedP; |
| | | propStatusHelper.UpdatePropStatusInfo(revitPump.Id, nameof(pump.RatedP), revitPump, nameof(revitPump.RatedP)); |
| | | pump.RatedN = revitPump.RatedN; |
| | | propStatusHelper.UpdatePropStatusInfo(revitPump.Id, nameof(pump.RatedN), revitPump, nameof(revitPump.RatedN)); |
| | | pump.RatedHz = revitPump.RatedHz; |
| | | propStatusHelper.UpdatePropStatusInfo(revitPump.Id, nameof(pump.RatedHz), revitPump, nameof(revitPump.RatedHz)); |
| | | pump.SpeedRatio = revitPump.SpeedRatio; |
| | | propStatusHelper.UpdatePropStatusInfo(revitPump.Id, nameof(pump.SpeedRatio), revitPump, nameof(revitPump.SpeedRatio)); |
| | | pump.SpeedRatioPattern = revitPump.SpeedRatioPattern; |
| | | propStatusHelper.UpdatePropStatusInfo(revitPump.Id, nameof(pump.SpeedRatioPattern), revitPump, nameof(revitPump.SpeedRatioPattern)); |
| | | pump.CurveQH = revitPump.CurveQH; |
| | | propStatusHelper.UpdatePropStatusInfo(revitPump.Id, nameof(pump.CurveQH), revitPump, nameof(revitPump.CurveQH)); |
| | | pump.CurveQP = revitPump.CurveQP; |
| | | propStatusHelper.UpdatePropStatusInfo(revitPump.Id, nameof(pump.CurveQP), revitPump, nameof(revitPump.CurveQP)); |
| | | pump.CurveQE = revitPump.CurveQE; |
| | | propStatusHelper.UpdatePropStatusInfo(revitPump.Id, nameof(pump.CurveQE), revitPump, nameof(revitPump.CurveQE)); |
| | | |
| | | if (allScenePropValueList == null) |
| | | { |
| | | allScenePropValueList = new List<HydroParterScenePropValueInfo>(); |
| | | } |
| | | |
| | | var scenePropValueList = revitPump.PropValueList?.Select(x => new Yw.Model.HydroParterScenePropValueInfo() |
| | | { |
| | | Parter = revitPump.Id, |
| | | Scene = HStation.Revit.ConstParas.Scene, |
| | | PropName = x.PropName, |
| | | PropValue = x.PropValue |
| | | }).ToList(); |
| | | if (scenePropValueList != null && scenePropValueList.Count > 0) |
| | | { |
| | | allScenePropValueList.AddRange(scenePropValueList); |
| | | } |
| | | return pump; |
| | | } |
| | | |
| | | //阀门 |
| | | private static Yw.Model.HydroValveInfo FromRevit |
| | | ( |
| | | HStation.Model.RevitValve revitValve, |
| | | PropStatusHelper propStatusHelper, |
| | | ref List<Yw.Model.HydroParterScenePropValueInfo> allScenePropValueList |
| | | ) |
| | | { |
| | | if (revitValve == null) |
| | | { |
| | | return default; |
| | | } |
| | | var valve = new Yw.Model.HydroValveInfo(); |
| | | valve.Catalog = Yw.Hydro.ParterCatalog.Valve; |
| | | valve.Name = revitValve.Name; |
| | | propStatusHelper.UpdatePropStatusInfo(revitValve.Id, nameof(valve.Name), revitValve, nameof(revitValve.Name)); |
| | | valve.Code = revitValve.Id; |
| | | propStatusHelper.UpdatePropStatusInfo(revitValve.Id, nameof(valve.Code), revitValve, nameof(revitValve.Id)); |
| | | valve.ModelType = revitValve.ModelType; |
| | | propStatusHelper.UpdatePropStatusInfo(revitValve.Id, nameof(valve.ModelType), revitValve, nameof(revitValve.ModelType)); |
| | | valve.Flags = revitValve.Flags; |
| | | if (valve.Flags == null) |
| | | { |
| | | valve.Flags = new List<string>(); |
| | | } |
| | | propStatusHelper.UpdatePropStatusInfo(revitValve.Id, nameof(valve.Flags), revitValve, nameof(revitValve.Flags)); |
| | | valve.Description = revitValve.Description; |
| | | propStatusHelper.UpdatePropStatusInfo(revitValve.Id, nameof(valve.Description), revitValve, nameof(revitValve.Description)); |
| | | valve.Elev = revitValve.Elev; |
| | | propStatusHelper.UpdatePropStatusInfo(revitValve.Id, nameof(valve.Elev), revitValve, nameof(revitValve.Elev)); |
| | | valve.StartCode = revitValve.StartCode; |
| | | propStatusHelper.UpdatePropStatusInfo(revitValve.Id, nameof(valve.StartCode), revitValve, nameof(revitValve.StartCode)); |
| | | valve.EndCode = revitValve.EndCode; |
| | | propStatusHelper.UpdatePropStatusInfo(revitValve.Id, nameof(valve.EndCode), revitValve, nameof(revitValve.EndCode)); |
| | | valve.LinkStatus = revitValve.LinkStatus; |
| | | propStatusHelper.UpdatePropStatusInfo(revitValve.Id, nameof(valve.LinkStatus), revitValve, nameof(revitValve.LinkStatus)); |
| | | valve.ValveType = revitValve.ValveType; |
| | | propStatusHelper.UpdatePropStatusInfo(revitValve.Id, nameof(valve.ValveType), revitValve, nameof(revitValve.ValveType)); |
| | | valve.Material = revitValve.Material; |
| | | propStatusHelper.UpdatePropStatusInfo(revitValve.Id, nameof(valve.Material), revitValve, nameof(revitValve.Material)); |
| | | valve.Diameter = revitValve.Diameter; |
| | | propStatusHelper.UpdatePropStatusInfo(revitValve.Id, nameof(valve.Diameter), revitValve, nameof(revitValve.Diameter)); |
| | | valve.MinorLoss = revitValve.MinorLoss; |
| | | propStatusHelper.UpdatePropStatusInfo(revitValve.Id, nameof(valve.MinorLoss), revitValve, nameof(revitValve.MinorLoss)); |
| | | valve.OpeningDegree = revitValve.OpeningDegree; |
| | | propStatusHelper.UpdatePropStatusInfo(revitValve.Id, nameof(valve.OpeningDegree), revitValve, nameof(revitValve.OpeningDegree)); |
| | | |
| | | |
| | | if (allScenePropValueList == null) |
| | | { |
| | | allScenePropValueList = new List<HydroParterScenePropValueInfo>(); |
| | | } |
| | | |
| | | var scenePropValueList = revitValve.PropValueList?.Select(x => new Yw.Model.HydroParterScenePropValueInfo() |
| | | { |
| | | Parter = revitValve.Id, |
| | | Scene = HStation.Revit.ConstParas.Scene, |
| | | PropName = x.PropName, |
| | | PropValue = x.PropValue |
| | | }).ToList(); |
| | | if (scenePropValueList != null && scenePropValueList.Count > 0) |
| | | { |
| | | allScenePropValueList.AddRange(scenePropValueList); |
| | | } |
| | | return valve; |
| | | } |
| | | |
| | | //换热器 |
| | | private static Yw.Model.HydroExchangerInfo FromRevit |
| | | ( |
| | | HStation.Model.RevitExchanger revitExchanger, |
| | | PropStatusHelper propStatusHelper, |
| | | ref List<Yw.Model.HydroParterScenePropValueInfo> allScenePropValueList |
| | | ) |
| | | { |
| | | if (revitExchanger == null) |
| | | { |
| | | return default; |
| | | } |
| | | var exchanger = new Yw.Model.HydroExchangerInfo(); |
| | | exchanger.Catalog = Yw.Hydro.ParterCatalog.Exchanger; |
| | | exchanger.Name = revitExchanger.Name; |
| | | propStatusHelper.UpdatePropStatusInfo(revitExchanger.Id, nameof(exchanger.Name), revitExchanger, nameof(revitExchanger.Name)); |
| | | exchanger.Code = revitExchanger.Id; |
| | | propStatusHelper.UpdatePropStatusInfo(revitExchanger.Id, nameof(exchanger.Code), revitExchanger, nameof(revitExchanger.Id)); |
| | | exchanger.ModelType = revitExchanger.ModelType; |
| | | propStatusHelper.UpdatePropStatusInfo(revitExchanger.Id, nameof(exchanger.ModelType), revitExchanger, nameof(revitExchanger.ModelType)); |
| | | exchanger.Flags = revitExchanger.Flags; |
| | | if (exchanger.Flags == null) |
| | | { |
| | | exchanger.Flags = new List<string>(); |
| | | } |
| | | propStatusHelper.UpdatePropStatusInfo(revitExchanger.Id, nameof(exchanger.Flags), revitExchanger, nameof(revitExchanger.Flags)); |
| | | exchanger.Description = revitExchanger.Description; |
| | | propStatusHelper.UpdatePropStatusInfo(revitExchanger.Id, nameof(exchanger.Description), revitExchanger, nameof(revitExchanger.Description)); |
| | | exchanger.Elev = revitExchanger.Elev; |
| | | propStatusHelper.UpdatePropStatusInfo(revitExchanger.Id, nameof(exchanger.Elev), revitExchanger, nameof(revitExchanger.Elev)); |
| | | exchanger.StartCode = revitExchanger.StartCode; |
| | | propStatusHelper.UpdatePropStatusInfo(revitExchanger.Id, nameof(exchanger.StartCode), revitExchanger, nameof(revitExchanger.StartCode)); |
| | | exchanger.EndCode = revitExchanger.EndCode; |
| | | propStatusHelper.UpdatePropStatusInfo(revitExchanger.Id, nameof(exchanger.EndCode), revitExchanger, nameof(revitExchanger.EndCode)); |
| | | exchanger.LinkStatus = revitExchanger.LinkStatus; |
| | | propStatusHelper.UpdatePropStatusInfo(revitExchanger.Id, nameof(exchanger.LinkStatus), revitExchanger, nameof(revitExchanger.LinkStatus)); |
| | | exchanger.Material = revitExchanger.Material; |
| | | propStatusHelper.UpdatePropStatusInfo(revitExchanger.Id, nameof(exchanger.Material), revitExchanger, nameof(revitExchanger.Material)); |
| | | exchanger.Diameter = revitExchanger.Diameter; |
| | | propStatusHelper.UpdatePropStatusInfo(revitExchanger.Id, nameof(exchanger.Diameter), revitExchanger, nameof(revitExchanger.Diameter)); |
| | | exchanger.MinorLoss = revitExchanger.MinorLoss; |
| | | propStatusHelper.UpdatePropStatusInfo(revitExchanger.Id, nameof(exchanger.MinorLoss), revitExchanger, nameof(revitExchanger.MinorLoss)); |
| | | exchanger.CurveQL = revitExchanger.CurveQL; |
| | | propStatusHelper.UpdatePropStatusInfo(revitExchanger.Id, nameof(exchanger.CurveQL), revitExchanger, nameof(revitExchanger.CurveQL)); |
| | | |
| | | |
| | | if (allScenePropValueList == null) |
| | | { |
| | | allScenePropValueList = new List<HydroParterScenePropValueInfo>(); |
| | | } |
| | | |
| | | var scenePropValueList = revitExchanger.PropValueList?.Select(x => new Yw.Model.HydroParterScenePropValueInfo() |
| | | { |
| | | Parter = revitExchanger.Id, |
| | | Scene = HStation.Revit.ConstParas.Scene, |
| | | PropName = x.PropName, |
| | | PropValue = x.PropValue |
| | | }).ToList(); |
| | | if (scenePropValueList != null && scenePropValueList.Count > 0) |
| | | { |
| | | allScenePropValueList.AddRange(scenePropValueList); |
| | | } |
| | | return exchanger; |
| | | } |
| | | |
| | | //空压机 |
| | | private static Yw.Model.HydroCompressorInfo FromRevit |
| | | ( |
| | | HStation.Model.RevitCompressor revitCompressor, |
| | | PropStatusHelper propStatusHelper, |
| | | ref List<Yw.Model.HydroParterScenePropValueInfo> allScenePropValueList |
| | | ) |
| | | { |
| | | if (revitCompressor == null) |
| | | { |
| | | return default; |
| | | } |
| | | var compressor = new Yw.Model.HydroCompressorInfo(); |
| | | compressor.Catalog = Yw.Hydro.ParterCatalog.Compressor; |
| | | compressor.Name = revitCompressor.Name; |
| | | propStatusHelper.UpdatePropStatusInfo(revitCompressor.Id, nameof(compressor.Name), revitCompressor, nameof(revitCompressor.Name)); |
| | | compressor.Code = revitCompressor.Id; |
| | | propStatusHelper.UpdatePropStatusInfo(revitCompressor.Id, nameof(compressor.Code), revitCompressor, nameof(revitCompressor.Id)); |
| | | compressor.ModelType = revitCompressor.ModelType; |
| | | propStatusHelper.UpdatePropStatusInfo(revitCompressor.Id, nameof(compressor.ModelType), revitCompressor, nameof(revitCompressor.ModelType)); |
| | | compressor.Flags = revitCompressor.Flags; |
| | | if (compressor.Flags == null) |
| | | { |
| | | compressor.Flags = new List<string>(); |
| | | } |
| | | propStatusHelper.UpdatePropStatusInfo(revitCompressor.Id, nameof(compressor.Flags), revitCompressor, nameof(revitCompressor.Flags)); |
| | | compressor.Description = revitCompressor.Description; |
| | | propStatusHelper.UpdatePropStatusInfo(revitCompressor.Id, nameof(compressor.Description), revitCompressor, nameof(revitCompressor.Description)); |
| | | compressor.Elev = revitCompressor.Elev; |
| | | propStatusHelper.UpdatePropStatusInfo(revitCompressor.Id, nameof(compressor.Elev), revitCompressor, nameof(revitCompressor.Elev)); |
| | | compressor.StartCode = revitCompressor.StartCode; |
| | | propStatusHelper.UpdatePropStatusInfo(revitCompressor.Id, nameof(compressor.StartCode), revitCompressor, nameof(revitCompressor.StartCode)); |
| | | compressor.EndCode = revitCompressor.EndCode; |
| | | propStatusHelper.UpdatePropStatusInfo(revitCompressor.Id, nameof(compressor.EndCode), revitCompressor, nameof(revitCompressor.EndCode)); |
| | | compressor.LinkStatus = revitCompressor.LinkStatus; |
| | | propStatusHelper.UpdatePropStatusInfo(revitCompressor.Id, nameof(compressor.LinkStatus), revitCompressor, nameof(revitCompressor.LinkStatus)); |
| | | compressor.Material = revitCompressor.Material; |
| | | propStatusHelper.UpdatePropStatusInfo(revitCompressor.Id, nameof(compressor.Material), revitCompressor, nameof(revitCompressor.Material)); |
| | | compressor.Diameter = revitCompressor.Diameter; |
| | | propStatusHelper.UpdatePropStatusInfo(revitCompressor.Id, nameof(compressor.Diameter), revitCompressor, nameof(revitCompressor.Diameter)); |
| | | compressor.MinorLoss = revitCompressor.MinorLoss; |
| | | propStatusHelper.UpdatePropStatusInfo(revitCompressor.Id, nameof(compressor.MinorLoss), revitCompressor, nameof(revitCompressor.MinorLoss)); |
| | | compressor.CurveQL = revitCompressor.CurveQL; |
| | | propStatusHelper.UpdatePropStatusInfo(revitCompressor.Id, nameof(compressor.CurveQL), revitCompressor, nameof(revitCompressor.CurveQL)); |
| | | |
| | | if (allScenePropValueList == null) |
| | | { |
| | | allScenePropValueList = new List<HydroParterScenePropValueInfo>(); |
| | | } |
| | | |
| | | var scenePropValueList = revitCompressor.PropValueList?.Select(x => new Yw.Model.HydroParterScenePropValueInfo() |
| | | { |
| | | Parter = revitCompressor.Id, |
| | | Scene = HStation.Revit.ConstParas.Scene, |
| | | PropName = x.PropName, |
| | | PropValue = x.PropValue |
| | | }).ToList(); |
| | | if (scenePropValueList != null && scenePropValueList.Count > 0) |
| | | { |
| | | allScenePropValueList.AddRange(scenePropValueList); |
| | | } |
| | | return compressor; |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | } |