Jump to content

How to force VIs to reload from disk?


Daklu

Recommended Posts

Is there a way to force Labview to reload a project file and/or project VIs from disk? I scanned through property and invoke nodes but didn't see anything promising.

Not quite sure what your getting at here since the project is just an organiser. You can set a directory to autopopulate which will cause it to react when changes to the organisation take place.

Individual vis can be reloaded by selecting "revert" which forces a reload from disk if the vi has changed (you can use an invoke node for this).

Link to comment

Not quite sure what your getting at here since the project is just an organiser. You can set a directory to autopopulate which will cause it to react when changes to the organisation take place.

Individual vis can be reloaded by selecting "revert" which forces a reload from disk if the vi has changed (you can use an invoke node for this).

When working on a project sometimes another developer will check in code and I'll want to get the latest updates. Or I might be futzing around with previous versions of certain VIs. Usually LV will catch it and tell me the VI on disk has changed and offer to load the disk version. Sometimes it doesn't and continues to show the copy in memory rather than the version on disk. When that happens (or if another devoper has updated the project file) I end up having to close and reopen the project, which takes ~8-10 minutes.

I'd like to have some tool that forces LV to reload the project file and any VIs, controls, libraries, etc. that are in memory from disk. The Revert method combined with getting a list of all loaded VIs might work. Rereading the project file might be tougher.

Link to comment

When working on a project sometimes another developer will check in code and I'll want to get the latest updates. Or I might be futzing around with previous versions of certain VIs. Usually LV will catch it and tell me the VI on disk has changed and offer to load the disk version. Sometimes it doesn't and continues to show the copy in memory rather than the version on disk. When that happens (or if another devoper has updated the project file) I end up having to close and reopen the project, which takes ~8-10 minutes.

I'd like to have some tool that forces LV to reload the project file and any VIs, controls, libraries, etc. that are in memory from disk. The Revert method combined with getting a list of all loaded VIs might work. Rereading the project file might be tougher.

Try this

Although I don't know whenter it will reload the vis if the vis in memory aren't modified. LV might ignore it if it doesn't think anything has changed.

But you should really be checking in/out and merging since its really a source control issue.

Edited by ShaunR
Link to comment

Although I don't know whenter it will reload the vis if the vis in memory aren't modified. LV might ignore it if it doesn't think anything has changed.

In a quick test just now in 8.6, it does in fact reload from disk VIs it does not consider to be changed.

Link to comment

Try this

Thanks. I suspect it should work. In my case it got up to ~350 VIs before Labview sputtered and died.

But you should really be checking in/out and merging since its really a source control issue.

Merging doesn't address this particular problem. If I have the project open and the files on disk change, whether via a branch merge or via a check in when multiple developers are working on the same branch, LV doesn't always catch all the VIs that have changed. That often leads to conflicts (such as "MyVi.vi claims to be a member of MyLibrary.lvlib... etc.") and I have to close and reopen the project.

Link to comment

It turns out there's already a way to do what I was attempting. In the project window, select the sub VIs you want to reload then on the menu bar go to Tools -> Source Control -> Get Latest Version...

Couple points:

  • I presume you need to be configured for source control to be able to use it.
  • You can only do a forced reload of the latest version. I don't think you can go through your scc client and get a previous version and have it reload.
  • It has the annoying habit of asking you if you want to Revert or Cancel for every single vi that is being reloaded. A 'Revert All' option sure would be nice.

Link to comment
  • 4 years later...

Sorry to dig up a really old topic but i was curious if anyone has experience reloading the project if you are not using Labview's integrated source control.  I ask because i'm currently using the TSVN toolkit and obviously if you a revert, merge etc...,  a file that has been loaded into memory, your source control updates are not reflected in the project.  You are forced to close the project and reopen, sometimes even all of labview, to get your changed updated.  

 

I'm getting ready to swtich from SVN to GIT since branching is so much easier, which makes loading the project an effort that must happen a lot more often.

 

Maybe this is a workflow issue, but currently i only develop by myself, so i could see this becoming an even larger issue when doing team development.  Thanks for any insight.

Link to comment

The only way to guarantee Labview loads the correct version into memory is to close and reopen the project.  Sometimes LV will notice the version on disk is different and ask if you want to revert (which in this context means 'load from disk,' not 'undo any changes you made') but I wouldn't bet on it noticing every time.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.