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.

Example Code

Open Diagram First - Project Provider

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

Description

Overview

Once installed, when you open a VI from a project window, the Diagram will open in the foreground instead of the Front Panel.

 

Description

Most of the time, when I open a VI form a project, I want to modify the code more than modify the UI because most of the VIs are subVIs. Then that is a (tiny) waist of time to switch from the front panel to the diagram (almost) everytime. So I decided to create a project provider which "overrides" the action of opening a VI so that the diagram appears in the foreground instead of the front panel.

 

Requirements

  • LabVIEW 2013 (or compatible).

 

Steps to Implement or Execute Code

1. Install the package using VIPM.

or

Download the .zip files, unzipped and read the readme files.

2. Restart LabVIEW.

 

Additional Information or References

It is expected that the diagram appears in the foreground when opening an existing VI from a LabVIEW project

It is expected that the front panel appears in the foreground when creating a new VI from a LabVIEW project

It is not implemented so that it works when opening a VI from Windows Explorer (not doable from a project provider)

It has been rapidely tested with LV13 and LV14 (32bits) on Windows 7

This piece of code is provide As Is.

All comments/ideas are more than welcome !

 

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

Flo

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