Example Code

Open Diagram First - Project Provider

产品和环境

本部分要求填写创建该范例所需的产品和操作系统。

如要下载NI软件(包括以下所示产品),请访问ni.com/downloads

    软件

  • LabVIEW

代码和文档

添加附件

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

NI社区“代码范例交流区”(Example Code Exchange)中的代码范例已获得MIT许可