I have a vi with a boolean loaded into a subpanel. The boolean has a Value Change event handler. I am changing the state of the boolean from my main vi using the Set Control Value method of the vi reference. The value of the boolean changes, but the event handler does not fire. What do I have to do to make this happen?
If you are using LabVIEW 7.0, then use the "Value (Signaling)" property, which will also fire the event. Writing to the "Value" property will not fire an event. If you are not using LabVIEW 7.0, then you will need to find another way of messaging into your event-handler programmatically.
A follow up question. To set the Value(Signaling) property, I got a reference to the Panel, then the Control[]. From there I looped through the control Label.Text property to find the control I was looking for. Is threre an easier way to get a reference to a specific control?
You can right-click on the control and "Create >> Reference", to create a reference constant. The VI containing the control could "register" the reference by passing it to a subVI that caches the reference and allows it to be retrieved by the VI that is setting the "Value (Signaling)" property. Or you could use a global or some other mechanism to store the reference.
It's too bad that there is no VI Method named "Set Control Value (Signaling)". This would make the approach that you're using, a lot easier.