LabVIEW Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
CaseyM

Make the default behavior of opening a VI open ONLY the block diagram

Status: New

The following code will essentially do what I want, but I want this to be natively incorporated into the IDE as an option.

CaseyM_0-1695271655726.png

 

90%+ of the VIs that I write have a front panel that doesn't get shown to the end user, and yet, whenever you open a VI what does it show you? The front panel. I think the default behavior of opening a VI should be to show the block diagram ONLY. This would have several advantages for the developer:

  1. Fewer windows to manage - Even if you minimize the front panel, you can still accidentally restore the FP when you Alt-Tab or click in the taskbar which brings me to...
  2. Less clutter in the taskbar - Once you open more than a couple VIs, navigating to the block diagram of the VI you want in the taskbar becomes very unwieldy.
  3. You could more easily get to the BD of VIs running in a subpanel.
  4. It would be possible to get to the BD of a VI that has a custom run-time menu where Ctrl-E is disabled.

Ideally this would be an option in the Tools --> Options dialog (that I would always turn on).

 

This idea is similar to one posted almost 15 years ago, but I don't consider this a duplicate because this takes things a step further by not opening the FP at all.

CLA CLED AF Guild
16 Comments
fefepeto_kb
Member

There is a shortcut in the IDE, that I often use as well. Basically if you CTRL+Double-Click a VI, that will open the BD and bring it to front.

For the part of your idea to remove clutter from the task bar, this wouldn't help. What I saw to be recommended instead of switching windows using the OS built in tool is the window manager. There you can basically search any VIs by name, there is a separate entry for FP and BD, and also mass close them, for example all the clones of a given VI.

For the run time BD only part of your idea, I see uses for that, but I suspect that the majority of developers would actually want to see the inputs and outputs of a VI before they deep dive into the code, and the front panel is an easy way to do that.

D_Hooks
Member

I'm completely on board with this idea. When I go to open a VI from my project, 95+% of the time I want to see the block diagram, and I have no need to see the front panel. Showing only the block diagram would be vastly preferable behavior in the IDE, it would avoid clutter, and you would still have the option to hit Ctrl+E to open up the front panel.

fefepeto_kb
Member

What I meant with my comment is, that there are subtle benefits of opening the block diagram only, and they are mostly tied to the window management trough the task bar.

If there is an option I have to change for every VI that I want to open the front panel by default it might not be worth it at all, since the VIs I debug are the only ones where it's beneficial.

Adding this option would also require another option for the whole IDE, to be able to toggle this behavior for new VIs.

Another potential benefit would be not loading the front panel in the memory at all when opening the Block Diagram, but it would make the IDE sluggish when you want to open front panels later, especially for VIs with a lot of data ins and outs, that also applies if the data is bundled into clusters.

To me, this option would create more headache than benefit, hence the global option need from my side.

OneOfTheDans
Active Participant

This one makes me want to open a dozen burner accounts and bump up your Kudos count.

 

LabVIEW is a programming language. The overwhelming bulk of VIs are non-GUI, but they (almost) all contain code. It's a bit crazy that the default behavior is to show the GUI instead of the code.

 

Great suggestion!

CaseyM
Active Participant

Just to be clear, I do want this to be a global option from the Options dialog. Maybe, like the Editor options for control style, it could be set on a per VI basis, but that's not as important to me.

 

Right now opening a VI takes you to the FP and you can additionally get to the BD through a menu or keyboard shortcut, etc. I'm advocating for reversing that behavior so that opening a VI takes you to the BD while still maintaining the ability to additionally get to the FP. I'm not sure where the idea of making the IDE sluggish when opening the FP is coming from.

 

Hell, you could even add the connector pane wiring functionality to the BD - then I'd have even less reason to go to the FP on most VIs.

 

I suggested it be an option so that those who don't like it can choose to open the FP, as the behavior exists now, if they like. I don't see any downside to this really.

CLA CLED AF Guild
jon_mcbee
Active Participant

This is a great idea, and I'd like to give a double kudo for adding the connector pane to the block diagram.

D_Hooks
Member

It seems like NI had been going in this direction with NXG. The VI icon and connector pane were separate from the front panel, and you didn't even need to show controls and indicators on the panel unless you wanted to.

 

In my code nowadays, doing a lot of OO development, the front panels are only really relevant for user interfaces.  Thinking about it, they're honestly a drain on productivity, since I feel compelled to clean them up. If I wasn't being forced to look at front panels all the time I could just skip that cleanup and get more actual work done.

 

Definitely agree that it should be a global option, and not something set on a per-VI basis.

 

JB
Trusted Enthusiast
Trusted Enthusiast
... If I wasn't being forced to look at front panels all the time I could just skip that cleanup and get more actual work done.

A very useful toolkit from Zühlke Engineering to clean up the front panels : ZAlign Toolkit for LabVIEW - Download - VIPM by JKI

 

"This QuickDrop PlugIn allows the fast and clean arrangement of Front Panel elements.
On a front panel all controls are automatically arranged according to the connector pane and the window size is adjusted.
Controls that are not connected are listed under Locals."

 

CTRL-Space

CTRL-A

Done !!!

fefepeto_kb
Member

To the last commenter: CTRL+U does this as a built in tool in the latest versions of LabVIEW.

JimChretz
Active Participant

I think it would make sense to have a tree control with all the VI hierarchy. I have not used NXG much but I believe it was that way. Once you are in a block diagram, you want to navigate through all callers or subVIs block diagrams.

 

Imagine looking at the tree, you don't need to open 7 subVIs until you find the one you were looking for. Just by looking at the VI name/Icon you can quickly spot if it's interesting.

 

The VI Hierarchy GUI is a bit outdated too, it could be refreshed a bit along with the ability to stricly open the block diagram when you double-click a VI.