|
|
@@ -8,8 +8,10 @@ using System.IO;
|
|
|
using System.Linq;
|
|
|
using System.Threading.Tasks;
|
|
|
using System.Windows.Documents;
|
|
|
+using System.Windows.Interop;
|
|
|
using Team.FFFeederService.Interfaces;
|
|
|
using TeamAAS_VP.Core;
|
|
|
+using TeamAAS_VP.Events;
|
|
|
using TeamAAS_VP.Interfaces;
|
|
|
using TeamAAS_VP.Models;
|
|
|
using TeamAAS_VP.Models.Product;
|
|
|
@@ -545,15 +547,24 @@ namespace TeamAAS_VP.Services
|
|
|
var dir = Path.GetDirectoryName(filePath);
|
|
|
if (!Directory.Exists(dir)) Directory.CreateDirectory(dir);
|
|
|
|
|
|
+ string temp = string.Empty;
|
|
|
// 加载每个相机的流程ToolBlock
|
|
|
- foreach (var camera in p.CameraProcedures)
|
|
|
+ try
|
|
|
{
|
|
|
- foreach (var prc in camera.ProcedureModels)
|
|
|
+ foreach (var camera in p.CameraProcedures)
|
|
|
{
|
|
|
- string prcPath = Path.Combine(dir, camera.Camera, prc.Name + ".vpp");
|
|
|
- prc.ToolBlock = CogSerializer.LoadObjectFromFile(prcPath) as CogToolBlock;
|
|
|
+ foreach (var prc in camera.ProcedureModels)
|
|
|
+ {
|
|
|
+ string prcPath = Path.Combine(dir, camera.Camera, prc.Name + ".vpp");
|
|
|
+ temp = prcPath;
|
|
|
+ prc.ToolBlock = CogSerializer.LoadObjectFromFile(prcPath) as CogToolBlock;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
+ catch (Exception ex)
|
|
|
+ {
|
|
|
+ LogHelper.logerror.Error($"加载产品视觉流程时出错!路径:{temp}", ex);
|
|
|
+ }
|
|
|
|
|
|
return p;
|
|
|
}
|