Daklu Posted October 5, 2009 Report Share Posted October 5, 2009 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. Quote Link to comment
ShaunR Posted October 5, 2009 Report Share Posted October 5, 2009 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). Quote Link to comment
Daklu Posted October 5, 2009 Author Report Share Posted October 5, 2009 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. Quote Link to comment
ShaunR Posted October 5, 2009 Report Share Posted October 5, 2009 (edited) 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 October 5, 2009 by ShaunR Quote Link to comment
asbo Posted October 6, 2009 Report Share Posted October 6, 2009 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. Quote Link to comment
ShaunR Posted October 6, 2009 Report Share Posted October 6, 2009 In a quick test just now in 8.6, it does in fact reload from disk VIs it does not consider to be changed. Sweet Quote Link to comment
Daklu Posted October 6, 2009 Author Report Share Posted October 6, 2009 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. Quote Link to comment
ShaunR Posted October 6, 2009 Report Share Posted October 6, 2009 Thanks. I suspect it should work. In my case it got up to ~350 VIs before Labview sputtered and died. Told you I get confused as to which propery nodes need closing of the refs Quote Link to comment
Daklu Posted October 6, 2009 Author Report Share Posted October 6, 2009 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. Quote Link to comment
odoylerules Posted March 14, 2014 Report Share Posted March 14, 2014 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. Quote Link to comment
Daklu Posted March 14, 2014 Author Report Share Posted March 14, 2014 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. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.