From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Reference of the subpanel caller from dynamic value change

Yes I know that I can use queue to transfer information from subVI to Main in this specific case I cannot do that and I need to handle the name through my main....

0 Kudos
Message 11 of 18
(856 Views)

Hello cassaniti,

 

i tried the your last main.vi and i can read out the name from the SubVI, which is correct but the references will be fresh created so the search did not work. Sorry for this, i think you have to life with your workaround to find the right cluster.

best regards
Alexander
0 Kudos
Message 12 of 18
(845 Views)

The owner of a control isn't necessarily the front panel.  Try this:

snip.png

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 13 of 18
(837 Views)

I don't get what you're suggesting me. As I can see from your snippet the reference array and the "Owning VI" reference are not compatible so this does not work..

0 Kudos
Message 14 of 18
(827 Views)

I am sorry to say this, but your question is obviously a result of bad application design. Because of that, the feature you are looking for is not available, as it serves no purpose. If you insist on your approach nevertheless, you have to live with the workaround just like Duffy already pointed out.

 

Why the heck do you implement code, which obviously belongs to the subpanel VI, in the calling VI? That really makes absolutely no sense!

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 15 of 18
(821 Views)

The idea is to resize the subpanel size (and some of the cluster elements) according to the content of the subpanel (the user can show/hide some elements contained in the subVI).

Because some of the subVIs are called more than once (reentrant VI) I need to know which subpanel and cluster changes..

If you have a better system to achieve this I will be glad to adapt my code.

I was thinking to use the queue but I can't get an event when I have a new element in the queue.. or can I?! I am quite new to all the subPanel and queue world but I'm learning..

0 Kudos
Message 16 of 18
(811 Views)

Resizing is a basic functionality of front panel Panes. Design your subVI as such that only a number of panes are visible which shall be resizable. Configure resizing options for controls accordingly (e.g. graphs resize with panes while buttons do not). Be careful when using more than one pane as panes could scale differently when resizing.

You can use splitter bars to generate multiple panes on a single front panel.

Norbert
----------------------------------------------------------------------------------------------------
CEO: What exactly is stopping us from doing this?
Expert: Geometry
Marketing Manager: Just ignore it.
0 Kudos
Message 17 of 18
(809 Views)

1. You "don't get what you're suggesting me"?  It's pretty clear: Don't get the owner of the control, then cast it to a panel, then get the panel's owning VI; because, as I said, the owner of the control isn't necessarily a panel.  Instead, just get the Owning VI from the control reference.

2. The "Owning VI" reference (as its name implies) is a VI reference, and is compatible with an array of VI references.  The reason the wire is dotted is because there'e no source connected.  Try sticking it in your code instead of arguing about it.

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 18 of 18
(796 Views)