LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I modify the type definitions of "Function Prototype" if I build a .NET interop assembly in LabVIEW 2009?

Solved!
Go to solution

How can I modify the type definitions of "Function Prototype" if I build a .NET interop assembly in LabVIEW 2009?

 

The clusters show up as TD1, TD2, etc..  I would rather give them meaningful names.  I already tried making the cluster a labview strict typedef and typdefs are not disconnected in the build.

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

sketel,

 

Hello! I'm not exactly sure what you are asking. We have documention on Building a Function Prototype and Building a .NET Interop Assembly in LabVIEW. Now, when building a.NET Interop Assembly you can add a VI to the list of exported VIs, once that's been added you can open the Define VI Prototype Dialog Box where you can edit the parameters.

 

Where in this process are you seeing the clusters show up as "TD1, TD2, etc."? Where are these clusters at? (In the VI you are creating into a .NET Interop Assembly?)

 

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Ben Sisney
FlexRIO V&V Engineer
National Instruments
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
0 Kudos
Message 2 of 4
(2,831 Views)

Thanks for responding.  After adding the interop assembly to the global assembly cache, my clusters show up in Visual Studio as classes named TD1, TD2, etc.  If I use multiple clusters in my interop assembly, I can't control the mapping between my clusters and TD#.  This means I have to potentially remap the clusters every time the code is built.  In the prototype dialog box, all clusters are given the type "Cluster" which I cannot edit.  By the way, I'm using strict typedefs for my clusters; that doesn't help.  In my research I came across a workaround for C++ which is to rename the cluster types in the resulting .h file.  Of course this does not work for a .NET assembly.

0 Kudos
Message 3 of 4
(2,824 Views)
Solution
Accepted by topic author sketel

sketel,

 

I did some more testing/research and confirmed your issue and even found a CAR (Corrective Action Request) on the issue. The CAR ID is 204740 and the issue is a known problem with the .NET Interop builder. The current suggested workaround is to create some wrapper code to copy the elements of the TD# types into a newly created type that can be named. I apologize for this bug and will look further for any other information.

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Ben Sisney
FlexRIO V&V Engineer
National Instruments
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
0 Kudos
Message 4 of 4
(2,801 Views)