Showing results for 
Search instead for 
Did you mean: 

Passing a .NET reference from C# to called VI

I have a .NET application written in C#.
I wish to call a LabVIEW VI from my application. I'm using VirtualInstrument.Call to call the VI.
The question:
Has anybody managed to do the same AND pass a .NET object reference to the VI (and maybe also return one)?
I have searched the entire internet for a solution, but with no luck. I will extremely happy if anybody could help me with this.
(I'm using LV8.2 and .Net 2.0)
0 Kudos
Message 1 of 4
Have you tried using the SetControlValue method?  You have the data as "flatted data".  I've never used this, but it seems to be the answer to your problem.

0 Kudos
Message 2 of 4


As I see it the parameter types are just the same as in the Call(2) method? - the value is a Variant and: "The values of parameters can be numeric, Boolean, string, or array." (from LV doc).

So how do you mean a .NET System.Object reference can be flattened (in C#) and passed through a Variant?


0 Kudos
Message 3 of 4
I'm sorry but I have no experience in C#... so I really don't know how you could proceed to flatten the .NET reference.
0 Kudos
Message 4 of 4