Loop through tags

A forum devoted to the discussion of all topics having to do with scripting and other advanced programming using iX Developer.
Post Reply
bjornidar
Posts: 49
Joined: Thu Nov 17, 2011 2:10 am
Location: Norway
Contact:

Loop through tags

Post 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.

mark.monroe
Posts: 824
Joined: Tue Mar 13, 2012 9:53 am

Re: Loop through tags

Post 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.
Best Regards,
Mark Monroe

Beijer Electronics, Inc. | Applications Engineer

Post Reply