Jump to content

Using .NET and getting Error 1172


Recommended Posts

post-7622-1237317801.jpg?width=400



Hello Techies

I wanted to make a reference to a .NET .dll for use in Labview.

I started out by creating a .NET Refnum control and then connecting that to a Property Node. I could see all the properties, but when I ran the VI, I got Error 1172

(see the attachment)

My 2nd idea was to use a Constructor (for the object I wanted), then connect that to the Property Node. Now this seems to work with no error.


My question is:

1) Is there a better way of referencing the dll in my VI other than using a Constructor (...then getting the properties?) or am I doing this correctly with the 2nd idea?


thanks

The Rookie

Link to comment

QUOTE (jaehov @ Mar 17 2009, 12:24 PM)

http://lavag.org/old_files/monthly_03_2009/post-7622-1237317801.jpg' target="_blank">post-7622-1237317801.jpg?width=400

Hello Techies

I wanted to make a reference to a .NET .dll for use in Labview.

I started out by creating a .NET Refnum control and then connecting that to a Property Node. I could see all the properties, but when I ran the VI, I got Error 1172

(see the attachment)

My 2nd idea was to use a Constructor (for the object I wanted), then connect that to the Property Node. Now this seems to work with no error.

My question is:

1) Is there a better way of referencing the dll in my VI other than using a Constructor (...then getting the properties?) or am I doing this correctly with the 2nd idea?

thanks

The Rookie

Nope, that's what you have to do. Unless you're trying to access static methods or properties, you have to instantiate the object with the constructor node before any object exists that has any methods or properties.

Mark

Link to comment

QUOTE (mesmith @ Mar 17 2009, 03:42 PM)

Nope, that's what you have to do. Unless you're trying to access static methods or properties, you have to instantiate the object with the constructor node before any object exists that has any methods or properties.

Mark

ok sounds good. But just out of curiosity, what did you mean by access "static" methods or properties? What Labview controls would I use then?

thanks

J

Link to comment

QUOTE (jaehov @ Mar 17 2009, 12:56 PM)

See this article to start

http://en.wikipedia.org/wiki/Method_(compu...#Static_methods

This also applies to static properties

In LabVIEW, when you browse the pulldown list of methods or properties from the .NET Property or Invoke node, the static members are preceded by . You can use the static methods or properties without first instantiating an object.

Mark

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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.