This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Search Group names for string
#8
Thanks for the help with the Tag/Keyword. is it possible to get the level of one of the groups in the tag?

I need to validate against the current level of at least one of the load group's in the room before i change it. I've opted to use a zone number for the tags now as the room numbers for the project are subject to change.


zone = string.match(grptag, 'Z(%d)') -- get zone number from c-bus tag name ("Sensor Z1" -> "1")
objs = grp.tag('Z'..zone) -- find all objects with keyword Z"x" where x is zone variable number

if [one of the load groups in tag Z1]==124 then -- check if a load in tag Z1 is at 124, if a load is at 124, set all objects with tag Z1 to 255. if its at another level ( like a scene or custom level, end)
objs:write(255)
end

^ this is where i need to validate against the current level. i can either loop through each load group and validate each one individually or just pick one main load in the room to validate against. If its not to much trouble would you mind providing an example on looping through each group in the tag, and also picking just 1 load group out of the tag to validate against? I'm a little stuck on this, and id like to explore both options.
Reply


Messages In This Thread
Search Group names for string - by Diggerz - 26.07.2020, 07:52
RE: Search Group names for string - by admin - 27.07.2020, 05:55
RE: Search Group names for string - by admin - 27.07.2020, 09:18
RE: Search Group names for string - by Diggerz - 01.08.2020, 09:46
RE: Search Group names for string - by admin - 03.08.2020, 06:44

Forum Jump: