LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to get any control reference?

Hi everyone,

 

I want to get any control's reference when click the mouse button on any control.(Front Panel includes hundreds of different types of control.) Actually, I found method using "register for event:mouse down value source". This solution is fine working.

 

reference.png

But I don't want to use this method. Please Can you suggest any other method ?

 

Thanks for answer...

 

Himmet GENCER
Software Development Coordinator at TDG
himmetgencer@gmail.com

View Himmet Gencer's profile on LinkedIn

View on Instagram
0 Kudos
Message 1 of 8
(3,949 Views)

There is a property of the front panel of a VI that returns all controls of a front panel.  You can register for all controls on a front panel and then the same event will be generated for any control.  Drop down a property node of type VI, get the front panel reference, then use another property node to get all controls.

 

I also made an XNode to help getting references of a specific type, or with a specific label.  Say get all controls that start with Boolean.

 

https://lavag.org/files/file/260-find-references-xnode/

 

Be sure and pay attention that XNodes are experimental.

 

Oh and using the hidden gems you can get a reference to an object based on its label.  Using this you could iterate over an array of labels to get.

0 Kudos
Message 2 of 8
(3,931 Views)

Using a couple of property nodes, you can get an array of references for all of the controls on a front panel.  From there, just register the array.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 3 of 8
(3,924 Views)
Hi, Thanks for answers, I know this solution, but I dont use this method.(reg event). Can you suggest any other solution?
Himmet GENCER
Software Development Coordinator at TDG
himmetgencer@gmail.com

View Himmet Gencer's profile on LinkedIn

View on Instagram
0 Kudos
Message 4 of 8
(3,906 Views)

If your solution is working fine, then why do you not want to use it?

0 Kudos
Message 5 of 8
(3,877 Views)
The solution is working fine on Pc. But the solution is not working when this VI(reentrant vi) published for web request on browser( using web publishing tool). You can try it on my example vi(getControlReference.vi). So I need other solution.
Himmet GENCER
Software Development Coordinator at TDG
himmetgencer@gmail.com

View Himmet Gencer's profile on LinkedIn

View on Instagram
0 Kudos
Message 6 of 8
(3,843 Views)
Hi,

Please, Can you suggest any other method ?
Thanks for answer.

Best Regards...
Himmet GENCER
Software Development Coordinator at TDG
himmetgencer@gmail.com

View Himmet Gencer's profile on LinkedIn

View on Instagram
0 Kudos
Message 7 of 8
(3,784 Views)

Hi Himmet,

 

I am sorry that you are having trouble with using control references. Can you explain in more detail why the above solutions do not work in your application?

0 Kudos
Message 8 of 8
(3,710 Views)