lixiaojun
2024-10-10 92a7a5a23ba8552c63d5292e14187f3b4390b9c0
WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/01-import/00-core/ImportXhsProjectHelper.cs
@@ -168,6 +168,49 @@
                return true;
            }
            //Revit 属性错误处理
            var hasRevitError = false;
            var allRevitParterList = structRevitModel.GetAllParters();
            foreach (var revitParter in allRevitParterList)
            {
                if (revitParter.PropStatusList != null && revitParter.PropStatusList.Count > 0)
                {
                    foreach (var revitParterPropStatus in revitParter.PropStatusList)
                    {
                        if (revitParterPropStatus.PropStatus == HStation.Revit.ePropStatus.Error)
                        {
                            hasRevitError = true;
                        }
                        switch (revitParterPropStatus.PropStatus)
                        {
                            case Revit.ePropStatus.Error:
                                {
                                    feedBackMsg?.Invoke($"构件编码:{revitParter.Code},构件属性:{revitParterPropStatus.PropName},错误:{revitParterPropStatus.StatusInfo} ", Color.Red);
                                }
                                break;
                            case Revit.ePropStatus.Lack:
                                {
                                    feedBackMsg?.Invoke($"构件编码:{revitParter.Code},构件属性:{revitParterPropStatus.PropName},缺省:{revitParterPropStatus.StatusInfo} ", Color.Gray);
                                }
                                break;
                            case Revit.ePropStatus.Abnormal:
                                {
                                    feedBackMsg?.Invoke($"构件编码:{revitParter.Code},构件属性:{revitParterPropStatus.PropName},异常:{revitParterPropStatus.StatusInfo} ", Color.Orange);
                                }
                                break;
                        }
                    }
                }
            }
            if (hasRevitError)
            {
                feedBackMsg?.Invoke($"水力结构文件属性错误!!!", Color.Red);
                feedBackMsg?.Invoke("项目导入结束。。。", Color.Blue);
                feedBackProgress?.Invoke(100, 100);
                return true;
            }
            var hydroInfo = HStation.Hydro.TransferHelper.FromRevit(structRevitModel, out msg);
            if (hydroInfo == null)
            {