| | |
| | | { |
| | | blunthead.Caliber = caliber; |
| | | } |
| | | else |
| | | if (blunthead.Caliber <= 0) |
| | | { |
| | | if (jobject[RevitJsonProp.DN].MatchNumeric(out caliber)) |
| | | { |
| | | blunthead.Caliber = caliber; |
| | | } |
| | | } |
| | | if (blunthead.Caliber <= 0) |
| | | { |
| | | blunthead.UpdatePropStatus(nameof(blunthead.Caliber), ePropStatus.Abnormal, "[口径信息]缺少或者数据格式错误"); |
| | | } |
| | |
| | | { |
| | | elbow.Caliber = caliber; |
| | | } |
| | | else |
| | | if (elbow.Caliber <= 0) |
| | | { |
| | | if (jobject[RevitJsonProp.DN].MatchNumeric(out caliber)) |
| | | { |
| | | elbow.Caliber = caliber; |
| | | } |
| | | } |
| | | if (elbow.Caliber <= 0) |
| | | { |
| | | elbow.UpdatePropStatus(nameof(elbow.Caliber), ePropStatus.Abnormal, "[口径信息]缺少或者数据格式错误"); |
| | | } |
| | |
| | | |
| | | if (jobject[RevitJsonProp.BendingAngle].MatchNumeric(out double bendingAngle)) |
| | | { |
| | | elbow.BendingAngle = bendingAngle; |
| | | elbow.BendingAngle = (int)bendingAngle; |
| | | } |
| | | else |
| | | { |
| | |
| | | { |
| | | threelink.Caliber = caliber; |
| | | } |
| | | else |
| | | if (threelink.Caliber <= 0) |
| | | { |
| | | if (jobject[RevitJsonProp.DN].MatchNumeric(out caliber)) |
| | | { |
| | | threelink.Caliber = caliber; |
| | | } |
| | | } |
| | | if (threelink.Caliber <= 0) |
| | | { |
| | | threelink.UpdatePropStatus(nameof(threelink.Caliber), ePropStatus.Abnormal, "[口径信息]缺少或者数据格式错误"); |
| | | } |
| | |
| | | { |
| | | fourlink.Caliber = caliber; |
| | | } |
| | | else |
| | | if (fourlink.Caliber <= 0) |
| | | { |
| | | if (jobject[RevitJsonProp.DN].MatchNumeric(out caliber)) |
| | | { |
| | | fourlink.Caliber = caliber; |
| | | } |
| | | } |
| | | if (fourlink.Caliber <= 0) |
| | | { |
| | | fourlink.UpdatePropStatus(nameof(fourlink.Caliber), ePropStatus.Abnormal, "[口径信息]缺少或者数据格式错误"); |
| | | } |
| | |
| | | if (jobject.ParseString(RevitJsonProp.Name, out string name)) |
| | | { |
| | | pipe.Name = name; |
| | | pipe.UpdatePropStatus(nameof(pipe.Name), ePropStatus.Lack, "[构件名称]缺省"); |
| | | if (string.IsNullOrEmpty(pipe.Name)) |
| | | { |
| | | pipe.UpdatePropStatus(nameof(pipe.Name), ePropStatus.Lack, "[构件名称]缺省"); |
| | | } |
| | | } |
| | | else |
| | | { |
| | |
| | | |
| | | if (jobject.ParseString(RevitJsonProp.Flags, out string flags)) |
| | | { |
| | | pipe.Flags = Yw.Untity.FlagsHelper.ToList(flags); |
| | | pipe.Flags = RevitFlagsHelper.ToList(flags); |
| | | if (!string.IsNullOrEmpty(flags)) |
| | | { |
| | | if (pipe.Flags == null || pipe.Flags.Count < 1) |
| | |
| | | |
| | | #region Diameter |
| | | |
| | | if (jobject[RevitJsonProp.Diameter].MatchNumeric(out double diameter)) |
| | | //直径信息 |
| | | if (jobject[RevitJsonProp.DiameterInfo].MatchNumeric(out double diameter)) |
| | | { |
| | | pipe.Diameter = diameter; |
| | | } |
| | |
| | | pipe.UpdatePropStatus(nameof(pipe.Diameter), ePropStatus.Abnormal, "[直径信息]缺少或者格式错误"); |
| | | } |
| | | |
| | | //直径 |
| | | if (pipe.Diameter < 1) |
| | | { |
| | | if (jobject[RevitJsonProp.InternalDiameter].MatchNumeric(out double internalDiameter)) |
| | | if (jobject[RevitJsonProp.Diameter].MatchNumeric(out diameter)) |
| | | { |
| | | pipe.Diameter = internalDiameter; |
| | | pipe.Diameter = diameter; |
| | | pipe.UpdatePropStatus(nameof(pipe.Diameter), ePropStatus.Lack, "[直径信息]通过[直径]进行修复]"); |
| | | } |
| | | else |
| | | { |
| | | pipe.UpdatePropStatus(nameof(pipe.Diameter), ePropStatus.Abnormal, "[直径信息]无法通过[直径]进行修复]"); |
| | | } |
| | | } |
| | | |
| | | //内径 |
| | | if (pipe.Diameter < 1) |
| | | { |
| | | if (jobject[RevitJsonProp.InternalDiameter].MatchNumeric(out diameter)) |
| | | { |
| | | pipe.Diameter = diameter; |
| | | pipe.UpdatePropStatus(nameof(pipe.Diameter), ePropStatus.Lack, "[直径信息]通过[内径]进行修复]"); |
| | | } |
| | | else |
| | |
| | | } |
| | | } |
| | | |
| | | //公称直径 |
| | | if (pipe.Diameter < 1) |
| | | { |
| | | if (jobject[RevitJsonProp.DN].MatchNumeric(out double dn)) |
| | |
| | | |
| | | if (pipe.Diameter < 1) |
| | | { |
| | | pipe.Diameter = 500; |
| | | pipe.UpdatePropStatus(nameof(pipe.Diameter), ePropStatus.Lack, "[直径信息][内径]解析错误,使用默认值(500mm)修正]"); |
| | | pipe.UpdatePropStatus(nameof(pipe.Diameter), ePropStatus.Error, "[直径信息]解析错误,无法通过【直径】【内径】【公称直径】修复"); |
| | | } |
| | | |
| | | #endregion |
| | |
| | | |
| | | #region Diameter |
| | | |
| | | if (jobject[RevitJsonProp.Diameter].MatchNumeric(out double diameter)) |
| | | if (jobject[RevitJsonProp.DiameterInfo].MatchNumeric(out double diameter)) |
| | | { |
| | | translation.Diameter = diameter; |
| | | } |
| | |
| | | { |
| | | translation.Diameter = 500; |
| | | translation.UpdatePropStatus(nameof(translation.Diameter), ePropStatus.Lack, "[直径信息][内径]解析错误,使用默认值(500mm)修正]"); |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region StartDiameter |
| | | |
| | | if (jobject[RevitJsonProp.MaxSize].MatchNumeric(out double maxSize)) |
| | | { |
| | | translation.StartDiameter = maxSize; |
| | | } |
| | | |
| | | #endregion |
| | | |
| | | #region EndDiameter |
| | | |
| | | if (jobject[RevitJsonProp.MinSize].MatchNumeric(out double minSize)) |
| | | { |
| | | translation.EndDiameter = minSize; |
| | | } |
| | | |
| | | #endregion |
| | |
| | | |
| | | #region Diameter |
| | | |
| | | if (jobject[RevitJsonProp.Diameter].MatchNumeric(out double diameter)) |
| | | if (jobject[RevitJsonProp.DiameterInfo].MatchNumeric(out double diameter)) |
| | | { |
| | | valve.Diameter = diameter; |
| | | } |
| | |
| | | |
| | | #region Diameter |
| | | |
| | | if (jobject[RevitJsonProp.Diameter].MatchNumeric(out double diameter)) |
| | | if (jobject[RevitJsonProp.DiameterInfo].MatchNumeric(out double diameter)) |
| | | { |
| | | exchanger.Diameter = diameter; |
| | | } |
| | |
| | | |
| | | #region Diameter |
| | | |
| | | if (jobject[RevitJsonProp.Diameter].MatchNumeric(out double diameter)) |
| | | if (jobject[RevitJsonProp.DiameterInfo].MatchNumeric(out double diameter)) |
| | | { |
| | | compressor.Diameter = diameter; |
| | | } |