Jump to content

Error 1172 when running .NET dll in LV8


Recommended Posts

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

Link to comment
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.

Link to comment

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

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.