Page 1 of 1

IX 2.20 - Get a Reference To All Tags (LightWeightTags)

Posted: Thu Oct 29, 2015 1:36 am
by Greg M
As version 2.20 has seriously changed how tags are stored, I can no longer get a reference to a list of all tags using Globals.Tags.GlobalDataItems. Controller Tags now appear to be LightWeightTags and the list is Protected and stored in the GlobalController class.

Two main questions:
How do I get a reference to the GlobalController class?
Is there a public list of tags that would at least give me the names of all the LightWeightTags?

Re: IX 2.20 - Get a Reference To All Tags (LightWeightTags)

Posted: Thu Oct 29, 2015 2:41 am
by Greg M
Ok I now realise that Globals.Tags extends the GlobalController class but for some unkown reason the LightweightTags list is protected so I can't access it.

From what I can see, there is now no EASY way to get a list of all tags.

Re: IX 2.20 - Get a Reference To All Tags (LightWeightTags)

Posted: Mon Nov 09, 2015 1:13 am
by Artaxs
Hi Greg

I'm working on the same topic. So, if I find a solution earlier than you, 'll give you a hint :)!
Until then: good luck!

Chris

Re: IX 2.20 - Get a Reference To All Tags (LightWeightTags)

Posted: Tue Nov 10, 2015 8:44 am
by Greg M
I have a solution but it is messy. If you declare a public static reference to EVERY tag in any script module, it automatically makes them a GlobalDataItem instead of a LightweightTag. You have to rebuild the solution after declaring them.
e.g.
public static GlobalDataItem _tag1 = Globals.Tags.tag1;

I have a C# program that converts the exported tags list to a chunk of c# code as above that declares all the tags, then I copy that into a script module.

Like I said, very messy, it would be much nicer if the list of LightweightTags was public!!