LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

.net function returns a system.string refnum in lV 7.1

Hi-

 

I'm in LabVIEW developer heaven and hell.  the heaven is that I have the instrument vendor trapped in my lab while we troubleshoot the LV automation interface. Bwahahaha.  The hell is that the interface is .net.  I love .net and I love labview, but I've had some very tough times troubleshooting the interface between them.

 

Todays's crisis:

I call a function from a .net dll and it returns an XML string.  In LV 7.1, the value is of a system.string data type.  This is not supposed to happen.  As I understand from reading here, the system.string should be converted by labview and returned as a native LV string type.  In LV 8.2 the return value is (correctly) a native LV string:

 

LV 8_2 string data type.jpg

 

I can certainly upgrade the LV 7.1 to something newer, but the vendor is better served by developing the driver vi's in v7.1, so I would really like to give this a solid effort.

 

so,  two questions;

1) Is there a bug in LV7.1 and perhaps a work-around someone can recommend?

2) what can I do woth the system.string refnum?  If I wire it to an invoke or property node, no methods or properties show up.

 

Thanks in advance for any help.

 

Cheers,

Dave

 

0 Kudos
Message 1 of 4
(2,888 Views)

I did not find any bug yet referencing this.  I can continue to look into whether this is listed in our records.

 

As for what you are able to do with a system.string refnum, I am not completely familiar with it, but I doubt there is a whole lot we can do since it is not a LabVIEW native datatype.  As you mentioned, it should have converted it to a LabVIEW string. 

 

I will do some research on this and update you if I find some more information.

Tejinder Gill
National Instruments
Applications Engineer
Visit ni.com/gettingstarted for step-by-step help in setting up your system.
0 Kudos
Message 2 of 4
(2,861 Views)

Thanks for checking!

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

What version of .NET are you using and what version of .NET was the assembly written in? You should be aware that LabVIEW 7.1 had limited support of .NET and .NET 2.0 wasn't actually supported in a meaningful way until 7.1.1f2.

0 Kudos
Message 4 of 4
(2,846 Views)