Ton Plomp Posted May 8, 2008 Report Share Posted May 8, 2008 Does anyone know how to refresh the SCC status of the LabVIEW project? If I use my own (LabVIEW based) SCC functions the project isn't refreshed. It would be nice if I coul execute the same menu as the Tools->Source Control->Refresh status on the project window. Ton Quote Link to comment
gmart Posted May 8, 2008 Report Share Posted May 8, 2008 QUOTE (tcplomp @ May 7 2008, 08:17 AM) Does anyone know how to refresh the SCC status of the LabVIEW project?If I use my own (LabVIEW based) SCC functions the project isn't refreshed. It would be nice if I coul execute the same menu as the Tools->Source Control->Refresh status on the project window. Ton The Refresh menu is tied into the provider configured within LabVIEW. When you said you use your own SCC functions, what does that mean? Quote Link to comment
Ton Plomp Posted May 8, 2008 Author Report Share Posted May 8, 2008 QUOTE (gmart @ May 7 2008, 04:32 PM) The Refresh menu is tied into the provider configured within LabVIEW. Is it? It functions the same when using MS SourceSafe and PushOK SVN. QUOTE When you said you use your own SCC functions, what does that mean? I use the SCC VIs: However when I do a checkin of a file the project does not update (unless I use the menu option). Could you tell us where the VI is located that does update the project? I think the private method 'SCC Get Info' might help (haven't tested it yet): EDIT: Additional idea, could it be that I edit the SCC status from another application instance provide these problems? Ton Quote Link to comment
Ton Plomp Posted May 18, 2008 Author Report Share Posted May 18, 2008 QUOTE (gmart @ May 7 2008, 04:32 PM) The Refresh menu is tied into the provider configured within LabVIEW. When you said you use your own SCC functions, what does that mean? Gmart, do you know a solution? Ton Quote Link to comment
gmart Posted May 19, 2008 Report Share Posted May 19, 2008 QUOTE (tcplomp @ May 7 2008, 10:25 AM) Is it?It functions the same when using MS SourceSafe and PushOK SVN. I probably wasn't clear since I didn't know what you meant by "my own functions". What I meant is that the Tools>>Source Control>>Refresh menu calls into the currently configured SCC provider. So yes, it would work for both VSS and SVN. What I should've said is that the menu is independent of any custom tools that you may have developed (see below). QUOTE I use the SCC VIs: However when I do a checkin of a file the project does not update (unless I use the menu option). The palette VIs are not linked to the functionality of the Tools menu. So if you check in/out via the palette SCC VIs, you will need to manually refresh the project you are working within. It was a design decision to keep the palette VIs and the integration behavior separate. QUOTE Could you tell us where the VI is located that does update the project? I think the private method 'SCC Get Info' might help (haven't tested it yet): EDIT: Additional idea, could it be that I edit the SCC status from another application instance provide these problems? Ton I don't believe there is one VI that will do the refresh by itself. The code is part of the SCC code that works from the project. As far as that method goes, it won't return what you are looking for. I'm not even sure if it will work right since it's not a public method. Let's put it this way, I don't use it Quote Link to comment
Val Brown Posted May 19, 2008 Report Share Posted May 19, 2008 QUOTE (gmart @ May 18 2008, 09:48 AM) I probably wasn't clear since I didn't know what you meant by "my own functions". What I meant is that the Tools>>Source Control>>Refresh menu calls into the currently configured SCC provider. So yes, it would work for both VSS and SVN. What I should've said is that the menu is independent of any custom tools that you may have developed (see below).The palette VIs are not linked to the functionality of the Tools menu. So if you check in/out via the palette SCC VIs, you will need to manually refresh the project you are working within. It was a design decision to keep the palette VIs and the integration behavior separate. I don't believe there is one VI that will do the refresh by itself. The code is part of the SCC code that works from the project. As far as that method goes, it won't return what you are looking for. I'm not even sure if it will work right since it's not a public method. Let's put it this way, I don't use it I'm not intending to hijack this thread -- and this does seem to be related to the issues at hand -- can we get a list of pros and cons of using the toolkit to bring SVN into LV? Quote Link to comment
Ton Plomp Posted May 19, 2008 Author Report Share Posted May 19, 2008 QUOTE (gmart @ May 18 2008, 06:48 PM) The palette VIs are not linked to the functionality of the Tools menu. So if you check in/out via the palette SCC VIs, you will need to manually refresh the project you are working within. It was a design decision to keep the palette VIs and the integration behavior separate. Why? Why? Why? So I write a tool that solves a lot of problems for me (checking everything is in SCC, up to date and in the right place) after running this tool I have to inform my users to manually do a Tool->SCC->Refresh? A lot of items in the LabVIEW Tools menu have a http://zone.ni.com/reference/en-XX/help/371361A-01/lvdialog/application_item_tags/' target="_blank">application item tag why not this one? The one thing I can currently think of is closing the project and reloading. Not very sophisticated but it should do the trick. Ton Quote Link to comment
gmart Posted May 20, 2008 Report Share Posted May 20, 2008 QUOTE (tcplomp @ May 18 2008, 01:56 PM) Why? Why? Why? So I write a tool that solves a lot of problems for me (checking everything is in SCC, up to date and in the right place) after running this tool I have to inform my users to manually do a Tool->SCC->Refresh? A lot of items in the LabVIEW Tools menu have a http://zone.ni.com/reference/en-XX/help/371361A-01/lvdialog/application_item_tags/' target="_blank">application item tag why not this one? The one thing I can currently think of is closing the project and reloading. Not very sophisticated but it should do the trick. EDIT: I slept a night and can understand the why (some smart ###### would blame you for too heavy network load or something). But somewhere there is a piece of code that takes in a lvproject reference and updates the status of the icons. Where is that piece of code? Ton As I said earlier, there is no one piece of code that does the refresh. The VIs are called as part of the LabVIEW project code and isn't designed to be used standalone. As you noted, reloading the project will cause the states to be refreshed since when the project is next loaded, we have to determine the SCC status of each file. Programmatically closing and reloading a project could be a problem since you never know what a coustmer has opened at the time. Quote Link to comment
Ton Plomp Posted May 21, 2008 Author Report Share Posted May 21, 2008 QUOTE (gmart @ May 19 2008, 03:31 PM) As I said earlier, there is no one piece of code that does the refresh. I'll keep trying, in my opinion, the Menu item triggers something. This something will test the project. QUOTE Programmatically closing and reloading a project could be a problem since you never know what a coustmer has opened at the time. That's exactly my problem. I found a VI that might do the trick: resource\Framework\Providers\SCC\PrjProv_SCC Refresh CORE.vi Here's some test code http://lavag.org/old_files/post-2399-1211265868.vi'>Download File:post-2399-1211265868.vi It will always generate the following error: Error -2976 occurred at ScanProject.vi $10 for LAVA for a working solution (and your name in a future CR solution) Ton 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.