LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

get the output from .net dll

Hi Guys,

 

I got a .net dll assembled in Matlab from a colleague.  The inputs are file name and number of arguments. The output is an array of objects. It was first tested in C#, which works well. Then in LabVIEW, I cast the output to a double array in which it should be. It didn't give right reading. I also tried ".net object to variant.vi", it didn't help as well.

I attached the images of C# and LABVIEW code. Let me know your thoughts.

 

Thanks in advance!

Ping

 

Download All
0 Kudos
Message 1 of 4
(2,380 Views)

Then in LabVIEW, I cast the output to a double array in 

1D array or 2D ?

 

 

George Zou
0 Kudos
Message 2 of 4
(2,336 Views)

The output of that function looks like an array of objects.

 

Instead of just converting it to a variant and then converting that, can you just get the value out with a .NET property or invoke node?

 

Even if it's the top level .NET object, you can use the GetType method to find out what it actually is, convert it to that actual type, and then get the value out.

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

Thanks for reply.

I used the GetType method, it only tell it is an array.

There is no .Net property. The invoke method has no output I needed. See the image attached.

Download All
0 Kudos
Message 4 of 4
(2,299 Views)