LabVIEW Idea Exchange

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

Project should support links (like bookmarks) to main VI

Status: New

In a simple project, the main entry point into an application is usually easy to find:

simple.png

 

However, for more complex projects (particularly those utilising libraries/classes) it may not be obvious where to begin:

complex.png

 

Proposal:

LabVIEW should provide a mechanism for tagging one or more VIs such that they are easily accessible to someone unfamiliar with the project. 

 

One possible implementation:

links.png

  • Display tagged items as links at the top-level of the project.
  • Links would be pinned to the top row
  • Link names would be editable and need not correspond to the name of the item they link to. (e.g. The link "main" may point to "WidgetTester.lvlib:GUI.lvclass:launcher.vi")
  • For minimal confusion, developers should be encouraged to name the first link "main" (or similar)
  • In principle links could point to anything interesting, not just the main VI.
  • Double-clicking a link should open (or navigate to?) the target item

 

10 Comments
thols
Active Participant

Just create a VI with a disable structure in it and put the VIs you want to link to there. That's what I do. I sometimes have a few different VIs where on VI could be called "Views" or and another "actors" or something like that.

 

You can also use bookmarks and use a/the bookmark manager to go to the links.

Certified LabVIEW Architect
wiebe@CARYA
Knight of NI
OneOfTheDans
Active Participant

If implemented, I'd like to see a superset of pinning VIs (the other idea wiebe linked) but also traditional links that can have arbitrary names pointing to external files/URLs.

 

This would be especially nice for driver libraries where it's useful to link to the manufacturer's PDF manuals and product info website.

Mads
Active Participant

When projects did not exist in LabVIEW we typically had all VIs saved in a library (.llb) file and the main.vi was easily distinguishable from the rest as we marked it as top-level which is then shown in a separate section. Perhaps projects could have a top level section too.

 

(The convention of having a "main.vi" is useful by the way. It should be encouraged by the IDE. I brought it with me to where I work 25 years ago just because I was used to main() from working in C...)

crossrulz
Knight of NI

The links to top level VIs can be easily gathered from the executable build specifications.


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
wiebe@CARYA
Knight of NI

If you make a shortcut (to any file or URL) in Windows, and add the file to the project explorer, the link will open when you click.

 

So, links to manuals are already possible, although you can't make them in LabVIEW.

 

Links to VIs should work in the same way, but 'normal' shortcuts are absolute paths, so your project can't be moved or copied. This might work (I didn't try hard before I gave up), but it's a hassle: How to create a shortcut with relative path - Microsoft Community

fabric
Active Participant

@thols wrote:

Just create a VI with a disable structure in it and put the VIs you want to link to there. That's what I do. I sometimes have a few different VIs where on VI could be called "Views" or and another "actors" or something like that.

 

You can also use bookmarks and use a/the bookmark manager to go to the links.

These are both reasonable workarounds, but they don't address the issue of discoverability. Neither the "VI index" nor the bookmarks present an unambiguous signpost to the main entry point of the application.

 

What I'm really proposing is a standardised, unambiguous way of pointing an arbitrary developer to any top-level VI. Sure, the feature could be extended to support other links, but I believe the main utility of this idea would be in directing someone unfamiliar with the project to the main entry point.

 


@crossrulz wrote:

The links to top level VIs can be easily gathered from the executable build specifications.

Yes, but only if a build spec exists! 🙂

Loïc_fr
Member

Recently I developped a package based on wizzards under the File menu that does something similar.

I use of the project description to own the reference to the MainVI.

 

The purpose was to be abble to quickly return or execute the VI setted as "MainVI".

 

Set as Main:

Loc_fr_0-1682509130347.png

 

Project description update: 

Loc_fr_1-1682509185604.png

 

 

You also can Run or Remove the MainVI configuration.

We can imagine using these feature though QuickDrop...

 

That's my try for this... Not fully testing, try it if you want : 

GitHub - Loysse/Show-Main-VI: LabVIEW IDE Extension for quickly accessing to Main / Top Level VI

 

Edit :

A quick search on Github pointed me on another project based on project provider that's the same mention earlier by

GitHub - BenjaminRLabVIEWExtensions/lvshortcut_provider: Adds Shortcut item into the LabVIEW project...

 

Loïc

thols
Active Participant

Following Wiebe's tip of shortcuts for any files, I tried adding a shortcut to a VI in a project. I thought to myself: "why didn't I think of that, when I already have used shortcuts to documents". It sounded like a great idea, but it was not. The shortcut gets added like a VI, with the name of the shortcut, which means I get a duplicate of that VI. Also, if the VI is member of a class or lvlib, LabVIEW complains about the shortcut not being part of the library. Other files work though. It looks like this in the project:

thols_0-1682592562224.png

 

Certified LabVIEW Architect
JimB.
Member
@Mads wrote:

When projects did not exist in LabVIEW we typically had all VIs saved in a library (.llb) file and the main.vi was easily distinguishable from the rest as we marked it as top-level which is then shown in a separate section. Perhaps projects could have a top level section too.

 

(The convention of having a "main.vi" is useful by the way. It should be encouraged by the IDE. I brought it with me to where I work 25 years ago just because I was used to main() from working in C...)

 


I think my thoughts here are similar, and also influenced by text based IDEs like Visual Studio...

 

I could see some people wanting a section, but personally I be happy enough in most cases if the lvproj format supported designating a specific "startup" VI.

 

I don't necessarily need this VI to appear anywhere special in the project tree if it is implicitly linked to a Run button on the Project Manager UI.