07-16-2009 08:28 AM
Hello Everyone,
I need to trigger a value change event in a VI using LabVIEW's ActiveX interface.
In order to accomplish this I believe I need to obtain the reference to the control and then use the Value (signaling) property of that control. Does anyone have any insight on how I might obtain the reference to a control via the ActiveX interface?
Any other suggestions on how I can trigger a value change event programmatically are certainly welcome. I have tried the "SetControlValue" invoke function but that doesn't trigger value changes.
Thanks,
Zach
Solved! Go to Solution.
07-16-2009 09:55 AM
07-16-2009 10:44 AM
Thanks for the response.
I neglected to mention that I am calling into an executable. The VI that I am interested in is located within the .exe. Your are right though. I need to get the reference to that VI (the VI server reference, not the ActiveX reference). Once I have that I should be all set. Do you know how I can obtain the reference?
BTW, I'm using LV 8.6.1.
Thanks,
Zach
07-16-2009 12:41 PM
07-16-2009 01:41 PM
Thanks again for the reply.
The problem that I am having isn't utilizing the ActiveX interface. Rather it is that the "GetVIReference" ActiveX call returns a reference to a data type "VirtualInstrument". I doesn't return a reference to the VI that can be used in VI Server. For instance, through the VirtualInstrument reference I am not able to see properties such as "Value (signaling)". Instead I see properties like:
What I really need is a reference that I can use via VI Server.
Thanks,
Zach
07-16-2009 02:07 PM
Hmmm... hadn't realized that the front panel is not exposed in the ActiveX interface. Given that, it seems you won't be able to get a reference to a specific control via ActiveX.
You could cheat. You could create a VI that does precisely what you want to do: get a reference to the control using the VI Server and set the Value (signaling) property. Include the VI in your exe and you can call it using the ActiveX interface. As a VI within the exe it will be able to access the VI that contains the control you want to set, and be able to get a reference to it. All that you would need to do is pass the value to this "cheat" VI via the SetControlValue method that is exposed via ActiveX.
07-17-2009 02:59 PM
Good idea! That did the trick. Thanks.
-Zach
04-23-2017 06:26 AM
Hi,
I am having the same problem. What solution did you come up with? I am fairly new to LabView, can you share a sample VI that uses the cheating method mentioned above?
Cheers