Hi,
I try to call LabVIEW VI's from C# using ActiveX/COM, but I am not
successful. I was able to do this from C++ and there are nice articles on
the NI site dealing with the C++ integration.
I tried to follow the instructions of the C# help, using a wrapper for the
LabVIEW application call. I included the TypeLib that I created with the
tlbimp-tool in my project. Basically my code looks like this:
LabView50TypeLib._Application myLV = new
LabView50TypeLib.ApplicationClass() ;
LabView50TypeLib.VirtualInstrument myVI = new
LabView50TypeLib.VirtualInstrument();
myVI = myLV.GetVIReference(
,?,?);
myVI.SetControlValue();
myValue= myVI.GetControlValue();
myLV.Quit();
I even don't know if the fi
rst line is correct. I know that the second line
is not OK, because there is no class "VirtualInstrument" - but from what
class should I derive my instance for the VirtualInstrument? And different
from my C++ implementation, the GetVIReference now needs 3 parameters
instead of 1 (the path).
What am I doing wrong? Does anybody have a working example on this?
Thanks a lot & best regards,
Martin Schellenberger