09-15-2017 07:52 AM
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
09-15-2017 02:41 PM
> Then in LabVIEW, I cast the output to a double array in
1D array or 2D ?
09-15-2017 05:47 PM
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.
09-18-2017 05:28 AM
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.