-- -- 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) -- Imposto direttorio per librerie local sBaseDir = EgtGetSourceDir() EgtOutLog("BaseDir=" .. sBaseDir) 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 WinCreate = require( 'WinCreate') local WinManageProject = require( 'WinManageProject') local WinCalculate = require( 'WinCalculate') -- WDG -- funzioni ---------------------------------------------------------------------------------- local function GetVariableList( sName) local List = {} local nIndex = 1 while WDG[sName .. nIndex] do table.insert(List, WDG[sName .. nIndex]) nIndex = nIndex + 1 end return List end ---------------------------------------------------------------------------------- local function CleanVariableList( sName) local nIndex = 1 while WDG[sName .. nIndex] do WDG[sName .. nIndex] = nil nIndex = nIndex + 1 end end ---------------------------------------------------------------------------------- local function FillVariableList( sName, List) CleanVariableList( sName) for i = 1, #List do WDG[sName .. i] = List[i] end end ---------------------------------------------------------------------------------- local function GetAreaIdsFromNumbers( vAreaNbrs) -- inizializzo la lista local vAreaIds = {} for i = 1, #vAreaNbrs do vAreaIds[i] = GDB_ID.NULL end -- recupero le aree richieste local vStack = { EgtGetFirstNameInGroup( GDB_ID.ROOT, WIN_AREA .. '*')} local i = 1 while vStack[i] do local nAreaNbr = EgtGetInfo( vStack[i], WIN_AREA_NBR, 'i') or -1 for j = 1, #vAreaNbrs do if nAreaNbr == vAreaNbrs[j] then vAreaIds[j] = vStack[i] break end end -- ricerco nelle sue sottoaree local vChildren = EgtGetNameInGroup( vStack[i], WIN_AREA .. '*') vStack = EgtJoinTables( vStack, vChildren) i = i + 1 end return vAreaIds end ---------------------------------------------------------------------------------- local function SetProfilePath() _G.sProfilePath = WDG.PROFILEPATH end _G.SetProfilePath = SetProfilePath ---------------------------------------------------------------------------------- local function WinCreate_ImportProfile() _G.sProfile = WDG.PROFILE if _G.sProfilePath then WinCreate.ImportProfile( _G.sProfilePath .. '\\' .. WDG.PROFILE .. '.nge') end end _G.WinCreate_ImportProfile = WinCreate_ImportProfile ---------------------------------------------------------------------------------- local function FindThresholds( nGrpId) local tThresholds = {} -- array delle soglie -- ogni soglia è una tabella con due chiavi : nType = intero che indica la tipologia ( cfr. WIN_THRESHOLD_TYPES), sName = nome della soglia nel file dei profili local tHash = {} -- scorro tutti i profili del telaio local nCurrId = EgtGetFirstInGroup( nGrpId) while nCurrId do -- verifico se di tipo bottom local nBottomType = EgtGetInfo( nCurrId, WIN_BOTTOM, 'i') or WIN_THRESHOLD_TYPES.NULL if nBottomType ~= WIN_THRESHOLD_TYPES.NULL then -- recupero il nome local vNames = EgtSplitString( EgtGetName( nCurrId), '_') local sName = vNames[#vNames] if not tHash[sName] then table.insert( tThresholds, { nType = nBottomType, sName = sName}) tHash[sName] = 1 end end nCurrId = EgtGetNext( nCurrId) end return tThresholds end ---------------------------------------------------------------------------------- local function GetProfileThresholdsList() local tThresholds = {} if _G.sProfile == WDG.PROFILE then -- se profilo corrente local nProfileGrp = EgtGetFirstNameInGroup( GDB_ID.ROOT, WIN_PROFILE) local nFrameGrp = EgtGetFirstNameInGroup( nProfileGrp, WIN_FRAME) tThresholds = FindThresholds( nFrameGrp) else -- importo temporaneamente il profilo local nLastId = EgtGetLastInGroup( GDB_ID.ROOT) local bOk = EgtInsertFile( _G.sProfilePath .. '\\' .. WDG.PROFILE .. '.nge') local nCurrId = EgtGetNext( nLastId or GDB_ID.NULL) or EgtGetFirstInGroup( GDB_ID.ROOT) while nCurrId do if EgtGetName( nCurrId) == WIN_FRAME then tThresholds = FindThresholds( nCurrId) end -- passo al successivo e cancello il corrente local nOldId = nCurrId nCurrId = EgtGetNext( nCurrId) EgtErase( nOldId) end end WDG.THRESHOLDSLIST = tThresholds end _G.GetProfileThresholdsList = GetProfileThresholdsList ---------------------------------------------------------------------------------- local function GetProfileData( nFrameGrp, nSashGrp) local tData = {} -- a) dimensioni for i = 1, 2 do -- scorro tutti i profili e salvo le dimensioni local sName = EgtIf( i == 1, WIN_FRAME, WIN_SASH) local vProfiles = EgtGetAllInGroup( EgtIf( i ==1, nFrameGrp, nSashGrp)) for j = 1, #vProfiles do local sCurrName = sName .. '_' .. EgtGetName( vProfiles[j]) tData[sCurrName .. '_' .. WIN_DIM_STD] = EgtGetInfo( vProfiles[j], WIN_DIM_STD, 'd') tData[sCurrName .. '_' .. WIN_DIM_MIN] = EgtGetInfo( vProfiles[j], WIN_DIM_MIN, 'd') tData[sCurrName .. '_' .. WIN_DIM_MAX] = EgtGetInfo( vProfiles[j], WIN_DIM_MAX, 'd') end end -- b) overlap -- tra ante e telaio local vProfiles = EgtGetAllInGroup( nFrameGrp) for i = 1, #vProfiles do local dTopOverlap = EgtGetInfo( vProfiles[i], WIN_SASH_TOP_OVERLAP, 'd') local dBottomOverlap = EgtGetInfo( vProfiles[i], WIN_SASH_BOTTOM_OVERLAP, 'd') if dTopOverlap and dBottomOverlap then tData[EgtGetName( vProfiles[i]) .. '_' .. WIN_TOP .. '_' .. WIN_OVERLAP] = dTopOverlap tData[EgtGetName( vProfiles[i]) .. '_' .. WIN_BOTTOM .. '_' .. WIN_OVERLAP] = dBottomOverlap else tData[EgtGetName( vProfiles[i]) .. '_' .. WIN_OVERLAP] = dTopOverlap or dBottomOverlap end end -- tra ante battenti/riceventi local nSashActive = EgtGetFirstNameInGroup( nSashGrp, WIN_SASH_ACTIVE) if nSashActive then tData[WIN_SASH_ACTIVE .. '_' .. WIN_OVERLAP] = EgtGetInfo( nSashActive, WIN_OVERLAP, 'd') end local nSashFrench = EgtGetFirstNameInGroup( nSashGrp, WIN_FRENCH_IN) if nSashFrench then tData[WIN_FRENCH_IN .. '_' .. WIN_OVERLAP] = EgtGetInfo( nSashFrench, WIN_OVERLAP, 'd') end local nSlideActive = EgtGetFirstNameInGroup( nSashGrp, WIN_SLIDE_ACTIVE) if nSlideActive then tData[WIN_SLIDE_ACTIVE .. '_' .. WIN_OVERLAP] = EgtGetInfo( nSlideActive, WIN_OVERLAP, 'd') end -- tra bottomrail local nFrameBottomRail = EgtGetFirstNameInGroup( nFrameGrp, WIN_RAIL_BOTTOM) if nFrameBottomRail then tData[WIN_FRAME .. '_'.. WIN_BOTTOMRAIL .. '_' .. WIN_OVERLAP] = EgtGetInfo( nFrameBottomRail, WIN_OVERLAP, 'd') end local nSashBottomRail = EgtGetFirstNameInGroup( nSashGrp, WIN_RAIL_BOTTOM) if nSashBottomRail then tData[WIN_SASH .. '_'.. WIN_BOTTOMRAIL .. '_' .. WIN_OVERLAP] = EgtGetInfo( nSashBottomRail, WIN_OVERLAP, 'd') end return tData end ---------------------------------------------------------------------------------- local function WinGetProfileData() local tData if _G.sProfile == WDG.PROFILE then -- se profilo corrente local nProfileGrp = EgtGetFirstNameInGroup( GDB_ID.ROOT, WIN_PROFILE) local nFrameGrp = EgtGetFirstNameInGroup( nProfileGrp, WIN_FRAME) local nSashGrp = EgtGetFirstNameInGroup( nProfileGrp, WIN_SASH) tData = GetProfileData( nFrameGrp, nSashGrp) else -- importo temporaneamente il profilo local nLastId = EgtGetLastInGroup( GDB_ID.ROOT) local bOk = EgtInsertFile( _G.sProfilePath .. '\\' .. WDG.PROFILE .. '.nge') local nCurrId = EgtGetNext( nLastId or GDB_ID.NULL) or EgtGetFirstInGroup( GDB_ID.ROOT) local vGrps = {} while nCurrId do table.insert( vGrps, nCurrId) nCurrId = EgtGetNext( nCurrId) end tData = GetProfileData( vGrps[1], vGrps[2]) EgtErase( vGrps) end WDG.PROFILEDATA = tData end _G.WinGetProfileData = WinGetProfileData ---------------------------------------------------------------------------------- local function WinCreate_CreateFrame() local JointList = GetVariableList( 'JOINT') local DimensionList = GetVariableList( 'DIMENSION') WDG.AREAID = WinCreate.CreateFrame( WDG.FRAMETYPE, JointList, DimensionList, WDG.AREANBR) CleanVariableList('JOINT') CleanVariableList('DIMENSION') end _G.WinCreate_CreateFrame = WinCreate_CreateFrame ---------------------------------------------------------------------------------- local function WinCreate_AddSash() local JointList = GetVariableList( 'JOINT') WDG.AREAID = WinCreate.AddSash( WDG.AREAID, JointList, WDG.OPENINGTYPE, WDG.AREANBR) CleanVariableList( 'JOINT') end _G.WinCreate_AddSash = WinCreate_AddSash ---------------------------------------------------------------------------------- local function WinCreate_AddSashGroup() local DimensionList = GetVariableList( 'DIMENSION') local JointList = GetVariableList( 'JOINT') local SashTypeList = GetVariableList( 'SASHTYPE') local OpeningTypeList = GetVariableList( 'OPENINGTYPE') local SashNbrList = GetVariableList( 'SASHNBR') local AreaList = WinCreate.AddSashGroup( WDG.AREAID, WDG.MEASURETYPE, DimensionList, JointList, SashTypeList, OpeningTypeList, WDG.AREANBR, SashNbrList) FillVariableList( 'AREAID', AreaList) CleanVariableList( 'DIMENSION') CleanVariableList( 'JOINT') CleanVariableList( 'SASHTYPE') CleanVariableList( 'OPENINGTYPE') CleanVariableList( 'SASHNBR') end _G.WinCreate_AddSashGroup = WinCreate_AddSashGroup ---------------------------------------------------------------------------------- local function WinCreate_AddHardware() WinCreate.AddHardware( WDG.AREAID, WDG.FAVOURITE, WDG.HANDLE) end _G.WinCreate_AddHardware = WinCreate_AddHardware ---------------------------------------------------------------------------------- local function WinCreate_AddFill() WDG.AREAID = WinCreate.AddFill( WDG.AREAID, WDG.FILLTYPE, WDG.AREANBR) end _G.WinCreate_AddFill = WinCreate_AddFill ---------------------------------------------------------------------------------- local function WinCreate_AddBottomRail() WinCreate.AddBottomRail( WDG.AREAID, WDG.NBR) end _G.WinCreate_AddBottomRail = WinCreate_AddBottomRail ---------------------------------------------------------------------------------- local function WinCreate_AddThreshold() WinCreate.AddThreshold( WDG.AREAID, WDG.THRESHOLDPROFILE) end _G.WinCreate_AddThreshold = WinCreate_AddThreshold ---------------------------------------------------------------------------------- local function WinCreate_AddSplits() local PositionList = GetVariableList( 'POSITION') local AreaList = WinCreate.AddSplits( WDG.AREAID, WDG.SPLITORIENTATION, WDG.MEASURETYPE, PositionList, false, WDG.AREANBR) FillVariableList( 'AREAID', AreaList) CleanVariableList( 'POSITION') end _G.WinCreate_AddSplits = WinCreate_AddSplits ---------------------------------------------------------------------------------- local function WinCreate_AddGridSplits() local PositionListVert = GetVariableList( 'POSITION_VERT') local PositionListHoriz = GetVariableList( 'POSITION_HORIZ') local AreaList = WinCreate.AddGridSplits( WDG.AREAID, WDG.MEASURETYPE, PositionListVert, PositionListHoriz, WDG.STARTVERTICAL, WDG.AREANBR) FillVariableList( 'AREAID', AreaList) CleanVariableList( 'POSITION_VERT') CleanVariableList( 'POSITION_HORIZ') end _G.WinCreate_AddGridSplits = WinCreate_AddGridSplits ---------------------------------------------------------------------------------- local function WinCalculate_SetCalcSolid() WinCalculate.SetCalcSolid( WDG.VALUE) end _G.WinCalculate_SetCalcSolid = WinCalculate_SetCalcSolid ---------------------------------------------------------------------------------- local function WinCalculate_SetSimplifiedSolid() WinCalculate.SetSimplifiedSolid( WDG.VALUE) end _G.WinCalculate_SetSimplifiedSolid = WinCalculate_SetSimplifiedSolid ---------------------------------------------------------------------------------- local function WinCalculate_SetCalcPreview() WinCalculate.SetCalcPreview( WDG.VALUE) end _G.WinCalculate_SetCalcPreview = WinCalculate_SetCalcPreview ---------------------------------------------------------------------------------- local function WinCalculate_CreatePartFromArea() WinCalculate.CreatePartFromArea( WDG.FRAMEID) end _G.WinCalculate_CreatePartFromArea = WinCalculate_CreatePartFromArea ---------------------------------------------------------------------------------- local function WinCalculate_RecalcSolids() WinCalculate.RecalcSolids( WDG.FRAMEID) end _G.WinCalculate_RecalcSolids = WinCalculate_RecalcSolids ---------------------------------------------------------------------------------- local function WinCalculate_AddHardware() WDG.HARDWAREKIT_LIST, WDG.HARDWAREPOSITION_LIST, WDG.HARDWAREOPTION_LIST = WinCalculate.AddHardware( WDG.FRAMEID, WDG.CALC_MACHINING, WDG.CALC_HARDWARELIST, WDG.CALC_POSITIONLIST, WDG.CALC_OPTIONLIST) end _G.WinCalculate_AddHardware = WinCalculate_AddHardware ---------------------------------------------------------------------------------- local function WinCalculate_AddHardwareByGroupId() -- recupero gli id geometrici delle aree richieste local vAreaNbrs = GetVariableList( 'AREANBR') local vAreaIds = GetAreaIdsFromNumbers( vAreaNbrs) for i = 1, #vAreaIds do if vAreaIds[i] ~= GDB_ID.NULL then WDG['HARDWAREKIT_LIST' .. tostring(i)], WDG['HARDWAREPOSITION_LIST' .. tostring(i)], WDG['HARDWAREOPTION_LIST' .. tostring(i)] = WinCalculate.AddHardware( vAreaIds[i], WDG.CALC_MACHINING, WDG.CALC_HARDWARELIST, WDG.CALC_POSITIONLIST, WDG.CALC_OPTIONLIST) end end end _G.WinCalculate_AddHardwareByGroupId = WinCalculate_AddHardwareByGroupId ---------------------------------------------------------------------------------- local function WinCalculate_AddAccessories() WinCalculate.AddAccessories( WDG.FRAMEID, WDG.DRAW) end _G.WinCalculate_AddAccessories = WinCalculate_AddAccessories ---------------------------------------------------------------------------------- local function WinManage_LoadJwd() WDG.AREAID = WinManageProject.ReadFromJwd( WDG.JWD) end _G.WinManage_LoadJwd = WinManage_LoadJwd ---------------------------------------------------------------------------------- local function WinGetImage() -- sistemo la vista EgtSetView( SCE_VD.TOP, false) EgtZoom( SCE_ZM.ALL, false) -- salvo immagine EgtGetImage( SCE_SM.SH, EgtStdColor('WHITE'), EgtStdColor('WHITE'), 1920, 1080, WDG.FILE) end _G.WinGetImage = WinGetImage ---------------------------------------------------------------------------------- local function WinGetSvg() -- sistemo la vista EgtSetView( SCE_VD.TOP, false) EgtZoom( SCE_ZM.ALL, false) -- salvo immagine EgtExportSvg( WDG.GROUPID, WDG.FILE, EEX_FLT.LEV_SYSTEM + EEX_FLT.MODE_STD + EEX_FLT.STAT_OFF) end _G.WinGetSvg = WinGetSvg ---------------------------------------------------------------------------------- local function WinSetAuxGrpStatus() -- recupero il gruppo aux della ferramenta e accessori e assegno stato local nAuxGrp = EgtGetFirstNameInGroup( GDB_ID.ROOT, WIN_AUX) or GDB_ID.NULL EgtSetStatus( nAuxGrp, EgtIf( WDG.AUXSTATUS, GDB_ST.ON, GDB_ST.OFF)) end _G.WinSetAuxGrpStatus = WinSetAuxGrpStatus ---------------------------------------------------------------------------------- local function WinGetSectionsTotalLenghts() WDG.SECTIONS_LENGTHS = {} -- array con le sezioni -- ogni sezione è una tabella con le seguenti chiavi : w = spessore, h = altezza, l = array con le lunghezze dei pezzi di tale sezione -- scorro tutti i pezzi local nPartId = EgtGetFirstPart() while nPartId do local nPartType = EgtGetInfo( nPartId, WIN_PART_TYPE, 'i') or WIN_PART_TYPES.NULL if nPartType ~= WIN_PART_TYPES.FILL then -- recupero il gruppo logs ( per archi) o geo dove sono salvate le dimensioni del pezzo local nLayerId = EgtGetFirstNameInGroup( nPartId, WIN_LOGS) or EgtGetFirstNameInGroup( nPartId, WIN_GEO) or GDB_ID.NULL if nLayerId ~= GDB_ID.NULL then local dWidth = EgtGetInfo( nLayerId, WIN_GEOWIDTH, 'd') local dHeight = EgtGetInfo( nLayerId, WIN_GEOHEIGHT, 'd') local dLen = EgtGetInfo( nLayerId, WIN_GEOLEN, 'd') if dLen then -- verfico se devo aggiornare sezione già presente o se devo aggiungerla local bFound = false for i = 1, #WDG.SECTIONS_LENGTHS do if ( abs( WDG.SECTIONS_LENGTHS[i].W - dWidth) < GEO.EPS_SMALL and abs( WDG.SECTIONS_LENGTHS[i].H - dHeight) < GEO.EPS_SMALL) then bFound = true table.insert( WDG.SECTIONS_LENGTHS[i].L, dLen) WDG.SECTIONS_LENGTHS[i].TotL = WDG.SECTIONS_LENGTHS[i].TotL + dLen end end if not bFound then table.insert( WDG.SECTIONS_LENGTHS, { W = dWidth, H = dHeight, L = {dLen}, TotL = dLen}) end end end end nPartId = EgtGetNextPart( nPartId) end end _G.WinGetSectionsTotalLenghts = WinGetSectionsTotalLenghts ---------------------------------------------------------------------------------- local function WinGetGlassesList() WDG.GLASSES_LIST = {} -- array dei vetri -- ogni vetro è una tabella con le seguenti chiavi : bRect = true se rettangolo/false altrimenti, w/l/t sono le tre dimensioni local nPartId = EgtGetFirstPart() while nPartId do local nFillType = EgtGetInfo( nPartId, WIN_FILLTYPE) if nFillType == WIN_GLASS then local nLayerId = EgtGetFirstNameInGroup( nPartId, WIN_GEO) local bShapeRect = EgtGetInfo( nLayerId, WIN_GLASS_RECT, 'b') or false local dW = EgtGetInfo( nLayerId, WIN_GEOWIDTH, 'd') or 0 local dL = EgtGetInfo( nLayerId, WIN_GEOHEIGHT, 'd') or 0 local dT = EgtGetInfo( nLayerId, WIN_GLASSTHICKNESS, 'd') or 0 table.insert( WDG.GLASSES_LIST, { Rect = bShapeRect, W = dW, L = dL, T = dT}) end nPartId = EgtGetNextPart( nPartId) end end _G.WinGetGlassesList = WinGetGlassesList ---------------------------------------------------------------------------------- local function WinGetSashShape() -- recupero gli id geometrici delle aree richieste local vAreaNbrs = GetVariableList( 'AREANBR') local vAreaIds = GetAreaIdsFromNumbers( vAreaNbrs) -- ricavo le forme for i = 1, #vAreaIds do if vAreaIds[i] ~= GDB_ID.NULL then WDG['SASHSHAPE' .. tostring( i)] = EgtGetInfo( vAreaIds[i], WIN_SASH_SHAPE) end end end _G.WinGetSashShape = WinGetSashShape ---------------------------------------------------------------------------------- local function WinGetAreaProfiles() -- restituisce una lista dove ogni elemento è una tabella con le seguenti chiavi : GroupId = AREANBR corrispondente, EntId = sottoentità ( e.g. anta, area di split a griglia), -- Profiles = lista dei profili dei pezzi di quell'area -- recupero gli id geometrici delle aree richieste local vAreaNbrs = GetVariableList( 'AREANBR') local vAreaIds = GetAreaIdsFromNumbers( vAreaNbrs) -- ricavo i profili local tabProfiles = {} for i = 1, #vAreaIds do if vAreaIds[i] ~= GDB_ID.NULL then local nAreaType = EgtGetInfo( vAreaIds[i], WIN_AREATYPE, 'i') if nAreaType == WIN_AREATYPES.FRAME then table.insert( tabProfiles, { GroupId = vAreaNbrs[i], EntId = -1, Profiles = EgtGetInfo( vAreaIds[i], WIN_AREA_PROFILES, 'vs')}) elseif nAreaType == WIN_AREATYPES.SASH then table.insert( tabProfiles, { GroupId = vAreaNbrs[i], EntId = 1, Profiles = EgtGetInfo( vAreaIds[i], WIN_AREA_PROFILES, 'vs')}) elseif nAreaType == WIN_AREATYPES.SPLIT then local nSplitLayId = EgtGetFirstNameInGroup( vAreaIds[i], WIN_SPLIT) local nSplitType = EgtGetInfo( nSplitLayId, WIN_SPLITTYPE, 'i') -- se french split devo recuperare le ante che definisce if nSplitType == WIN_SPLITTYPES.FRENCH then local vSashes = EgtGetNameInGroup( vAreaIds[i], WIN_AREA .. '*') for j = 1, #vSashes do local nSashId = EgtGetInfo( vSashes[j], WIN_SASH_NBR, 'i') table.insert( tabProfiles, { GroupId = vAreaNbrs[i], EntId = nSashId, Profiles = EgtGetInfo( vSashes[j], WIN_AREA_PROFILES, 'vs')}) end -- se split standard recupero i profili else local bGridSplit = EgtGetInfo( vAreaIds[i], WIN_GRID_SPLIT, 'b') or false if bGridSplit then -- distinguo per ordine di split local nOrder = 0 local vProfiles = EgtGetInfo( vAreaIds[i], WIN_AREA_PROFILES .. tostring( nOrder), 'vs') while vProfiles do table.insert( tabProfiles, { GroupId = vAreaNbrs[i], EntId = nOrder, Profiles = vProfiles}) nOrder = nOrder + 1 vProfiles = EgtGetInfo( vAreaIds[i], WIN_AREA_PROFILES .. tostring( nOrder), 'vs') end else table.insert( tabProfiles, { GroupId = vAreaNbrs[i], EntId = -1, Profiles = EgtGetInfo( vAreaIds[i], WIN_AREA_PROFILES, 'vs')}) end end end end end WDG['AREAPROFILES'] = tabProfiles end _G.WinGetAreaProfiles = WinGetAreaProfiles