duheng
2025-02-17 26f45822a2a84af81e20ca543da98d3b822c5afd
WinFrmUI/HStation.WinFrmUI.Xhs.Core/02-project/01-import/00-core/ImportXhsProjectHelper.cs
@@ -197,6 +197,7 @@
                                        feedBackMsg?.Invoke($"构件类型:{revitParter.Catalog},构件编码:{revitParter.Id},构件属性:{revitParterPropStatus.PropName},错误:{revitParterPropStatus.StatusInfo} ", Color.Red);
                                    }
                                    break;
                                default: break;
                            }
                        }
@@ -332,8 +333,8 @@
                return true;
            }
            //var bimfaceId = await Yw.WinFrmUI.BimfaceHelper.UploadFile(rvtFileInfo.FullName);//正式代码
            var bimfaceId = 10000896755736;//测试用例  10000884893369  10000894297457  10000895957527  10000896316958 10000896755736
            var bimfaceId = await Yw.WinFrmUI.BimfaceHelper.UploadFile(rvtFileInfo.FullName);//正式代码
            //var bimfaceId = 10000899666805;//测试用例  制氮循环:10000884893369   10000896755736 10000899666805
            if (bimfaceId < 1)
            {
                feedBackMsg?.Invoke("Revit模型文件上传失败!!!", Color.Red);
@@ -403,39 +404,14 @@
            feedBackProgress?.Invoke(100, 60);
            feedBackMsg?.Invoke("正在进行模型轻量化...", Color.Black);
            //var bimfaceTranslateStatus = await Yw.WinFrmUI.BimfaceHelper.TranslateRvtFile(bimfaceId);//发起转换
            var bimfaceTranslateStatus = Yw.BIMFace.eTranslateStatus.Processing;//测试代码
            var bimfaceTranslateStatus = await Yw.WinFrmUI.BimfaceHelper.TranslateRvtFile(bimfaceId);//发起转换
            //var bimfaceTranslateStatus = Yw.BIMFace.eTranslateStatus.Processing;//测试代码
            if (bimfaceTranslateStatus != Yw.BIMFace.eTranslateStatus.Success)
            {
                var dlgResult = XtraMessageBox.Show("Bimface模型轻量化需要一定的时间,是否继续等待?", "询问", MessageBoxButtons.YesNo, MessageBoxIcon.Question);
                if (dlgResult == DialogResult.Yes)
                {
                    await Yw.WinFrmUI.BimfaceHelper.WaitFileTranslateStatusUntilSuccess(bimfaceId, 3000);
                    feedBackMsg?.Invoke("模型轻量化完成。。。", Color.Green);
                }
                else
                {
                    bol = await BLLFactory<Yw.BLL.BimfaceFile>.Instance.UpdateFileStatus(vm.BimfaceFile.ID, (int)Yw.Bimface.eFileStatus.Converting);
                    if (bol)
                    {
                        vm.BimfaceFile.FileStatus = (int)Yw.Bimface.eFileStatus.Converting;
                    }
                    else
                    {
                        feedBackMsg?.Invoke("模型文件状态更新失败!!!", Color.Red);
                    }
                    feedBackMsg?.Invoke("跳过模型轻量化等待。。。", Color.Black);
                    feedBackMsg?.Invoke("项目导入结束。。。", Color.Blue);
                    feedBackProgress?.Invoke(100, 100);
                    return true;
                }
                await Yw.WinFrmUI.BimfaceHelper.WaitFileTranslateStatusUntilSuccess(bimfaceId, 3000);
            }
            else
            {
                feedBackMsg?.Invoke("模型轻量化完成。。。", Color.Green);
            }
            feedBackMsg?.Invoke("模型轻量化完成。。。", Color.Green);
            feedBackProgress?.Invoke(100, 90);
            #endregion
@@ -461,8 +437,8 @@
            return true;
            #endregion
        }
    }
}