malef Posted April 19, 2010 Report Share Posted April 19, 2010 I am a newbie to .NET We use a .NET DLL and have a public C# structure (public struct) which is defined in the .NET class. Is it possible to generate this structure automatically in LabVIEW? Quote Link to comment
jzoller Posted April 20, 2010 Report Share Posted April 20, 2010 (edited) Possible, yes. Easy... hrm. The "right" way probably involves writing something using .NET reflection to look at the assembly. From there, you could build the structure as a cluster using LV's scripting interface. The, ah, cheap and dirty way probably involves using Redgate's Reflector in command line mode, outputting to a file, and parsing the file for the structure info. You're still going to need to use scripting, though. Overall, it would be very time consuming over just manually doing the work. Joe Z. Edited April 20, 2010 by jzoller Quote Link to comment
jzoller Posted April 20, 2010 Report Share Posted April 20, 2010 Possible, yes. Easy... hrm. The "right" way probably involves writing something using .NET reflection to look at the assembly. From there, you could build the structure as a cluster using LV's scripting interface. The, ah, cheap and dirty way probably involves using Redgate's Reflector in command line mode, outputting to a file, and parsing the file for the structure info. You're still going to need to use scripting, though. Overall, it would be very time consuming over just manually doing the work. Joe Z. On further reflection, you could skip scripting by just using a variant dictionary, map, associative array, or other generic storage. Joe Z. Quote Link to comment
malef Posted April 20, 2010 Author Report Share Posted April 20, 2010 On further reflection, you could skip scripting by just using a variant dictionary, map, associative array, or other generic storage. Joe Z. Joe thx for your sugesstions, being short in time I had to build the cluster manually. Manfred Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.