Window 3.1g2 :
- spostati gli script per lancio manuale nella radice.
This commit is contained in:
@@ -0,0 +1,69 @@
|
||||
-- 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() .. 'Designing\\'
|
||||
EgtAddToPackagePath( sBaseDir .. '?.lua')
|
||||
EgtAddToPackagePath( sBaseDir .. 'WinLib\\' .. '?.lua')
|
||||
|
||||
_G.package.loaded.WinConst = nil
|
||||
_G.package.loaded.WinJWDConst = nil
|
||||
_G.package.loaded.WinCreate = nil
|
||||
_G.package.loaded.WinCalculate = nil
|
||||
_G.package.loaded.WinManageProject = nil
|
||||
_G.package.loaded.JSON = nil
|
||||
_G.package.loaded.xml2lua = nil
|
||||
_G.package.loaded.xml2lua_tree = nil
|
||||
|
||||
require( 'WinConst')
|
||||
local WinManageProject = require( 'WinManageProject')
|
||||
local WinCalculate = require( 'WinCalculate')
|
||||
|
||||
|
||||
local sOpenFilePath = ''
|
||||
-- verifico se lanciato file in batch per test
|
||||
if WINDOW and WINDOW.FILE then
|
||||
sOpenFilePath = WINDOW.FILE
|
||||
else
|
||||
-- altrimenti apro dialogo di scelta file
|
||||
local sOpenDirPath = 'C:\\EgtData\\EgtWindowMaker\\Projects\\*.jwd'
|
||||
sOpenFilePath = EgtFileDialog( true, sOpenDirPath, "Window Project Files (*.jwd)|*.jwd||")
|
||||
if not sOpenFilePath then
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
EgtNewFile()
|
||||
|
||||
local sProfileDir = EgtGetStringFromIni( 'Window', 'ProfileDir', 'C:\\EgtData\\EgtWindowMaker\\Profiles', EgtGetIniFile())
|
||||
if not WinManageProject.ReadFromFile( sOpenFilePath, sProfileDir) then
|
||||
return
|
||||
end
|
||||
|
||||
local sFilePath = EgtChangePathExtension( sOpenFilePath, 'nge')
|
||||
EgtSetCurrFilePath( sFilePath)
|
||||
|
||||
-- imposto se calcolare i solidi o meno
|
||||
WinCalculate.SetCalcSolid( true)
|
||||
--WinCalculate.SetCalcPreview( true)
|
||||
|
||||
-- creo i pezzi
|
||||
local nFrameId = EgtGetFirstNameInGroup( GDB_ID.ROOT, WIN_AREA .. '*')
|
||||
WinCalculate.CreatePartFromArea( nFrameId)
|
||||
WinCalculate.AddHardware( nFrameId, true, false, false, false)
|
||||
WinCalculate.AddAccessories( nFrameId, true)
|
||||
|
||||
-- elimino profilo se in batch per test
|
||||
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
|
||||
Reference in New Issue
Block a user