diff --git a/Special-BeamWall/Beam.vb b/Special-BeamWall/Beam.vb index e07095a..dfbf0a5 100644 --- a/Special-BeamWall/Beam.vb +++ b/Special-BeamWall/Beam.vb @@ -36,15 +36,17 @@ Module Beam EgtLuaSetGlobStringVar("BEAM.MACHINE", sMachine) EgtLuaSetGlobIntVar("BEAM.FLAG", nFlag) ' Eseguo lo script - If Not EgtLuaExecFile(sExecPath) Then + Dim bOk As Boolean = False + If EgtLuaExecFile(sExecPath) Then + ' Recupero i risultati + Dim nErr As Integer = 999 + EgtLuaGetGlobIntVar("BEAM.ERR", nErr) + bOk = (nErr <= 0) + If Not bOk Then EgtOutLog("BeamExec Err=" & nErr.ToString()) + Else EgtOutLog("Error executing Beam Exec script " & sExecPath) Return False End If - ' Recupero i risultati - Dim nErr As Integer = 999 - EgtLuaGetGlobIntVar("BEAM.ERR", nErr) - Dim bOk As Boolean = (nErr <= 0) - If Not bOk Then EgtOutLog("BeamExec Err=" & nErr.ToString()) ' Cancello tavola globale EgtLuaResetGlobVar("BEAM") ' Aggiorno interfaccia