diff --git a/WindowPipe.lua b/WindowPipe.lua index a547ff5..087ca1f 100644 --- a/WindowPipe.lua +++ b/WindowPipe.lua @@ -36,6 +36,7 @@ QUESTION_HARDWARE_SUBMODES = { LIST = 1, CALCHARDWARE = 2, HARDWAREOPTION = 3, + SASHSHAPE = 4, } -- produttore @@ -259,97 +260,6 @@ local function Calc_ProfileList() end end -local function Calc_HardwareOptions( QuestionArgs, sReadLine) - local sJwd = QuestionArgs["Jwd"] - local nManufacturer = tonumber( QuestionArgs["Manufacturer"]) - if sJwd and #sJwd > 0 then - if nManufacturer and nManufacturer == MANUFACTURERS.AGB then - -- imposto cartella profili - local sProfileDir = '' - sProfileDir = EgtGetStringFromIni( 'Window', 'ProfileDir', '', sIniFilePath) - if sProfileDir and #sProfileDir > 0 then - WDG.PROFILEPATH = sProfileDir - SetProfilePath() - else - local sErrorMsg = 'Errore! Cartella dei profili non trovata!' - EgtOutLog(sErrorMsg) - return 0, { Error = sErrorMsg} - end - -- carico jwd - WDG.JWD = sJwd - WinManage_LoadJwd() - local AreaId = WDG.AREAID - -- imposto opzioni visualizzazione - WDG.VALUE = false - _G.WinCalculate_SetCalcSolid() - WDG.VALUE = false - WinCalculate_SetSimplifiedSolid() - WDG.VALUE = true - WinCalculate_SetCalcPreview() - -- creazione pezzi - WDG.FRAMEID = AreaId - WinCalculate_CreatePartFromArea() - end - end - ---- leggo argomenti passati - --local sJwd = QuestionArgs["Jwd"] - --if sJwd and #sJwd > 0 then - -- local sNow = os.date( '_%Y_%m_%d_%H_%M_%S', os.time()) - -- local sInputFile = 'a:\\InputBatch\\Input' .. sNow .. '.txt' - -- local sAGBOutputKitFile = 'C:\\AGB3000NG\\OutputBatch\\Output' .. sNow .. '.txt' - -- local sOutputKitFile = 'a:\\OutputBatch\\Output' .. sNow .. '.txt' - -- -- Apro file Input in scrittura - -- local fhInput = io.open( sInputFile, 'w') - -- if not fhInput then - -- EgtOutLog( 'Error opening file ' .. sInputFile) - -- return false - -- end - -- - -- local sText = 'OUTPUTKIT=' .. sAGBOutputKitFile .. '\n' .. - -- 'DATAREQUEST=SE\n' .. - -- 'RUN' - -- - -- -- Scrittura nuova linea - -- fhInput:write( sText .. '\n') - -- - -- -- Chiudo file - -- fhInput:close() - -- - -- -- attendo scrittura output - -- local nWait = 0 - -- while not EgtExistsFile( sOutputKitFile) and nWait < 20 do - -- nWait = nWait + 1 - -- EgtPause( 500, true) - -- end - -- - -- EgtPause( 500, true) --- - -- local OutputKit = {} - -- -- Apro file OutputKit in lettura - -- local fhOutputKit = io.open( sOutputKitFile, 'r') - -- if not fhOutputKit then - -- EgtOutLog( 'Error opening file ' .. sOutputKitFile) - -- return false - -- end - -- local nKitLineIndex = 1 - -- for sLine in fhOutputKit:lines('l') do - -- local KitParams = EgtSplitString( sLine, ';') - -- local DescriptionSplit = EgtSplitString( KitParams[4], '_') - -- OutputKit[nKitLineIndex] = { Id = KitParams[3], FamilyName = DescriptionSplit[1], Description = KitParams[4], OpeningType = KitParams[5], Shape = KitParams[6], SashQty = tonumber(KitParams[7]), SashPosition = tonumber(KitParams[8])} - -- nKitLineIndex = nKitLineIndex + 1 - -- end - -- -- Chiudo file OutputKit in lettura - -- fhOutputKit:close() --- - -- local JsonOutputKit = JSON:encode( OutputKit) - -- return 1, { HardwareModelList = JsonOutputKit} - --else - -- local sErrorMsg = 'Errore! Jwd non trovato!' - -- EgtOutLog(sErrorMsg) - -- return 0, { Error = sErrorMsg} - --end -end - local nErr = 999 local nNilCount = 0 local bRun = true