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

A forum devoted to the discussion of all topics having to do with scripting and other advanced programming using iX Developer.
Post Reply
Greg M
Posts: 16
Joined: Tue Sep 08, 2015 1:32 pm

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

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

Greg M
Posts: 16
Joined: Tue Sep 08, 2015 1:32 pm

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

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

Artaxs
Posts: 10
Joined: Tue Nov 06, 2012 7:02 am
Location: Switzerland

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

Post 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

Greg M
Posts: 16
Joined: Tue Sep 08, 2015 1:32 pm

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

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

Post Reply