10-17-2013 11:33 AM
I want to do the following. Not sure what's the best way to go about it. I have 2 .NET DLL that my LabVIEW program uses. The program determines which DLL to use by looking at the value of a boolean. My questions.
1. How do I use which DLL to load at run time?
2. Some labview code is only applicable to one DLL and not the other, would there be an error?
10-17-2013 01:44 PM
Personally I'd create two separate LabVIEW classes which mirror the .NET components. At run-time you load the desired class, which then loads the corresponding .NET component. I don't think there's any way you can avoid duplicating code for the two different DLLs, although I haven't tested to see whether LabVIEW can handle .NET class inheritance (assuming that your two .NET components either inherit from the same class or implement the same interface). I also don't know how you could attempt to call a non-existent method on a .NET class in LabVIEW, I think you'll get an error at edit-time.