Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

parameters in LabView VI at runtime

Hi
  I am new to LabView. I am working on an application that can load and run any VI.
 
 I am trying to run a VI from C# application. Given the VI name, how do i find out what all parameters the VI has?

lv =

new LabVIEW.ApplicationClass();

//Set the path to the VI

 

string vipath= "c:\\temp\\arith.vi";

//Get reference to that VI

vi= lv.GetVIReference(vipath,"",

true,0);

Before calling , vi.Call(ref param1,ref param2);

I want to get the param info from the VI itself,  instead of hard coding in the application code.

thanks

 

 

0 Kudos
Message 1 of 4
(3,490 Views)

Hi Sruthi,

I am not sure if I am understanding the question correctly.   As far as I understand, you are trying to call a VI in .NET and you are able to ge a  VI reference but you want to know what are the inputs to the VI so you could pass values for those inputs? Am I correct ? Please clarify.

Regards,

Ankita 

0 Kudos
Message 2 of 4
(3,458 Views)

Yes.I found my answer.I am calling ExportVIStrings which generates a text file with all the controls used in the VI. I use this info to find out the list of input and output parameters.

But,  i have another problem now. How do i pass values for cluster data type, from a C# code?

thanks

 

0 Kudos
Message 3 of 4
(3,450 Views)
I got the answer for the  cluster data type question also. Thanks to http://detritus.blogs.com/lycangeek/2005/09/calling_lv_from.html.
0 Kudos
Message 4 of 4
(3,443 Views)