27.10.2021, 11:09
Hello,
I'm pretty new to LogicMachine and I got one simple issue I'm trying to fix.
My goal here is to add a tag to a lot of objects. To be more precise, I would like to add the tag 'ENSLG_LOGS_CLIENT' to all the objects wich address start with '1/*/*'
So far I have found this script :
*******
ListeObjets={} ---Liste contenant les strings des adresses des objets (ex: {'1/1/1','1/1/2'})
ListeTags={} ---Liste de strings contenant les tags (ex: {'ENSLG_MA', 'PMA0'}, {'PMA0'})
for i, obj in ipairs(ListeObjets) do
grp.addtags(obj,ListeTags)
end
script.disable('Ajouter tags à des objets')
********
This script adds all the tags in 'ListeTags' to the objects which addresses are referred in 'ListeObjets'
I would like to be able to apply the tags to all the objects with their addresses starting with '1/*/*' rather than typing each addresses myself in 'ListObjets'
I thought of using a for loop to increment the adresses, but as I've just started using LogicMachine I'm not confortable with the scripting and I could really use a hand.
Thanks for reading me !
Matthieu Papillon
I'm pretty new to LogicMachine and I got one simple issue I'm trying to fix.
My goal here is to add a tag to a lot of objects. To be more precise, I would like to add the tag 'ENSLG_LOGS_CLIENT' to all the objects wich address start with '1/*/*'
So far I have found this script :
*******
ListeObjets={} ---Liste contenant les strings des adresses des objets (ex: {'1/1/1','1/1/2'})
ListeTags={} ---Liste de strings contenant les tags (ex: {'ENSLG_MA', 'PMA0'}, {'PMA0'})
for i, obj in ipairs(ListeObjets) do
grp.addtags(obj,ListeTags)
end
script.disable('Ajouter tags à des objets')
********
This script adds all the tags in 'ListeTags' to the objects which addresses are referred in 'ListeObjets'
I would like to be able to apply the tags to all the objects with their addresses starting with '1/*/*' rather than typing each addresses myself in 'ListObjets'
I thought of using a for loop to increment the adresses, but as I've just started using LogicMachine I'm not confortable with the scripting and I could really use a hand.
Thanks for reading me !
Matthieu Papillon