1459253e57
- modifiche e correzioni per Costolature (Setti -> Ribs).
58 lines
2.0 KiB
Lua
58 lines
2.0 KiB
Lua
-- RunMachiningParamEdit.lua by Egaltech s.r.l. 2022/04/05
|
|
-- Gestione visualizzazione per Stampa 3d
|
|
|
|
-- Tabella per definizione modulo
|
|
local RunMachiningParamEdit = {}
|
|
|
|
-- Intestazioni
|
|
require( 'EgtBase')
|
|
|
|
EgtOutLog( ' RunMachiningParamEdit started', 1)
|
|
|
|
-- Costanti generali
|
|
local AMD = require( 'AddManData')
|
|
|
|
---------------------------------------------------------------------
|
|
function RunMachiningParamEdit.Exec()
|
|
-- 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
|
|
|
|
end
|
|
|
|
---------------------------------------------------------------------
|
|
return RunMachiningParamEdit
|