| | |
| | | return true; |
| | | } |
| | | var structOthersFileInfo = allFileInfoList.Find(x => x.Name == HStation.Revit.ConstParas.StructOthersFileName); |
| | | |
| | | var structRevitModel = HStation.Service.RevitParseHelper.FromJsonFile |
| | | (structFileInfo.FullName, structOthersFileInfo?.FullName, out bool structFileResult, out List<string> structFileMsgList); |
| | | //解析结果判断 |
| | | if (!structFileResult) |
| | | { |
| | | structFileMsgList?.ForEach(x => feedBackMsg?.Invoke(x, Color.Red)); |
| | | } |
| | | //Revit属性错误处理 |
| | | var hasRevitPropError = false; |
| | | if (structRevitModel != null) |
| | |
| | | { |
| | | case Revit.ePropStatus.Error: |
| | | { |
| | | feedBackMsg?.Invoke($"构件编码:{revitParter.Id},构件属性:{revitParterPropStatus.PropName},错误:{revitParterPropStatus.StatusInfo} ", Color.Red); |
| | | feedBackMsg?.Invoke($"构件类型:{revitParter.Catalog},构件编码:{revitParter.Code},构件属性:{revitParterPropStatus.PropName},错误:{revitParterPropStatus.StatusInfo} ", Color.Red); |
| | | } |
| | | break; |
| | | |
| | | case Revit.ePropStatus.Lack: |
| | | { |
| | | feedBackMsg?.Invoke($"构件编码:{revitParter.Id},构件属性:{revitParterPropStatus.PropName},缺省:{revitParterPropStatus.StatusInfo} ", Color.Gray); |
| | | //feedBackMsg?.Invoke($"构件编码:{revitParter.Id},构件属性:{revitParterPropStatus.PropName},缺省:{revitParterPropStatus.StatusInfo} ", Color.Gray); |
| | | } |
| | | break; |
| | | |
| | | case Revit.ePropStatus.Abnormal: |
| | | { |
| | | feedBackMsg?.Invoke($"构件编码:{revitParter.Id},构件属性:{revitParterPropStatus.PropName},异常:{revitParterPropStatus.StatusInfo} ", Color.Orange); |
| | | //feedBackMsg?.Invoke($"构件编码:{revitParter.Id},构件属性:{revitParterPropStatus.PropName},异常:{revitParterPropStatus.StatusInfo} ", Color.Orange); |
| | | } |
| | | break; |
| | | |
| | | default: break; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | //解析结果判断 |
| | | if (!structFileResult) |
| | | { |
| | | structFileMsgList?.ForEach(x => feedBackMsg?.Invoke(x, Color.Red)); |
| | | } |
| | | |
| | | if (hasRevitPropError || !structFileResult) |
| | | { |
| | | feedBackMsg?.Invoke($"水力结构文件解析错误!!!", Color.Red); |
| | |
| | | feedBackProgress?.Invoke(100, 100); |
| | | return true; |
| | | } |
| | | |
| | | vm.RevitModel = structRevitModel; |
| | | |
| | | var hydroInfo = HStation.Hydro.TransferHelper.FromRevit(structRevitModel, out msg); |
| | | if (hydroInfo == null) |
| | |
| | | |
| | | feedBackMsg?.Invoke("正在进行产品匹配...", Color.Black); |
| | | hydroInfo = await BLLFactory<Yw.BLL.HydroModelInfo>.Instance.GetByID(hydroId); |
| | | var matchingParas = AssetsMatchingParasHelper.Create(hydroInfo); |
| | | var matchingParas = AssetsMatchingParasHelper.Create(hydroInfo, null); |
| | | if (AssetsMatchingHelper.Matching(matchingParas, out string error)) |
| | | { |
| | | if (AssetsMatchingParasHelper.Apply(hydroInfo, matchingParas)) |
| | | { |
| | | feedBackMsg?.Invoke("产品匹配成功。。。", Color.Green); |
| | | feedBackMsg?.Invoke("产品匹配完成。。。", Color.Green); |
| | | } |
| | | else |
| | | { |
| | |
| | | } |
| | | |
| | | //var bimfaceId = await Yw.WinFrmUI.BimfaceHelper.UploadFile(rvtFileInfo.FullName);//上传 |
| | | var bimfaceId = 10000878572231; //测试用例 10000882826621 |
| | | var bimfaceId = 10000884702464; //测试用例 10000878572231 10000882826621 10000884283372 10000884362886 10000884702464 |
| | | if (bimfaceId < 1) |
| | | { |
| | | feedBackMsg?.Invoke("Revit模型文件上传失败!!!", Color.Red); |