Files
Dario Sassi b83e8aa9a2 DataBeamWall :
- primo commit.
2020-04-09 08:04:18 +00:00

40 lines
1.0 KiB
Lua

-- HideAll.lua by Egaltech s.r.l. 2019/03/16
-- Gestione nascondimento di tutte le Travi non selezionate
-- Intestazioni
require( 'EgtBase')
_ENV = EgtProtectGlobal()
EgtEnableDebug( false)
-- se non ci sono pezzi selezionati, esco
if not EgtGetFirstSelectedObj() then return end
-- nascondo tutti i pezzi non selezionati
local bCurrPL = false
local nPartId = EgtGetFirstPart()
while nPartId do
local nStat = GDB_ST.ON
local nLayId = EgtGetFirstLayer( nPartId)
while nLayId do
local nEntId = EgtGetFirstInGroup( nLayId)
if nEntId then
nStat = EgtGetCalcStatus( nEntId)
break
else
nLayId = EgtGetNextLayer( nLayId)
end
end
if nStat ~= GDB_ST.SEL then
EgtSetMode( nPartId, GDB_MD.HIDDEN)
else
EgtDeselectPartObjs( nPartId)
if not bCurrPL then
bCurrPL = EgtSetCurrPartLayer( nPartId, EgtGetFirstLayer( nPartId))
end
end
nPartId = EgtGetNextPart( nPartId)
end
EgtZoom( SCE_ZM.ALL)
-- end