LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

.net remoting examples

I'm new to this, so pardon inaccurate lingo. I'm trying to access the methods in a .net assy using a System Activator node with a URL, as shown in my attached picture. The problem is I cannot see the methods in my Object node. I suspect it's because I'm not really sure what to do with the URL input in the Activator. Any suggestions, or perhaps does anyone know of any downloadable working examples along these lines.






0 Kudos
Message 1 of 8
(3,972 Views)
 

Hi Jim77215,

Thanks for contacting National Instruments.  I have been looking over your question and have a couple of suggestions for you.  First, it looks like you are closing your reference to the assembly before trying to access the methods that are a part of that class.  Also, we usually recommend using the Constructor Node for accessing an assembly.  After looking at your picture that you posted, there doesn't appear to be any kind of reference going into your Activator Node, which could be causing a problem for you.  I think a really good place for you to start will be to look at the attached link and read through it.  The document goes through some of the steps and basics of using .NET inside of LabVIEW.  I hope some of this helps and good luck with your application!

https://www.ni.com/docs/en-US/bundle/labview/page/using-net-with-labview.html

Regards

Noah R
Applications Engineering
National Instruments
0 Kudos
Message 2 of 8
(3,917 Views)
The labview code example, shown in that picture, came from National Instruments phone support, Reference#7166764.
0 Kudos
Message 3 of 8
(3,902 Views)
Thanks for the response!  I was looking at your service request that you referenced earlier, and I noticed that you also had another one with the number 7168914.  I noticed that it appeared from the communication between you and the engineer helping you that you were supposed to receive a modified version of the code and I was curious if you did receive that and actually try that one, or if this is the one that you referenced in your first post.  Also, it appears in your code that something that may be occurring is that you may need to use the "To More Specific Class" VI for your Object that you are using and that could be why you do not see any Methods showing up.  When using this VI, you can create a constant for the "target class" input and then select the appropriate .NET class for it.  Please try this out and see if that helps you out any with your question.  If you do continue to have some questions, please feel free to post back and we can go from there.  Thanks and have a good holiday!
Regards

Noah R
Applications Engineering
National Instruments
0 Kudos
Message 4 of 8
(3,863 Views)
Thank you Noah. I tried the To More Specific Class, and, yes, that did allow me to view the Methods for the instrument that was specified. So from that standpoint I've moved on to the next problem. Now I'm getting error 1057 when I run, which is a type mismatch for To More Specific Class. I was wondering if you could look at the code I've attached in a picture. I've also included in the picture the snippet of VB code that works (note: the VB code is for the receiver, not the generator instrument but its all the same concept). Perhaps from the picture you will see something right off that is wrong.
0 Kudos
Message 5 of 8
(3,835 Views)
Oops, sorry Noah, wrong picture. Attached is the picture of code I meant you to see
0 Kudos
Message 6 of 8
(3,832 Views)
We were able to figure the .net remoting issue out here at work. Thanks much for the NI help in getting us most of the way there. I've attached a picture of the winning code in case your interested.

0 Kudos
Message 7 of 8
(3,780 Views)
That's great to hear! Thanks for giving us the update and attaching the solution.
0 Kudos
Message 8 of 8
(3,751 Views)