02-16-2023 06:57 AM
Hello,
I have created 2 VIs, one to test "pause and continue" conditions and the other just to call the first one into a subpanel. Even though the position of the "pause and continue" VI is set to (0,0) when called into the subpanel it is always shifted. Can't seem to find a solution even after I have manually entered all position and locked them.
I am attaching 2 pictures and the VIs so that it can be understood better, the VIs are saved as LabVIEW2012 format. Thanks in advance.
Cheers,
Diural
Solved! Go to Solution.
02-16-2023 07:10 AM
Hi Diural,
@Diural wrote:
Even though the position of the "pause and continue" VI is set to (0,0) when called into the subpanel it is always shifted. Can't seem to find a solution even after I have manually entered all position and locked them.
There are two steps needed:
You only solved step 1, but missed step 2!
02-16-2023 10:04 AM - edited 02-16-2023 10:05 AM
02-16-2023 10:14 AM
@altenbach wrote:
This might help for step #2 too:
I didn't know that was an option. I've seen so many VIs that dynamically set their panel to the origin I figured that was the only way to do it.
02-16-2023 11:17 AM
Well, I learned "another way to make Front Panels fit in a sub-Window". When I was first introduced to LabVIEW, my mentor told me about "OpenG" that was available from a group called "LAVA" (which stands for LabVIEW Advanced Virtual Architects). Inside this was a function called ".Fit VI Window to Largest Decoration".
So in the VI that I want to make "appear" in a sub-Panel, I put a Flat Frame decoration around the part I want to appear. I put the OpenG function as the first one to be called in the VI. I also make sure that theFi size of the Decoration matches the size of the subPanel (easiest way to do that iVI s to run the VI to make it size properly, then drag the Front Panel on top of the main VI with its sub-Panel and be sure the frames are the same size).
All done. Now when my main VI loads my sub-VI into its sub-Panel, I know it will fit when I ask it to run.
Indicentally, the OpenG Toolkit, which contains the OpenG Application Control Palette (with the Fit Window to Decoration function) can be found on the LabVIEW Tools Network, courtesy of VIPM.
Bob Schor
02-16-2023 01:08 PM
@Jacobson-ni wrote:
@altenbach wrote:
This might help for step #2 too:
I didn't know that was an option. I've seen so many VIs that dynamically set their panel to the origin I figured that was the only way to do it.
It was new in 2019 (We need to uncouple the "edit mode" FP size from the "run mode" FP size).
02-17-2023 02:34 AM
Thank you everyone for all your answers,
I can't seem to solve the problem nonetheless unfortunately and will need you help once again. I will try to give even more info and attach my files once again with minimal changed compared to the previous ones. I have 2 VIs, the first one is the main VI which calls the second VIs using "insert VI property node".
Answer to GerdW:
I have tried both steps you have mentioned; the main VI's subpanel is located at (0,0) and the subVI's tab control is located at (0,0) thus should come up at (0,0) when called, I have even tried shifting the subVI's tab control a little bit to avoid controls being on top of each other that might create this shifting automatically. Am I doing something wrong? I have tried many things (That i don't even remember half of it) but could not get the result I was looking for. Am I using the panes that you have mentioned wrong maybe?
Answer to AltenBach:
I have tried this after I have tried what GerdW have suggested and nothing has changed, thank you for the contribution but if you have another solution and anything that comes to your mind I will highly appreciate.
Answer to Bob_Schor:
Thank you for the detailed answer friend! The only downside is that I don't think that I should use an "addon" perse because I will am creating an application that might be tossed around as source code and I don't want to create chaos where many (non LabVIEW users) has to download something to be able to work with the app (If you work somewhere with many departments that specialises in different areas you would get what i am implying :D)
I am looking forward to any kind of answer, Cheers,
Diural
02-17-2023 03:21 AM
Hi Diural,
@Diural wrote:
Answer to GerdW:
I have tried both steps you have mentioned; the main VI's subpanel is located at (0,0) and the subVI's tab control is located at (0,0) thus should come up at (0,0) when called, I have even tried shifting the subVI's tab control a little bit to avoid controls being on top of each other that might create this shifting automatically. Am I doing something wrong? I have tried many things (That i don't even remember half of it) but could not get the result I was looking for. Am I using the panes that you have mentioned wrong maybe?
When I open your subVI from first message then the tab itself is located at the pane origin. But the pane origin is NOT in the upper left corner of the frontpanel:
Move the pane origin to the upper left corner of the frontpanel!
02-17-2023 04:31 AM
Thank you!
This forum has shown me that I need to look even deeper to find a solution, and even though I did it for this problem once again the solution was actually an easy one. Waow, thank you very much! Take care!
Cheers,
Diural
02-17-2023 09:27 AM
@crossrulz wrote:
@Jacobson-ni wrote:
@altenbach wrote:
This might help for step #2 too:
I didn't know that was an option. I've seen so many VIs that dynamically set their panel to the origin I figured that was the only way to do it.
It was new in 2019 (We need to uncouple the "edit mode" FP size from the "run mode" FP size).
Totally missed this feature too 😮
I wonder if I should go back and update my dialog type vi's 🤔