- gestita mancanza hardware

- gestito handle in ferramenta
This commit is contained in:
Emmanuele Sassi
2024-06-26 15:45:54 +02:00
parent 44a93e8d8a
commit 695422f484
4 changed files with 16 additions and 5 deletions
+2 -1
View File
@@ -26,7 +26,7 @@ WIN_FRAME_TYPE = {
ROUND_ARC = 4,
SEGMENTAL_ARC = 5,
POINTED_ARC = 6,
TRIANGLE = 7,
TRG = 7,
}
-- Tipi di giunzioni (joint)
@@ -286,6 +286,7 @@ WIN_PRJ_ORIGSPLIT = 'OrigSplit'
WIN_HARDWARE = 'Hardware'
WIN_HDW_FAVOURITE = 'HdwFavourite'
WIN_HDW_HANDLE = 'HdwHandle'
WIN_HDW_FRAME = 'HdwFrame'
---------------------------------------------------------------------
return WinConst
+11 -2
View File
@@ -2428,7 +2428,16 @@ function WinCalculate.AddHardwareForSash( nFrameId)
-- recupero preferito della ferramenta
local nFavourite = EgtGetInfo( nFrameId, WIN_HDW_FAVOURITE)
-- creo file di richiesta ferramenta
if not nFavourite or nFavourite == '000000' then
EgtOutLog('Warning! No hardware favourite set!')
return
end
local sHandle = EgtGetInfo( nFrameId, WIN_HDW_HANDLE)
if not sHandle then
EgtOutLog('Warning! No hardware handle set!')
return
end
-- creo file di richiesta ferramenta
local sNow = os.date( '_%Y_%m_%d_%H_%M_%S', os.time())
local sInputFile = 'a:\\InputBatch\\Input' .. sNow .. '.txt'
local sAGBOutputFile = 'C:\\AGB3000NG\\OutputBatch\\Output' .. sNow .. '.txt'
@@ -2480,7 +2489,7 @@ function WinCalculate.AddHardwareForSash( nFrameId)
sText = sText .. 'FINESTRAPORTAFINESTRA=Finestra' .. '\n' ..
'Q=1' .. '\n' ..
'MANOSERRAMENTO=Dx' .. '\n' ..
'MANOSERRAMENTO=' .. sHandle .. '\n' ..
'CNCOUTPUT=' .. sAGBOutputLavFile .. '\n' ..
'RUN'
+2 -1
View File
@@ -625,8 +625,9 @@ end
----------------------------------------------------------------------------------
---------------------------------- FERRAMENTA ------------------------------------
----------------------------------------------------------------------------------
function WinCreate.AddHardware( nFrameId, sFavourite)
function WinCreate.AddHardware( nFrameId, sFavourite, sHandle)
EgtSetInfo( nFrameId, WIN_HDW_FAVOURITE, sFavourite)
EgtSetInfo( nFrameId, WIN_HDW_HANDLE, sHandle)
end
---------------------------------------------------------------------
+1 -1
View File
@@ -53,7 +53,7 @@ end
_G.WinCreate_AddSash = WinCreate_AddSash
local function WinCreate_AddHardware()
WinCreate.AddHardware(WDG.AREAID, WDG.FAVOURITE)
WinCreate.AddHardware(WDG.AREAID, WDG.FAVOURITE, WDG.HANDLE)
end
_G.WinCreate_AddHardware = WinCreate_AddHardware