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.
Obtain object name and tag
-
- Posts: 824
- Joined: Tue Mar 13, 2012 9:53 am
Re: Obtain object name and tag
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;
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;
Best Regards,
Mark Monroe
Beijer Electronics, Inc. | Applications Engineer
Mark Monroe
Beijer Electronics, Inc. | Applications Engineer