02-23-2010 07:49 AM
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.
Solved! Go to Solution.
02-24-2010 12:14 PM
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?)
02-24-2010 12:32 PM
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.
02-25-2010 01:53 PM
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.