LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

.NET property not visible

Solved!
Go to solution

Hello,

 

I wanted to try out the Gmap .NET in LabView. I cannot see some properties of the object. I have read there are some issues with generic names, and that I need to create a wrapper.

 

The .NET object can be found here

 

I can place the .NET map object into the .NET container but I cannot access some of its properities. Can someone please say why and what to do about it ?

 

 

 

0 Kudos
Message 1 of 6
(5,037 Views)

Well I assume you know what Generics are? Bascially any datatype that contains <something>. Unfortunatly I couldn't find a quick documention file anywhere for the GMap API, and I do not plan to install it on my system just to check, but if you have methods that use any generic datatype, LabVIEW can not interface to it. Same for constructors that use generic datatypes.

 

And the solution is to write a .Net wrapper for those methods and objects that translates between the generic datatypyes to explicit datatypes. It ain't be pretty but adding support for translation between .Net Generics and LabVIEW strict datatypes would be not just some major work for the LabVIEW developers, but a true hassle for the user too, as there would have to be some extra configuration dialog level when trying to use such objects and the necessary knowledge to operate those dialogs would be at least as large as what you need to write those wrappers.

 

 

Rolf Kalbermatter
My Blog
Message 2 of 6
(5,014 Views)

@rolfk wrote:

Well I assume you know what Generics are? Bascially any datatype that contains <something>.

 


No I do not, but that is perfectly OK, Mr. Google will give answers. I have no knowledge of classes, inheritance or genereic properities or methods.

 

Also there is no documentation for the library. I figured out that there are missing properities based on some tutorials I found (for C# devels) where ppl were accessing properities of an object, that I had a wire to, but the property was missing.

 

I guess the best way to work this, is to learn Csharp and start from point zero.

 

Why is the .NET library called .dll ?

0 Kudos
Message 3 of 6
(4,996 Views)

@Bublina wrote:

Why is the .NET library called .dll ?


Because Microsoft decided so. Why shouldn't it be called .dll, as it is also a Dynamically Loadable Library!

Rolf Kalbermatter
My Blog
0 Kudos
Message 4 of 6
(4,979 Views)
Solution
Accepted by topic author Bublina

Hello, so finally, I found out how to construct generics in LabView Smiley Happy without the need of wrapper !

 

I was trying to do this :

 

List<PointLatLng> list = new List<PointLatLng>();

So the way to do this in labview is to use methods in mscorelib System GetType method + Activator method

 

Look in StackOverflow, there it is described for Csharp.

 

The code in LabView looks like this:

 

snippz.png

 

The example posted is making a strong typed generic for .NET Map window, and indeed... it works (it is a route on map) !

 

maps.png

 

 

 

 

 

 

 

 

 

 

 

Message 5 of 6
(4,913 Views)

I have some confusions regarding the Block Diagram code of Bublina that generated a route on a map. 

1. What is the .NET Constant wired to the GetType method node?

2. What is the .NET Constant wired to the "to more Specific Class" node?

3. How to place System.Collection.Generic.List method node?

4. How to place PointLatLng constructor node?

 

0 Kudos
Message 6 of 6
(1,443 Views)