LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Call static function of .NET class in LabVIEW 8

As far as I can see, one can only invoke functions on .NET object instances from within LabVIEW. But what about static members of a class?
The System.Messaging.MessageQueue class e.g. has a static Exists() function to verify the availability/existence of an MSMQ message queue on the target machine. In C# a code line like

if (MessageQueue.Exists(@".\Private$\myOwnQ")) {...}

will do the job.
How to achieve the like in LabVIEW?

Thanks for any advise,
greets

Hans-Juergen Philippi
0 Kudos
Message 1 of 3
(2,604 Views)
No problem - just drop down the invoke node from the .NET palette. Then right click on the top-left terminal (the input refnum) and say Select->Class.
 
Also note that you can also invoke static methods if you have an instance - we know it's static and ignore the instance value passed in on the refnum. But if you don't have an instance, the above trick get's you going.
Message 2 of 3
(2,595 Views)
Geee... that's what one should call "not seeing the wood for the trees".
Thanks for the quick and helpful response!
 
Hans-Juergen Philippi
0 Kudos
Message 3 of 3
(2,582 Views)