96a8ef1603
- altri aggiustamenti per parte manuale.
41 lines
1.1 KiB
Lua
41 lines
1.1 KiB
Lua
-- 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()
|