Logic Machine Forum
grp.settags usage - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8)
+--- Thread: grp.settags usage (/showthread.php?tid=2833)



grp.settags usage - AlexLV - 07.09.2020

Hi,

grp.settags overwrite existing tag name in group as I found out. Is possible add or remove new tag to existing one, not delete it?

My variant overwriting existing tag name..

Code:
groupvalue = event.getvalue('39/1/10')
if groupvalue == true
  then
  grp.settags('2/0/3', 'lightcntr')
else
  grp.settags('2/0/3', '')
    end

BR,

Alex


RE: grp.settags usage - Erwin van der Zwart - 07.09.2020

Hi,

Yes you can, see:

https://openrb.com/docs/lua.htm#grp.addtags
https://openrb.com/docs/lua.htm#grp.removetags

PS: event.getvalue() does not need a grp address as it fetches the event itself, you only need to do that with grp.getvalue('x/x/x')

BR,

Erwin


RE: grp.settags usage - AlexLV - 09.09.2020

Ervin,

thank you for explanation!

BR,

Alex