From 21a2bbaf7961e710e4c65d338968b8af8a209bb6 Mon Sep 17 00:00:00 2001 From: Dario Sassi Date: Sat, 28 Jan 2017 15:36:05 +0000 Subject: [PATCH] OmagCUT 1.6x5 : - migliorie su controllo errori in fotografia con contorno - miglioria controllo errori da CamAuto. --- CamAuto.vb | 20 ++++++++++++-------- Camera.vb | 1 + My Project/AssemblyInfo.vb | 4 ++-- 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/CamAuto.vb b/CamAuto.vb index 1b46bd3..d84f24d 100644 --- a/CamAuto.vb +++ b/CamAuto.vb @@ -10,9 +10,10 @@ Friend Module CamAuto EgtLuaSetGlobIntVar("CAM.PARTID", nPartId) EgtLuaSetGlobBoolVar("CAM.PREVIEW", bPreview) EgtLuaSetGlobBoolVar("CAM.TOOLPATH", bToolpath) - Dim bOk As Boolean = EgtLuaExecFile(m_MainWindow.GetCamAutoDir() & "\CamAuto.lua") - bOk = bOk AndAlso EgtLuaCallFunction("CAM.Add") Dim nErr As Integer = 999 + Dim bOk As Boolean = EgtLuaExecFile(m_MainWindow.GetCamAutoDir() & "\CamAuto.lua") + bOk = bOk AndAlso EgtLuaGetGlobIntVar("CAM.ERR", nErr) AndAlso nErr = 0 + bOk = bOk AndAlso EgtLuaCallFunction("CAM.Add") EgtLuaGetGlobIntVar("CAM.ERR", nErr) EgtLuaResetGlobVar("CAM") If nErr <> 0 Then @@ -26,9 +27,10 @@ Friend Module CamAuto Friend Function EraseMachinings(nPartId As Integer) As Boolean EgtLuaCreateGlobTable("CAM") EgtLuaSetGlobIntVar("CAM.PARTID", nPartId) - Dim bOk As Boolean = EgtLuaExecFile(m_MainWindow.GetCamAutoDir() & "\CamAuto.lua") - bOk = bOk AndAlso EgtLuaCallFunction("CAM.Erase") Dim nErr As Integer = 999 + Dim bOk As Boolean = EgtLuaExecFile(m_MainWindow.GetCamAutoDir() & "\CamAuto.lua") + bOk = bOk AndAlso EgtLuaGetGlobIntVar("CAM.ERR", nErr) AndAlso nErr = 0 + bOk = bOk AndAlso EgtLuaCallFunction("CAM.Erase") EgtLuaGetGlobIntVar("CAM.ERR", nErr) EgtLuaResetGlobVar("CAM") If nErr <> 0 Then @@ -42,9 +44,10 @@ Friend Module CamAuto Friend Function UpdateAllMachiningsToolpaths() As Boolean EgtLuaCreateGlobTable("CAM") SetLuaStandardCamParams() - Dim bOk As Boolean = EgtLuaExecFile(m_MainWindow.GetCamAutoDir() & "\CamAuto.lua") - bOk = bOk AndAlso EgtLuaCallFunction("CAM.UpdateAllTp") Dim nErr As Integer = 999 + Dim bOk As Boolean = EgtLuaExecFile(m_MainWindow.GetCamAutoDir() & "\CamAuto.lua") + bOk = bOk AndAlso EgtLuaGetGlobIntVar("CAM.ERR", nErr) AndAlso nErr = 0 + bOk = bOk AndAlso EgtLuaCallFunction("CAM.UpdateAllTp") EgtLuaGetGlobIntVar("CAM.ERR", nErr) EgtLuaResetGlobVar("CAM") If nErr <> 0 Then @@ -57,9 +60,10 @@ Friend Module CamAuto Friend Function SortAllMachinings() As Boolean EgtLuaCreateGlobTable("CAM") SetLuaStandardCamParams() - Dim bOk As Boolean = EgtLuaExecFile(m_MainWindow.GetCamAutoDir() & "\CamAuto.lua") - bOk = bOk AndAlso EgtLuaCallFunction("CAM.Sort") Dim nErr As Integer = 999 + Dim bOk As Boolean = EgtLuaExecFile(m_MainWindow.GetCamAutoDir() & "\CamAuto.lua") + bOk = bOk AndAlso EgtLuaGetGlobIntVar("CAM.ERR", nErr) AndAlso nErr = 0 + bOk = bOk AndAlso EgtLuaCallFunction("CAM.Sort") EgtLuaGetGlobIntVar("CAM.ERR", nErr) EgtLuaResetGlobVar("CAM") If nErr <> 0 Then diff --git a/Camera.vb b/Camera.vb index 8387e4c..fae495e 100644 --- a/Camera.vb +++ b/Camera.vb @@ -318,6 +318,7 @@ Public Class Camera Process.Start(If(nInd <> 2, m_sCameraPath, m_sCameraPath2), sArgs) bOk = WaitPhoto(nInd) Catch ex As Exception + EgtOutLog(ex.Message()) bOk = False End Try ' Nascondo progressbar diff --git a/My Project/AssemblyInfo.vb b/My Project/AssemblyInfo.vb index 026dea5..612a495 100644 --- a/My Project/AssemblyInfo.vb +++ b/My Project/AssemblyInfo.vb @@ -60,5 +60,5 @@ Imports System.Windows ' by using the '*' as shown below: ' - - + +