01-04-2023 04:09 AM
Hi,
In my project I need to start couple VIs in the background and display them in a subpanel based on user interaction. There is only one subpanel so when I need to display a different subpanel I need to remove the current VI from the subpanel and insert the new one.
The problem I'm facing is that the VIs currently not shown in the subpanel should be aware that they are not in the subpanel to suspend some of their activities. Surely I can solve this problem in several ways (eg: using an FGV, or some sort of a user event), but as when I load a VI to a subpanel then its FP state changes to 'normal' (or maximized etc, so it changes to not 'closed') and when I unload a VI then FP state changes to 'closed' the easy way would be to capture this change as an event.
Is there a way to do that? If so what is it? If not what would be your recommendation to solve this problem?
Thanks.
Solved! Go to Solution.
01-04-2023 04:22 AM
Hi 1984,
@1984 wrote:
If not what would be your recommendation to solve this problem?
Poll the FP state once a second and act upon it…
01-04-2023 09:52 AM
Are you asking about how to know if a running VI is in a subpanel? A trick I found online once is to read the VI property Front Panel >> Resizable, then try to set that property to the same value. If it returns error 1148 then it is in a subpanel. The page online that showed this is now a dead link.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
01-12-2023 08:16 AM
@Hooovahh wrote:
Are you asking about how to know if a running VI is in a subpanel? A trick I found online once is to read the VI property Front Panel >> Resizable, then try to set that property to the same value. If it returns error 1148 then it is in a subpanel. The page online that showed this is now a dead link.
Thanks, this is what I was looking for.