- riorganizzazione cartella
This commit is contained in:
@@ -0,0 +1,88 @@
|
||||
--
|
||||
-- EEEEEEEEEE GGGGGG TTTTTTTTTTTTTT
|
||||
-- EEEEEEEEEE GGGGGGGGGG TTTTTTTTTTTTTT
|
||||
-- EEEE GGGG GGGG TTTT
|
||||
-- EEEE GGGG TTTT
|
||||
-- EEEEEEE GGGG GGGGGGG TTTT
|
||||
-- EEEEEEE GGGG GGGGGGG TTTT
|
||||
-- EEEE GGGG GGGG TTTT
|
||||
-- EEEE GGGG GGGG TTTT
|
||||
-- EEEEEEEEEE GGGGGGGGGG TTTT
|
||||
-- EEEEEEEEEE GGGGGG TTTT
|
||||
--
|
||||
-- by Egalware s.r.l.
|
||||
-- Window project software by Egalware s.r.l. 2023/05/02
|
||||
|
||||
require( 'EgtBase')
|
||||
_ENV = EgtProtectGlobal()
|
||||
EgtEnableDebug( false)
|
||||
--EgtEnableDebug( false)
|
||||
|
||||
-- Imposto direttorio per librerie
|
||||
local sBaseDir = EgtGetSourceDir()
|
||||
EgtOutLog("BaseDir=" .. sBaseDir)
|
||||
EgtAddToPackagePath( sBaseDir .. '?.lua')
|
||||
EgtAddToPackagePath( sBaseDir .. 'WinLib\\' .. '?.lua')
|
||||
|
||||
_G.package.loaded.WinConst = nil
|
||||
require( 'WinConst')
|
||||
_G.package.loaded.WinCreate = nil
|
||||
local WinCreate = require( 'WinCreate')
|
||||
_G.package.loaded.WinCalculate = nil
|
||||
local WinCalculate = require( 'WinCalculate')
|
||||
_G.package.loaded.WinManageProject = nil
|
||||
local WinManageProject = require( 'WinManageProject')
|
||||
|
||||
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\\EgwWindowLua\\Projects'
|
||||
local FilePathList = EgtFindAllFiles( sOpenDirPath .. '\\*.jwd')
|
||||
local sDialogFile = 'CB:'
|
||||
for FilePathIndex = 1, #FilePathList do
|
||||
local sName = EgtSplitString( FilePathList[FilePathIndex], '.')
|
||||
sDialogFile = sDialogFile .. sName[1] .. ','
|
||||
end
|
||||
local DialogRes = EgtDialogBox( 'Open Window Project', { 'Nome Progetto', sDialogFile })
|
||||
if DialogRes and DialogRes[1] then
|
||||
sOpenFilePath = sOpenDirPath .. '\\' .. DialogRes[1] .. '.jwd'
|
||||
else
|
||||
return
|
||||
end
|
||||
end
|
||||
|
||||
EgtNewFile()
|
||||
|
||||
EgtStartCounter()
|
||||
|
||||
--local sFileName = 'RoundArc_FixedGlass_Vertical&HorizontalSplit.jwd'
|
||||
if not WinManageProject.ReadFromFile( sOpenFilePath) then
|
||||
return
|
||||
end
|
||||
|
||||
-- imposto se calcolare i solidi o meno
|
||||
WinCalculate.SetCalcSolid( true)
|
||||
|
||||
-- creo i pezzi
|
||||
local nFrameId = EgtGetFirstNameInGroup( GDB_ID.ROOT, WIN_AREAASTERISK)
|
||||
WinCalculate.CreatePartFromArea( nFrameId)
|
||||
|
||||
-- preparo per automatismo lavorazioni
|
||||
-- WinCalculate.PrepareProject()
|
||||
|
||||
-- elimino profilo se in batch per test
|
||||
if WINDOW and WINDOW.TEST and WINDOW.TEST == 1 then
|
||||
local nProfileGroupId = EgtGetFirstNameInGroup( GDB_ID.ROOT, WIN_PROFILE)
|
||||
if nProfileGroupId and nProfileGroupId ~= GDB_ID.NULL then
|
||||
EgtErase( nProfileGroupId)
|
||||
end
|
||||
end
|
||||
|
||||
EgtZoom( SCE_ZM.ALL)
|
||||
|
||||
-- riporto tempi di esecuzione
|
||||
local sOut = string.format( ' ExecTime = %.2f ms', EgtStopCounter())
|
||||
EgtOutLog( sOut)
|
||||
Reference in New Issue
Block a user