Corretto gestione in caso di errore durante applicazione lavorazioni nella 'MachiningLib.AddOperations'
This commit is contained in:
@@ -335,6 +335,7 @@ end
|
||||
function MachiningLib.AddOperations( vProc, Part)
|
||||
local nErr
|
||||
local sErr = ''
|
||||
local bAreAllMachiningApplyOk = true
|
||||
|
||||
for i = 1, #MACHININGS do
|
||||
-- creazione lavorazione
|
||||
@@ -476,16 +477,16 @@ function MachiningLib.AddOperations( vProc, Part)
|
||||
|
||||
local bIsApplyOk = MachiningLib.ApplyMachining( true, false)
|
||||
if not bIsApplyOk then
|
||||
bAreAllMachiningApplyOk = false
|
||||
nErr, sErr = EgtGetLastMachMgrError()
|
||||
EgtSetOperationMode( nOperationId, false)
|
||||
return false, sErr
|
||||
end
|
||||
else
|
||||
return false, sErr
|
||||
return false, 'UNEXPECTED ERROR: Error on creating machining'
|
||||
end
|
||||
|
||||
end
|
||||
return true, sErr
|
||||
return bAreAllMachiningApplyOk, sErr
|
||||
end
|
||||
|
||||
-------------------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user