LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

create .NET assembly

Solved!
Go to solution

As a learning exercise, I am trying to use Visual Basic 2008 Express to convert a .NET web service into a .NET assembly for LabVIEW 7.1.

I followed the steps at http://digital.ni.com/public.nsf/allkb/DC2D2A5D64A485F686256D3F005EFB6

but I am not getting the .dll file with the constructor and methods I am expecting.

 

The webservice is located at http://www.webservicex.net/WCF/ServiceDetails.aspx?SID=19

 

I have attached the dll file I get. You'll have to rename it. Any pointers appreciated. 

 

0 Kudos
Message 1 of 7
(4,118 Views)
Unless you explictly changed the target runtime, VB.NET 2008 targets .NET 3.5. I don't believe LabVIEW 7.1 supports .NET 3.5. It barely supports .NET 2.0, and that's only with the fix.
0 Kudos
Message 2 of 7
(4,108 Views)

Yep, you are right. VB2008 won't even support 1.1 .NET Framework.

 

I have located a PC with LabVIEW 8.5.1 installed and 3.5 .NET Framework. And LabVIEW still does not see the constructor and methods I expect, eg a constructor and methods to supply the stock symbol and return price.

Message Edited by nyc on 03-23-2009 02:44 PM
0 Kudos
Message 3 of 7
(4,104 Views)
Solution
Accepted by topic author nyc_(is_out_of_here)

nyc wrote:

Yep, you are right. VB2008 won't even support 1.1 .NET Framework.

 

I have located a PC with LabVIEW 8.5.1 installed and 3.5 .NET Framework. And I am still not getting the constructor and methods I expect, eg a constructor and methods to supply the stock symbol and return price.


 

smercurio was rather implying that LabVEIW will have trouble with .Net 3.5 which is the version used by VB2008 and that it barely supports .Net 2.0. So what he was trying to say is that in order to create a .Net component for LabVIEW it may be benefecial to try an erlier version of VB such as VB2005 or maybe VB2007,

 

Rolf Kalbermatter

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 4 of 7
(4,100 Views)

Ahhhhh. The light bulb just went on.

 

Thanks. I will give that a try. 

0 Kudos
Message 5 of 7
(4,092 Views)

Actually, I was referring to 7.1. I've only seen anectodal "evidence" that you can extend the spotty support of .NET 3.5 to newer versions of LabVIEW as well. Wouldn't surprise me, though.


nyc wrote:

I have located a PC with LabVIEW 8.5.1 installed and 3.5 .NET Framework. And LabVIEW still does not see the constructor and methods I expect, eg a constructor and methods to supply the stock symbol and return price.


Well, I was able to load the assembly with my computer which is running 8.2 and has .NET 3.5 (as well as 2.0). I can see the constructors, but I have no clue as to how you're supposed to use the assembly. 

 

 

 

0 Kudos
Message 6 of 7
(4,089 Views)

Thank you both.

 

1.) I tried targeting VB 2008 to use 2.0 .NET Framework; instructions found at http://www.codeproject.com/KB/dotnet/targetnet2fromvs2008.aspx

2.) Followed the directions in the NI KB that I linked in my first post.

3.) Opened up LabVIEW 8.5.1 and called the .NET assembly file created in Step1 (which I had named Stockquote.dll). Looked in the getweather.vi at  http://sine.ni.com/devzone/cda/epd/p/id/861 to learn how to do the calling.

 

Everything works!

0 Kudos
Message 7 of 7
(4,079 Views)