Hello,
I have question how to access to control data (for example: AnalogNumeric1.Value) from tag script editor (for example: from function void TagName_ValueChange () ) ?
access from tag script editor to control
Re: access from tag script editor to control
There isn't a way to access screen objects such as analog numerics from other scripts.
You could access other public methods such as the Tags/Script modules from within the screen.
Or hook the TagName_ValueChange event to a function on the screen:
You could access other public methods such as the Tags/Script modules from within the screen.
Or hook the TagName_ValueChange event to a function on the screen:
Code: Select all
}
void Screen2_Opened(System.Object sender, System.EventArgs e)
{
TagName_ValueChange += myTagName_ValueChanged;
}
void myTagName_ValueChanged(System.Object sender, Core.Api.DataSource.ValueChangedEventArgs e)
{
MessageBox.Show(AnalogNumeric.Value);
}
void Screen2_Closed(System.Object sender, System.EventArgs e)
{
TagName_ValueChange -= myTagName_ValueChanged;
}
Best regards,
Russ
(801) 708-6690
Technical Support
Contact Us
Beijer Electronics AB
http://www.beijerelectronics.us
Russ
(801) 708-6690
Technical Support
Contact Us
Beijer Electronics AB
http://www.beijerelectronics.us