jaehov Posted February 2, 2007 Report Share Posted February 2, 2007 Hello All I have a dll that was created in .NET I can open the dll within LV8 and I can see the methods and properties. One of the methods is called "Multiply". Multiply takes 2 inputs (x,y) and then gives a result. x and y are both int32 I input values for x and y , run my program, "RPSTestLibrary.VI" , ...then I get the Error code 1172. "Error calling method RPSTestLibrary.RPSInfo.RPSMultiply of NULL ObjectId, (System.ArgumentNullException: Key cannot be null. Parameter name: key) in RPSTestLibrary.vi" Does anyone know how to fix this error? ~j Quote Link to comment
Jeff Plotzke Posted February 2, 2007 Report Share Posted February 2, 2007 I input values for x and y , run my program, "RPSTestLibrary.VI" , ...then I get the Error code 1172."Error calling method RPSTestLibrary.RPSInfo.RPSMultiply of NULL ObjectId, (System.ArgumentNullException: Key cannot be null. Parameter name: key) in RPSTestLibrary.vi" Can you show us any of the code that you're using? (at least a screenshot?) One thing that I forgot to include in my post yesterday is that you need to call the .NET constructor before you can use the reference. On your block diagram pallette -- Connectivity -> .NET -> Constructor. Use this to create your .NET reference instead of dropping down and using the .NET refnum control on the front panel (You'd use this method to pass the already created refnum to a subVI after you call the constructor to create the refnum). See if the constructor fixes your problem. There's also a few .NET examples with LabVIEW that can give you an idea, too. Quote Link to comment
jaehov Posted February 2, 2007 Author Report Share Posted February 2, 2007 Jeff Problem Solved! .....No more Error 1172 !!! I had to go to the Block Diagram and create a constructor. Once I created the constructor, I then imported the .NET dll. The constructor was then wired to an Invoke Node....exposing the dll methods and properties I attached a word document for viewing pleasure ~jaehov Can you show us any of the code that you're using? (at least a screenshot?)One thing that I forgot to include in my post yesterday is that you need to call the .NET constructor before you can use the reference. On your block diagram pallette -- Connectivity -> .NET -> Constructor. Use this to create your .NET reference instead of dropping down and using the .NET refnum control on the front panel (You'd use this method to pass the already created refnum to a subVI after you call the constructor to create the refnum). See if the constructor fixes your problem. There's also a few .NET examples with LabVIEW that can give you an idea, too. Download File:post-7622-1170452589.doc 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.