LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Features missing from .NET?

It seems that features of Microsoft's .NET, listed at MSDN, are missing in Labview. For example, I am looking for the UTF8Encoding class (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemtextutf8encod...), but System.Text is nowhere to be found. Am I missing part of the .NET installation, does labview not support (large) parts of .NET, or is there another explanation?
 
(What I want to achieve is a conversion from UTF8 to a Labview string and vice versa).
 
Martin
0 Kudos
Message 1 of 7
(3,581 Views)
.NET is not something NI does implement. They only give you the functionality to access .NET functionality. If certain .NET assemblies seem not to be available on your system then they are not installed or not properly registered.

Rolf Kalbermatter
Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 2 of 7
(3,578 Views)
Found it! I selected "Select contructor..." from the .NET constructor, then "Browse..."d to C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322 and selected mscorlib.dll. This countained the System.Text class. With a UTF8Encoding constructor, I then used the GetString[1] method to convert.
 
For some reason mscorlib.dll was not registered by labview or something like that? Can I do that manually?
 
Martin
0 Kudos
Message 3 of 7
(3,577 Views)
LabVIEW does not register .Net components nor Active X components. That is the task of the installer of those components. LabVIEW just enumerates the regustry entries and gives you whatever it finds in there. If it is not in there or inconsistent LabVIEW will not show it to you. You will need to get back in your .Net installer. That said the unicode.llb library in the other thread you have posted to would basically do everything you need with only minor tweaks to get it working for UTF8.

Advantage would be that it works on any Windows system since Windows 98 without the need for any .Net installation. .Net is only natively supported under XP as far as I know and you probably can get it installed under 2000 as well although it seems a real hassle to get this done, but that is a huge limitation in prospective platforms IMO.

Rolf Kalbermatter
Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 4 of 7
(3,569 Views)
For reasons I don't know Microsoft didn't put the mscorlib assembly into the GAC - only into the Framework install directory. Since we auto-populate the list of assemblies with everything in the GAC, the mscorlib didn't show up. They have changed this in .NET 2.0 - mscorlib is now in the GAC.
 
You can simply add the assembly to the list of private assemblies (Tools->Advanced->.NET Assembly References). It then will show up everytime in the constructor dialog.
 
Also - watch out for static methods. When you have created an instance of the object you can access both static and instance methods of the object. However, some .NET classes cannot be constructed - they have private constructors and all their methods are static. In this case they don't show up in the constructor dialog. You'll just need to drop the invoke node, right click on the input refnum terminal and select the class you want.
0 Kudos
Message 5 of 7
(3,560 Views)
I bring this back up, I can not find system.text in labview 8.5

Paul
0 Kudos
Message 6 of 7
(3,289 Views)
Nevermind ... in the aforementioned dir...v2.0.50727

Paul
0 Kudos
Message 7 of 7
(3,287 Views)