| | |
| | | return true; |
| | | } |
| | | |
| | | var bimfaceId = await Yw.WinFrmUI.BimfaceHelper.UploadFile(rvtFileInfo.FullName);//正式代码 |
| | | //var bimfaceId = 10000899666805;//测试用例 制氮循环:10000884893369 10000894297457 10000895957527 10000896316958 10000896755736 |
| | | //var bimfaceId = await Yw.WinFrmUI.BimfaceHelper.UploadFile(rvtFileInfo.FullName);//正式代码 |
| | | var bimfaceId = 10000884893369;//测试用例 制氮循环:10000884893369 10000894297457 10000895957527 10000896316958 10000896755736 10000899666805 |
| | | if (bimfaceId < 1) |
| | | { |
| | | feedBackMsg?.Invoke("Revit模型文件上传失败!!!", Color.Red); |
| | |
| | | |
| | | 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 |