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.
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.
02-27-2017 04:22 AM
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....
02-27-2017 06:55 AM - edited 02-27-2017 06:55 AM
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.
02-27-2017 07:53 AM
The owner of a control isn't necessarily the front panel. Try this:
02-28-2017 01:23 AM
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..
02-28-2017 02:01 AM
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!
02-28-2017 05:16 AM
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..
02-28-2017 06:07 AM - edited 02-28-2017 06:09 AM
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.
02-28-2017 08:14 AM
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.