11-04-2014 06:35 PM
Hello,
I am upgrading an old project which has several subvis that pop-up if clicked on something asking for more information or confirmation during the operation by the user.
I want to make them look better and manintain consistent front panels with company logos and apprerance, how can programatically find and list all the subvis that are going to be open as pop-up so i can beautify them,
i dont care about the other subvis in the background that dont open-up.
Thanks
11-04-2014 06:51 PM
I have not tried this but there is a front panel property Front Panel Window: Behavior. Outputs include Floating and Modal among others. You could write a VI which gets references to all VIs in memory and loops though them checking this property.
Lynn
11-04-2014 07:18 PM
You could also use VI property>>execution>>show front panel on call.
"Popups" are ofter a small message box, etc. so you might want to filter by vi property>>front panel window>>bounds to exclude the full-screen main VIs.
You may want to exclude VI's in memory whose owning VI is vi.lib or ends in .llb.
11-04-2014 08:30 PM
I'm thinking that there can't be more than just a few pop-up subVIs. It might be easier to just catch them as they pop up. They might even be conveniently stored in folder named something like "prompts".
11-07-2014 07:54 PM
Bill,
One concern with that approach is the possibility of missing a subVI which very rarely pops up. Since the OP appears to be trying to clean up old code, missing something which becomes obvious to the end user only after it was supposedly cleaned up could be embarassing.
Lynn
11-07-2014 08:04 PM
@johnsold wrote:
Bill,
One concern with that approach is the possibility of missing a subVI which very rarely pops up. Since the OP appears to be trying to clean up old code, missing something which becomes obvious to the end user only after it was supposedly cleaned up could be embarassing.
Lynn
I was just thinking about places I worked where everything was organized into user libraries and that included dialog boxes. However, even if that was the case, I hadn't considered that there may be subVIs - like maybe running tests - that pop up as needed also.
11-08-2014 08:31 PM
I did something similar recently while trying to optimize some code. I was looking at the Execution settings, including Priority and whether or not the VI was reentrant, but the same idea would work for enumerating Front Panel properties. Here's a snippet -- you can post-process the Array of Clusters to sort on the "column of interest" (and put a vertical scroll bar on the Array indicator, particularly if you have many VIs in your appliction).
Bob Schor