Aggiunti script per chiamate da EgtCAM5

This commit is contained in:
Annamaria Sassi
2026-07-24 18:23:48 +02:00
parent 2254a52cb0
commit 710e49e1a6
4 changed files with 79 additions and 12 deletions
+5 -5
View File
@@ -9,11 +9,11 @@ EgtEnableDebug( false)
-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-- TODO DA CANCELLARE!!!! quando verrà passato automaticamente da programma
local WIN = {}
WIN.BASEDIR = 'C:\\EgtData\\Window\\CAMAuto'
WIN.FILE = 'C:\\EgtData\\EgtWindowMaker\\Projects\\AntaSingola\\1.nge'
WIN.MACHINE = 'Saomad-Just3500'
WIN.FLAG = 1
--local WIN = {}
--WIN.BASEDIR = 'C:\\EgtData\\Window\\CAMAuto'
--WIN.FILE = 'C:\\EgtData\\EgtWindowMaker\\Projects\\AntaSingola\\1.nge'
--WIN.MACHINE = 'Saomad-Just3500'
--WIN.FLAG = 1
-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-- Imposto direttorio libreria specializzata per serramenti
+4 -7
View File
@@ -9,11 +9,11 @@ EgtEnableDebug( false)
-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
-- TODO DA CANCELLARE!!!! quando verrà passato automaticamente da programma
local WIN = {}
WIN.MACHINELIST = {}
WIN.MACHINELIST[1] = 'Saomad-Just3500'
--local WIN = {}
--WIN.MACHINELIST = {}
--WIN.MACHINELIST[1] = 'Saomad-Just3500'
--WIN.MACHINELIST[2] = 'Saomad-Just3500-Copy'
WIN.OPT_TYPE = 'WINDOW'
--WIN.OPT_TYPE = 'WINDOW'
-- * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
--Libero eventuali librerie rimaste caricate
@@ -343,7 +343,6 @@ for nMachineIndex = 1, #WIN.MACHINELIST do
if not CreateMachGroups() then return end
end
if nMachineIndex < #WIN.MACHINELIST then
@@ -351,8 +350,6 @@ for nMachineIndex = 1, #WIN.MACHINELIST do
PARTS = {}
GROUPS = {}
EgtResetCurrMachGroup()
--else
--EgtSetCurrMachGroup()
end
end
+42
View File
@@ -0,0 +1,42 @@
-- MachGroupsManual.lua by Egalware s.r.l. 2026/07/24
-- 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 sIniFilePath = EgtGetIniFile()
local sBaseDir = EgtGetStringFromIni( 'Window', 'BaseDir', '', sIniFilePath)
local nMachId = EgtGetFirstMachGroup()
while nMachId do
local nCurrMachId = nMachId
nMachId = EgtGetNextMachGroup( nMachId)
EgtRemoveMachGroup(nCurrMachId)
end
-- aggiungo le macchinate
local bOk, sErr = pcall( dofile, sBaseDir .. '\\CAMAuto\\' .. 'CreateMachGroups.lua')
if bOk then
-- salvo una macchinata per ogni file
local sFilePath = EgtGetCurrFilePath()
local sFileDir, _, sExt = EgtSplitPath( sFilePath)
nMachId = EgtGetFirstMachGroup()
while nMachId do
EgtSaveMachGroupToFile( nMachId, sFileDir .. EgtGetMachGroupName( nMachId) .. '.bwe')
nMachId = EgtGetNextMachGroup( nMachId)
end
end
-- salvo il file
EgtSaveFile()
+28
View File
@@ -0,0 +1,28 @@
-- ProcessWinManual.lua by Egalware s.r.l. 2026/07/24
-- Creazione dei MachGroup del file già aperto in modalità manuale da EgtCAM5
-- Intestazioni
require( 'EgtBase')
_ENV = EgtProtectGlobal()
EgtEnableDebug( true)
local sIniFilePath = EgtGetIniFile()
local sBaseDir = EgtGetStringFromIni( 'Window', 'BaseDir', '', sIniFilePath)
-- scelta della macchinata da aprire
local sOpenDirPath = 'c:\\EgtData\\EgtWindowMaker\\Projects\\*.bwe'
sOpenFilePath = EgtFileDialog( true, sOpenDirPath, "Window Project Files (*.bwe)|*.bwe||")
if not sOpenFilePath then
return
end
_G.WIN = { BASEDIR = 'C:\\EgtData\\Window\\CAMAuto',
FILE = sOpenFilePath,
MACHINE = 'Saomad-Just3500',
FLAG = 1}
-- aggiungo le lavorazioni
local bOk, sErr = pcall( dofile, sBaseDir .. '\\CAMAuto\\' .. 'BatchProcessWin.lua')
-- salvo il file
EgtSaveFile()