Page 1 of 1

Obtain object name and tag

Posted: Fri Apr 12, 2013 11:28 am
by Nicolas2121
Hi,

I have some questions about scripting in Beijer Environment.

- How to obtain the property name of an object on event ? For example, when I have a button named "ButtonName", I always have "m_ButtonName" in return. How to have the real name "ButtonName" ?

- How to obtain the Tag name of an AnalogNumeric object and create event on this tag value change ?

- Finally, in the context of previous questions, how to access at a grouped object properties ?
I have a couple of grouped objects composed of an AnalogNumeric and Button. By script, I want to change the Button text according with the AnalogNumeric tag value.

Thank you for your responses.

Re: Obtain object name and tag

Posted: Fri Apr 12, 2013 12:08 pm
by mark.monroe
if you open up a script window in iX Developer and press F1, it will tell you the properties that are available for a give object.

There is a script window available on the Tags tab in the lower left hand corner of the tab. There you can use the ValueChange event to fire code when a Tag's value changes.

If you wanted to change the AnalogNumeric box text of a grouped object, you would just access the objects properties. Not the properties of the group, but of the particular object you are interested in. Groups are just used to make life easier for the UI designer when they drag them around on the screen.

Like this:
this.AnalogNumeric1.MaxValue = 12;