04-30-2010 12:12 PM
I've built an Interop Assembly containing a Labview VI that accepts a .Net object as an input parameter. When I call this method from a .Net application, it's looking for a 'LVReferenceNumber' structure. This structure seems to need an IntPtr structure to my .Net input parameter. It's difficult to find documentation on this subject, and that's as far as I've gotten. Can anyone help me pass a .Net object into a Labview Interop Assembly?
--I'm using .Net 3.5 (Visual Studio 2008) and LabVIEW 2009
Thanks for your help!
05-03-2010 05:47 PM
05-11-2010 10:39 AM
Is there any more information available on this topic? Is there somewhere that I can review the CAR to see if that issue and mine are the same?
It seems like there most be some way to do this because I can do it in TestStand--create the .Net object using a .Net module and then pass it into the Labview VI module.
05-12-2010 11:37 PM
There is not a public way to view the CAR information but a summary of the description follows:
"I created a VI that takes a .NET reference. I then created a .NET assembly using this VI and I noticed that the type of the .NET reference was set to LVReferenceNumber. This prevents me from passing a real .NET object since I don't see how I can create a LVReferenceNumber."
To clarify your last comment, are you saying you can call into the same .NET assembly (created from the VI) through TestStand but not .NET?
05-14-2010 01:05 PM
I take that back--I tried it today. I cannot pass the .NET reference to the Labview assembly or the original Labview VI. Trying to pass an object reference to the Labview assembly in TestStand results in a type conflict. Trying to pass an object reference into the original VI through TestStand does not give an error, but the information is not passed in or out.
05-17-2010 12:12 PM
05-19-2010 12:44 PM
05-20-2010 05:00 PM
07-21-2010 11:26 AM
Hello Alex,
I have been experiencing a similar problem as described above, where my .NET object constructor requires two .NET objects to be passed as parameters (see attached image). Each of the initial objects pictured here (Configuration and Calibration) instantiate without a hitch, but when I attempt to initialize the final object (IQA shown here) the constructor fails with an error 1172, referencing the following message:
"System.NullReferenceException: Object reference not set to an instance of an object."
I expect that the reason for the above error is a similar explanation as your previous response, however I would like to see if any progress has been made on this problem, or whether this issue might be addressed in a future version of LabVIEW (NI-Week 2010???).
Can you tell me if this is the same (or a similar) problem?
Kind Regards,
Ken