11-21-2023 12:57 AM
The task is probably simple (at least each of us encounters it quite often). However, I cannot find any simple routine to solve it.
There are multiple projects using the same bunch of common files (VI-s, CTL-s, Classes, LLB-s). But these common files are located in hard disk under one of these projects. Such bad file structures usually have historical reasons. There is a need to reorganize the file structure; i.e. move common files in logically justified place. This is a simple illustration:
Moving files in one project causes inconsistency in all other projects. Is there any way to move files in many projects at once? I.e. is there any way to move files in HD preserving consistency of many projects?
Solved! Go to Solution.
11-21-2023 02:05 AM
Some thoughts:
11-23-2023 02:22 AM
tst , thank you for the answer.
Sorry, I did not write in my first message: the question is related to large projects. Hundreds of files must be moved at once.
So, manual methods for preserving project consistency are not convenient. Otherwise I should do exactly as you describe. And I actually tried.
Unfortunately, dialog Resolve Load Conflict pops up several times for each moved file. I.e. each moved file causes multiple conflicts. Resolving so many conflicts in several projects is a nightmare.
11-23-2023 03:10 AM
If it is just one (or a few) folders, you can try the following steps (make a commit to your SCC before doing this, just in case)
1) open a project
2) in the file view, right-click the folder(s) you want to move, select Move on Disk and move it to the destination
3) save the project
4) close the project and move the folder(s) you have just moved back to their original location.
5) repeat step 1-4
6) Once the last project you have, leave the folders in the new location.
All projects, once opened should find the new files as, as far as the project knows, they haven't changed locations since the last time the project was opened.
11-23-2023 07:19 AM
Thank you Basjong53. Unfortunately this method works only if the projects do not have complicated inter-dependencies. If they have (as in my case), the problem is the same.
This is a simple illustration of such a problem:
11-23-2023 07:26 AM
Hi _Y_,
@_Y_ wrote:
This is a simple illustration of such a problem:
- There are two projects sharing two VIs: VI-1.vi and VI-2.vi.
- Project 1 is opened and VI-1.vi is moved to new location.
- Changes are saved and the project is closed.
- VI-1.vi is moved back.
- Project 1 is opened with a conflict: VI-2.vi searches VI-1.vi in the new location while VI-4.vi loads it from the old location.
Why do you do step 4? This is what creates the conflict!
When you omit step 4 and open Project2 then it should load VI4 because VI2 knows the location of VI1…
11-23-2023 08:02 AM
GerdW , It was my comment to previous suggestion with oversimplified example. The main practical problem is in hundreds (if not thousandths) Resolve Load Conflict pop-ups asking to select between existing and non-existing locations.
11-29-2023 04:35 AM
Thank you again for your answers. I found solution that is not perfect but works. It may be useful to others, so I describe it step-by step:
How to move files belonging to multiple projects
Unfortunately, Replace with… does not work perfectly for me (LabVIEW 2021 32-bit). Some typedefs remain pointing to the old LVLIB. These typedefs must be resolved manually (see step 7). However, this method prevents multiple pop-ups of Resolve Load Conflict dialog. In my case it saved 80-90% of work time.