- Modificate tutti i lua dei bottoni per portarli in libreria
This commit is contained in:
+5
-40
@@ -10,44 +10,9 @@ EgtEnableDebug( false)
|
||||
local sBaseDir = EgtGetSourceDir()
|
||||
EgtAddToPackagePath( sBaseDir .. 'LuaLibs\\?.lua')
|
||||
|
||||
-- Costanti generali
|
||||
local AMD = require( 'AddManData')
|
||||
-- Librerie
|
||||
_G.package.loaded.RunMachiningParamEdit = nil
|
||||
local RMPE = require( 'RunMachiningParamEdit')
|
||||
|
||||
-- recupero cartella delle lavorazioni
|
||||
local sCalcBaseDir = EgtGetStringFromIni( '3dPrinting', 'BaseDir', 'C:\\ProgramData\\Egaltech\\EgtCam5\\3dPrinting', EgtGetIniFile())
|
||||
local sMachiningDirPath = sCalcBaseDir .. '\\Machinings\\'
|
||||
|
||||
-- recupero file delle lavorazioni
|
||||
--local Machinings = {}
|
||||
local sMachinings = ''
|
||||
|
||||
local f = io.popen("dir " .. sMachiningDirPath .. " /B", "r")
|
||||
for entry in f:lines() do
|
||||
--Machinings[#Machinings + 1] = entry
|
||||
local sDir, sFile, sExt = EgtSplitPath(entry)
|
||||
if sExt == '.ini' then
|
||||
if sMachinings ~= "" then
|
||||
sMachinings = sMachinings .. ','
|
||||
end
|
||||
sMachinings = sMachinings .. sFile
|
||||
end
|
||||
end
|
||||
|
||||
-- chiedo quale file aprire
|
||||
MachiningValues = EgtDialogBox( 'Machinings edit', { 'Machining', 'CB:' .. sMachinings})
|
||||
if not MachiningValues or #MachiningValues < 1 then return end
|
||||
|
||||
-- verifico esistenza file
|
||||
local sSelMachiningPath = sMachiningDirPath .. MachiningValues[1] .. '.ini'
|
||||
if not EgtExistsFile( sSelMachiningPath) then
|
||||
EgtOutBox( 'Machining file not found', 'Error', 'ERROR')
|
||||
return
|
||||
end
|
||||
|
||||
-- apro programma di edit
|
||||
local sEditProgPath = EgtGetStringFromIni( '3dPrinting', 'MachiningEditProg', "", EgtGetIniFile())
|
||||
if not sEditProgPath or not EgtWinExec( sEditProgPath .. ' ' .. sSelMachiningPath) then
|
||||
EgtOutBox( 'Impossible opening software to show Machining. You can find it in ' .. sSelMachiningPath, 'Error', 'ERROR')
|
||||
end
|
||||
|
||||
------------------------- MAIN --------------------------------------
|
||||
-- Calcolo
|
||||
RMPE.Exec()
|
||||
|
||||
Reference in New Issue
Block a user