jaehov Posted March 18, 2009 Report Share Posted March 18, 2009 Hello TechiesI 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?thanksThe Rookie Quote Link to comment
Mark Smith Posted March 18, 2009 Report Share Posted March 18, 2009 QUOTE (jaehov @ Mar 17 2009, 12:24 PM) http://lavag.org/old_files/monthly_03_2009/post-7622-1237317801.jpg' target="_blank"> 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 Quote Link to comment
jaehov Posted March 18, 2009 Author Report Share Posted March 18, 2009 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 Quote Link to comment
Mark Smith Posted March 18, 2009 Report Share Posted March 18, 2009 QUOTE (jaehov @ Mar 17 2009, 12:56 PM) 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 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 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.