LabVIEW Idea Exchange

About LabVIEW Idea Exchange

Have a LabVIEW Idea?

  1. Browse by label or search in the LabVIEW Idea Exchange to see if your idea has previously been submitted. If your idea exists be sure to vote for the idea by giving it kudos to indicate your approval!
  2. If your idea has not been submitted click Post New Idea to submit a product idea to the LabVIEW Idea Exchange. Be sure to submit a separate post for each idea.
  3. Watch as the community gives your idea kudos and adds their input.
  4. As NI R&D considers the idea, they will change the idea status.
  5. Give kudos to other ideas that you would like to see in a future version of LabVIEW!
Top Authors
cancel
Showing results for 
Search instead for 
Did you mean: 

Open all previously open VIs with a project

On the Macintosh, if you quit a program, you have the option to have every window which was open when you quit to reopen when you restart the program. 
 
I would LOVE this feature on a project basis within LabVIEW.  

 

I often find myself switching betrween different projects and their windows get very cluttered and it's difficult to discern a VI in one project from a VI in another.

 

For example, if I have Project A with A_Main.vi, A_sub1.vi and A_sub2.vi open, and then I close the project, the next time I open the project I would like all 4 windows (the project, the Main and both subVIs) to open as well.  If one project has 15 open VIs and another has 25 open VIs, the screen can get really cluttered.  If I could open and close projects and have LabVIEW put me back right where I was when I closed them, this would be immensely helpful.

10 Comments
Trusted Enthusiast
Trusted Enthusiast

Don't wait for NI.  Who know when it will happen?  Do it yourself.

 

Use property / invoke node to get all Recent Opened VIs;

Filter out all VIs not in the current project;

Open remaining VIs.

 

 

Member

I could not find any property or invoke node which would give me the Recent Opened VIs list, and even if I did, that list is usally pretty short.

 

What I would need is a way to get a list of ALL open windows and then figure out to which project they belonged (the project name is in each window's title bar, but it's not clear that a function which would return a list of all open LabVIEW windows would include that).

 

Any other ideas?

 

P.S. I did find a property for all VIs in memory, but that's not just the windows that are open, but ALL Vis (which is essentially useless).  Even worse, it's just a list of VI names- there's no way to know where these Vis are on disk (and therefore no way to open a reference to them to see if their window is open).

 

P.P.S- obviously NI has a way to do this because they have the All Windows.... menu item which brings up a table listing all open windows.  If I could do that, then I could save a list per project and then open that list when I want to open a project. 

 

Of course this would all be a lot easier if NI did it.  ;-)

Member

Update: so I found an Open_G function which returns a list of names of all Vis which are in memory and open!  From that, I can get their paths.  But I still don't know to which project they belong.

 

Of course if I could get their project, I still don't know if their block diagram is open (somehow NI does know this).  I suppose I can live with opening all the block diagrams again, but I'd really like to have a complete solution.

 

Also, I'm assuming that running a VI which opens a project and then a list of Vis from that project, actually opens the project instance of that VI and not a new instance.  This isn't at all clear to me...

 

Finally, I found a Library reference, but only returns Not a Ref for each VI I check.


Close, but not there yet...

Trusted Enthusiast
Trusted Enthusiast

Create the VI based on the following image.

Add it the your projects.

After you opened your project, run the VI.  You should be able to find all Recently Opened VIs of the project.

 

Get Recently Opened Files.png

Member

WOW!  That looks great!  Any chance I could get you to email me that VI (I'm not sure where some of those Vis came from).

 

Thanks!

blasberg@iviltd.com

Member

So I found the Recent File Paths Invoke node, but it only gives the last 10 VIs opened (and they can be from mixed projects).

 

I still think a better way is get a list of all open windows, identify the projects, sort the open windows by project and save that list (by project).  The problem is I don't know which projects are currently open.  Once I have that, I can get a list of all their VIs and dependences and compare it to the list of open Windows.  The problem with that is that one can have 2 VIs open with exactly the same name but belonging to different projects.  And even if I manage to sort this out, I still can't get the block diagrams to open (or know which VIs had their block diagrams opened).

 

Of course, the absolute BEST way is if NI would do this.  :-)  This is a LOT of work for me and almost certainly trivial for them as they know all the windows associated with a project and which windows (and block diagrams) are open.

Trusted Enthusiast
Trusted Enthusiast

 I'll email the VI to you.

 

You can change the LabVIEW option to increase the number of last opened VIs upto 99.

 

I know it's not exactly what you want, but close, and easy to implement.

 

The other option would be run a VI in the project when you want to close the it.

The VI will get all windows (including diagrams, and windows positions), filter out those not belong to the same project.

Then save to a file.  And close all windows including the project file.

 

Next time when you open the project, run another VI to load the file, and re-open all the VI and their diagram.

 

 

 

Example Gatekeeper
Status changed to: Declined

Any idea that has received less than 2 kudos within 2 years after posting will be automatically declined.

DNatt, LV R&D
Knight of NI

I'd argue that this idea should also be considered a duplicate of Reopen VIs that were open when the project was last closed

Example Gatekeeper