Example Code

Programmatically Counting The Number of Front Panel Windows Open in LabVIEW

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

Overview

This VI exemplifies how to programmatically count the number of front panel windows open at any time by using an Application Property Node to count the number of VIs currently in memory.

 

Description

This VI uses the property named “Front Panel State”. There are six possible results of this property node: Invalid, Standard, Closed, Hidden, Minimized and Maximized. If the state is Invalid or closed is not counted as “open”.


This could be useful to keep track of how many front panels of our application are open and verify if the memory is being handled in a correct way.

 

Requirements
LabVIEW Base Development System.

 

Steps to Implement or Execute Code
1. Open the attached VI named “Open Front Panel Counter LV 2012 - NI verified.vi”.
2. Run the VI.
3. Read the value of the indicator named “Number Of Front Panels Open”.

 

Additional Information or References

 Snippet 8931.png

**This document has been updated to meet the current required format for the NI Code Exchange.**

Many thanks for using the NI forums and I look forward to your reply.

Kind regards

David

Applications Engineer
National Instruments UK

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.