How to get the GlobalDataItem tag bound to an instance?

A forum devoted to the discussion of all topics having to do with scripting and other advanced programming using iX Developer.
Post Reply
Nicolas2121
Posts: 19
Joined: Fri Apr 12, 2013 11:00 am

How to get the GlobalDataItem tag bound to an instance?

Post by Nicolas2121 »

Hello,

Is it possible to get the GlobalDataItem tag bound to an instance?

For example, I created a view "Screen1" with one alias "Input". I have defined two instances of this view "Inst1" and "Inst2" in which I defined respectively tags "tag1" and "tag2".

At the opening of the first view with "Inst1", I would get the tag "tag1" as "GlobalDataItem.Tags.TAG2" form.

Thank you

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

Re: How to get the GlobalDataItem tag bound to an instance?

Post by mark.monroe »

You can set the value of an Alias like this:

this.Alias1 = 100;

I do not know of a way to get the tag that Alias1 is pointing to. Here is a forum post on how to switch instances in code.
Best Regards,
Mark Monroe

Beijer Electronics, Inc. | Applications Engineer

Nicolas2121
Posts: 19
Joined: Fri Apr 12, 2013 11:00 am

Re: How to get the GlobalDataItem tag bound to an instance?

Post by Nicolas2121 »

Thank you, but I really need to access to get the tag that is pointing to.

ladin79
Posts: 19
Joined: Tue Nov 13, 2012 12:25 pm

Re: How to get the GlobalDataItem tag bound to an instance?

Post by ladin79 »

Hello,
Is it possible to get a value changed event from an alias value?
I mean something like this:
This.Alias1.ValueChange += ValueChanged
Or some other easy way?

Thanks!

andrea
Posts: 72
Joined: Tue Dec 11, 2012 5:44 am

Re: How to get the GlobalDataItem tag bound to an instance?

Post by andrea »

Also we are interested in that.

Because there is no clear statement in the variable, in our case a simple float, and even the get / set builders are not able to hook the event of value change.
Is there any workaround?
For us it would be very useful and important to organize and speed up our developments.

Thank you very much

Post Reply