I am researching the opportunity to create a dynamically populated list box based on this sample program, however I'd like to call the function when a specific tag becomes true instead of when pressing a button.
Is there a way to do either of these options:
- Call a function from the screen script from the Tags script, or
- Detect the value change of the trigger tag from the screen script
Code: Select all
void TrigUpd_ValueChange(System.Object sender, Core.Api.DataSource.ValueChangedEventArgs e)
{
// MessageBox.Show("Value change code executed");
// Call code to update listbox from tag
}
Code: Select all
public void GetArrayFromTag()
{
// MessageBox.Show("Listbox update code executed");
// Code to update listbox from tag
}
Thanks in advance. Let me know if you need additional information or access to the project.