LabVIEW Idea Exchange

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

Visualize the SubVI code over hovering the subVI node in the caller diagram

Status: New

Imagine the following:

 

When you hover (take your mouse) over the SubVI node in the callers diagram, the subVI code is brought up as an image in a small rectangle size. And that disappears when the mouse is taken away from the subVI node.

 

Demonstration (snapshot):

 

When mouse is hovered over 'SubVI Two.vi',

 

Caller Code.png

 

How does it help ?

 

1. Understanding a prototype code, where there is less emphasis on creating VI Icon and naming SubVI properly, quick glances of the subVI code can speed up the understanding/edit time.

2. Even otherwise, shipping code, could be sometime hard to understand and require often switches to subVIs block diagram.

3. Huge subVIs code, definitely, the image may not make much sense (as it is contained in a small rectangle), but could be useful to get some basic idea or to clear ambiguities between subVIs expected behavior.

4. This feature must be an opt-in. Not every time, this behavior would be desirable, hence this must be Tools->Options opt-in.

5. Does not open up the block diagram, which means that you have lesser VIs to deal with it in taskbar.

6. Drawback: This could hurt the edit time performance a little but, as LV would have to do some extra work to bring up the image..

16 Comments
muks
Proven Zealot

Useful with your suggestion of Tools -> options opt in.

dthor
Active Participant
I like the idea. There are a few implementation issues to work out, but overall it's good.

Would the preview allow interaction? Such as changing switching between case structure cases. If so, how is that accomplished? Moving the mouse off of the icon would make the preview disappear.

Large-subdiagram VIs would cover your whole screen, preventing you from doing any work. Would the block diagram preview be scaled down to fit in a set area? (You mention this one already, but didn't propose a solution.)

How do you feel about having a hover+hotkey action? For example, hold CTRL and hover over the subVI for 300ms to get the preview to pop up. Or perhaps something more like a toggle similar to context help (CRTL+H)
wevanarsdale
Member

This idea could be implemented by an option to show diagrams in the Context Help window.  This window would handle image scaling for large diagrams.

muks
Proven Zealot

Like a context help window will be neat!!!

SnowMule
Active Participant

Seems like a lot of stuff to cram into a floating window.

If it's a small enough VI to fit in a floating window, shouldn't the icon be a dead giveaway to what it's doing?

If it's bigger, document what's going on inside in the "VI Documentation"; that shows up in the context help.

ragarwal
Member

Kudos !

Paradoxymoron
Member

My comments:
 

- Would the preview allow interaction?

My imagination of the preview is static. The idea of the preview is to provide a quick glance, and a basic understanding of the code. The block diagram of the VI can always be open for deeper look into the code.

-Large-subdiagram VIs would cover your whole screen, preventing you from doing any work. Would the block diagram preview be scaled down to fit in a set area?

For huge VIs, I propose the preview to be scaled down to fit in a fixed set area. However, like I said before, because of the reduced proportion, the code may not be fully visible then. This could still be useful though when you know the VI, but just want confirmation, or to get some quick glance of the structure, size of the code.

-How do you feel about having a hover+hotkey action?

I think this would be very useful. Definitely, we would not want to preview every VI the mouse hovers over. Having a ceratin keystroke, or intended delay, can make the feature not so intrusive.

-This idea could be implemented by an option to show diagrams in the Context Help window.

I think Context help would probably be not a great place to have the preview. These two features, Context Help and VI code preview, though somewhat overlap in their motivation, but also serve independent needs.
Keeping the functionalities and the view windows separate, I think, would make it easier for us to decide when do we want what, and allows to use/enable/disable these two features exclusively.

SteenSchmidt
Trusted Enthusiast

I wouldn't use this. We already have context help, which shold be explanation enough.

 

If people don't care about making good VI Descriptions and icons then they need to improve their coding style. If you need to look into the code, it's just as easy to double-click on the subVI to open its BD. And when you have done that you are free to browse that code anyhow you like, even dig deeper into nested subVIs.

 

/Steen

CLA, CTA, CLED & LabVIEW Champion
crossrulz
Knight of NI

If you don't use the VI Description now, start using it.  That should describe what your subVI is doing in enough detail that you don't need to look at the subVI.  And using a descriptive icon is just as useful.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Intaris
Proven Zealot

While crossrulz and StttenSchmidt have made factually correct statements int he previous replies I don't see them as being any barier to implementing this idea.  One thing I hate with LabVIEW is the multitude of open windows and the painful navigation among them.  Having to open TWO windows to be able to see the BD of a sub-VI is something I do not like.

 

I personally would use this function.  It allows for a much more intuitive "first glance" investigation of code which, in my book is a good thing.