01-28-2013 11:00 AM
Hi,
I've tried to get references to frontpanel controls via LabVIEW ActiveX server, equivalent to this LabVIEW code:
but I cant find the ActiveX methods / propertis to use. Is there a way to do this?
/LeifS
Solved! Go to Solution.
01-28-2013 11:05 AM
Well, you are right so far. The output of the Controls[] properety is an array of references to the controls and indicators on the front panel. The thing to remember is that these are generic control references so if you want to do things that are specific to a particular class of control (like set the Strings[] property of a ring) you will need to cast the generic reference to a specific one.
Mike...
PS: Remember to close all your references when you are done with them.
01-28-2013 12:26 PM - edited 01-28-2013 12:38 PM
Well, my question wasn't about how to do it within LabVIEW, but rather how to do the same thing from outside LabVIEW, via ActiveX, from say a C++ program or any other ActiveX compatible language.
I just cant find the corresponding ActiveX properties/methods to do the same procedure as in the picture...
EDIT: According to this thread it seems that this functionality isn't exposed via the ActiveX interface. Correct?
01-29-2013 02:58 AM
The ActiveX Automation Server interface to the LabVIEW VI server only exposes a very small subset to the actual LabVIEW VI server. Basically it is enough to load and execute particular VIs and pass values to front panel controls by their label name, but that is it.
The reason is twofold. When VI Server was introduced in LabVIEW around LabVIEW 5.0 this was mostly the functionality that VI server exposed altogether. There was no scripting at all, and only limited access to the object hierarchy of the frontpanel controls. Even then the ActiveX interface did not expose all methds and properties of the VI server, partly because exposure of LabVIEW internas would have required an extensive ActiveX typelibrary, partly because it was not considered a main concern to be able to do more than launching VIs through it. It was better than the DDE interface already by a long stretch.
VI server was then extended enormously in later releases, but the ActiveX interface was not really changed much, also because Microsoft had announced .Net and declared the ActiveX hype of a few years earlier to be deprecated anyways.