Page 1 of 1

Loop through tags

Posted: Wed Aug 21, 2013 3:08 am
by bjornidar
Hi,

I was wondering if there's poosible to loop through the tags on one spesific controller.
Lets say I have a controller Q61 with 100 tags, is it possible to loop through these?
For instance with a foreach(string tag in Globals.Tags()) ? <- this code is not working.

Re: Loop through tags

Posted: Mon Aug 26, 2013 8:23 am
by mark.monroe
You should look at this forum post on how to dynamically reference tags in C#. I think you are going to have to setup a naming convention, as I do not know how to get tags that are associated with a specific controller. If you name all the tags that are associated with a specific controller by the same prefix, you can then just loop through those tags.