diff --git a/CAMAuto/ManPrepMachGroups.lua b/CAMAuto/ManPrepMachGroups.lua deleted file mode 100644 index 290145f..0000000 --- a/CAMAuto/ManPrepMachGroups.lua +++ /dev/null @@ -1,40 +0,0 @@ --- ManPrepMachGroups.lua by Egalware s.r.l. 2026/07/25 --- Creazione dei MachGroup del file già aperto in modalità manuale da EgtCAM5 - --- Intestazioni -require( 'EgtBase') -_ENV = EgtProtectGlobal() -EgtEnableDebug( false) - - -local MachineNameList = {} -MachineNameList[1] = 'Saomad-Just3500' ---MachineNameListT[2] = 'Saomad-Just3500-Copy' -local Opt_Type = 'WINDOW' - -_G.WIN = { MACHINELIST = MachineNameList, - OPT_TYPE = Opt_Type} - -local nMachId = EgtGetFirstMachGroup() -while nMachId do - local nCurrMachId = nMachId - nMachId = EgtGetNextMachGroup( nMachId) - EgtRemoveMachGroup(nCurrMachId) -end - --- aggiungo le macchinate -local bOk, sErr = pcall( dofile, EgtGetSourceDir() .. 'CreateMachGroups.lua') - -if bOk then - -- salvo una macchinata per ogni file - local sFilePath = EgtGetCurrFilePath() - local sFileDir, _, _ = EgtSplitPath( sFilePath) - nMachId = EgtGetFirstMachGroup() - while nMachId do - EgtSaveMachGroupToFile( nMachId, sFileDir .. EgtGetMachGroupName( nMachId) .. '.bwe') - nMachId = EgtGetNextMachGroup( nMachId) - end -end - --- salvo il file -EgtSaveFile() diff --git a/Designing/WinOpenProjectFile.lua b/ManCreateWindow.lua similarity index 71% rename from Designing/WinOpenProjectFile.lua rename to ManCreateWindow.lua index efcca7c..dc3f5fe 100644 --- a/Designing/WinOpenProjectFile.lua +++ b/ManCreateWindow.lua @@ -1,25 +1,12 @@ --- --- EEEEEEEEEE GGGGGG TTTTTTTTTTTTTT --- EEEEEEEEEE GGGGGGGGGG TTTTTTTTTTTTTT --- EEEE GGGG GGGG TTTT --- EEEE GGGG TTTT --- EEEEEEE GGGG GGGGGGG TTTT --- EEEEEEE GGGG GGGGGGG TTTT --- EEEE GGGG GGGG TTTT --- EEEE GGGG GGGG TTTT --- EEEEEEEEEE GGGGGGGGGG TTTT --- EEEEEEEEEE GGGGGG TTTT --- --- by Egalware s.r.l. --- Window project software by Egalware s.r.l. 2026/07/24 +-- ManCreateWindow.lua by Egalware s.r.l. 2026/07/27 +-- Creazione serramento 3d da descrizione JWD require( 'EgtBase') _ENV = EgtProtectGlobal() EgtEnableDebug( false) -- Imposto direttorio per librerie -local sBaseDir = EgtGetSourceDir() -EgtOutLog("BaseDir=" .. sBaseDir) +local sBaseDir = EgtGetSourceDir() .. 'Designing\\' EgtAddToPackagePath( sBaseDir .. '?.lua') EgtAddToPackagePath( sBaseDir .. 'WinLib\\' .. '?.lua') @@ -52,8 +39,6 @@ end EgtNewFile() -EgtStartCounter() - local sProfileDir = EgtGetStringFromIni( 'Window', 'ProfileDir', 'C:\\EgtData\\EgtWindowMaker\\Profiles', EgtGetIniFile()) if not WinManageProject.ReadFromFile( sOpenFilePath, sProfileDir) then return @@ -73,17 +58,12 @@ WinCalculate.AddHardware( nFrameId, true, false, false, false) WinCalculate.AddAccessories( nFrameId, true) -- elimino profilo se in batch per test -if WINDOW and WINDOW.TEST and WINDOW.TEST == 1 then +if WINDOW and WINDOW.TEST == 1 then local nProfileGroupId = EgtGetFirstNameInGroup( GDB_ID.ROOT, WIN_PROFILE) if nProfileGroupId and nProfileGroupId ~= GDB_ID.NULL then EgtErase( nProfileGroupId) end else EgtSaveFile() + EgtZoom( SCE_ZM.ALL) end - -EgtZoom( SCE_ZM.ALL) - --- riporto tempi di esecuzione -local sOut = string.format( ' ExecTime = %.2f ms', EgtStopCounter()) -EgtOutLog( sOut) diff --git a/ManPrepMachGroups.lua b/ManPrepMachGroups.lua new file mode 100644 index 0000000..d6d5962 --- /dev/null +++ b/ManPrepMachGroups.lua @@ -0,0 +1,41 @@ +-- ManPrepMachGroups.lua by Egalware s.r.l. 2026/07/27 +-- Creazione dei MachGroup del file già aperto in modalità manuale da EgtCAM5 + +-- Intestazioni +require( 'EgtBase') +_ENV = EgtProtectGlobal() +EgtEnableDebug( false) + + +-- rimuovo eventuali macchinate già presenti +local nMachId = EgtGetFirstMachGroup() +while nMachId do + local nCurrMachId = nMachId + nMachId = EgtGetNextMachGroup( nMachId) + EgtRemoveMachGroup(nCurrMachId) +end + +-- scrivo parametri di comando +_G.WIN = { MACHINELIST = { 'Saomad-Just3500'}, + OPT_TYPE = 'WINDOW'} + +-- aggiungo le macchinate +local bOk, sErr = pcall( dofile, EgtGetSourceDir() .. 'CAMAuto\\CreateMachGroups.lua') + +-- se errore, lo segnalo ed esco +if not bOk then + EgtOutBox( sErr, 'Prepara Macchinate', 'OK', 'ERROR') + return +end + +-- esporto ciascuna macchinata in un proprio file +local sFilePath = EgtGetCurrFilePath() +local sFileDir, _, _ = EgtSplitPath( sFilePath) +nMachId = EgtGetFirstMachGroup() +while nMachId do + EgtSaveMachGroupToFile( nMachId, sFileDir .. EgtGetMachGroupName( nMachId) .. '.bwe') + nMachId = EgtGetNextMachGroup( nMachId) +end + +-- salvo il file del serramento +EgtSaveFile() diff --git a/CAMAuto/ManProcOneMachGroup.lua b/ManProcOneMachGroup.lua similarity index 94% rename from CAMAuto/ManProcOneMachGroup.lua rename to ManProcOneMachGroup.lua index 9a3ce9b..c018d28 100644 --- a/CAMAuto/ManProcOneMachGroup.lua +++ b/ManProcOneMachGroup.lua @@ -1,4 +1,4 @@ --- ManProcOneMachGroup.lua by Egalware s.r.l. 2026/07/25 +-- ManProcOneMachGroup.lua by Egalware s.r.l. 2026/07/27 -- Creazione delle lavorazioni del MachGroup selezionato -- Intestazioni @@ -41,6 +41,7 @@ EgtCopyFile( sOrigFile, sOpenFilePath) -- lancio local _, sBaseDir = EgtEndsWith( EgtGetSourceDir(), '\\') +sBaseDir = sBaseDir .. '\\CAMAuto' _G.WIN = { BASEDIR = sBaseDir, FILE = sOpenFilePath, diff --git a/Version.lua b/Version.lua index 1ee9e3e..ef2dd5a 100644 --- a/Version.lua +++ b/Version.lua @@ -1,6 +1,6 @@ --- Version.lua by Egaltech s.r.l. 2026/07/24 +-- Version.lua by Egaltech s.r.l. 2026/07/27 -- Gestione della versione di Window NAME = 'Window' -VERSION = '3.1g1' +VERSION = '3.1g2' MIN_EXE = '3.1g1' diff --git a/Window.ini b/Window.ini index 6b313bf..9b48b5a 100644 --- a/Window.ini +++ b/Window.ini @@ -3,6 +3,7 @@ JwdEnable=1 BaseDir=C:\EgtData\Window ProfileDir=C:\EgtData\EgtWindowMaker\Profiles -Button1=Designing\WinOpenProjectFile.lua,Images\CreateWin.png,Crea Serramento -Button2=CAMAuto\ManPrepMachGroups.lua,Images\ManPrepMachGrps.png,Prepara Macchinate -Button3=CAMAuto\ManProcOneMachGroup.lua,Images\ManProcOneMachGrp.png,Lavora Una Macchinata +LastJwdDir= +Button1=ManCreateWindow.lua,Images\CreateWin.png,Crea Serramento +Button2=ManPrepMachGroups.lua,Images\ManPrepMachGrps.png,Prepara Macchinate +Button3=ManProcOneMachGroup.lua,Images\ManProcOneMachGrp.png,Lavora Una Macchinata