02-11-2021 12:08 PM
Hi all,
Is there a way to rename a project folder (top level or sub folders) and/or the project file to something else such that LabVIEW will automatically relink all the dependencies with no manual intervention?
As an example, take a look at the attached images of a dummy project I made. When you right click there's no option to 'Rename' like you can for VIs, however you can 'Move on Disk...'
Is there an easy way to do this as I have a project with a few folders I need to rename, including the project name and the main project folder, however I know from past experience if you simply rename this in Windows you spend the next two days pointing to all the dependencies again!
I'm wondering if a workaround is creating a new folder with the name I want, move the files over to the new folder, move the new folder into the project then finally delete the old empty folder.
Any help or thoughts would be most welcome.
Cheers
Mitch
02-11-2021 07:12 PM
@Mitch_Peplow wrote:
I'm wondering if a workaround is creating a new folder with the name I want, move the files over to the new folder, move the new folder into the project then finally delete the old empty folder.
That's basically what I have been doing. I have been refactoring a bunch of libraries lately and what I did was right-click on the class or library from the project view and "rename" it to the desired new folder. I could then switch to the file view of the project and drag all of the VIs and controls in that class or library to the new desired folder.
02-23-2021 04:04 AM - edited 02-23-2021 04:05 AM
Submitted a ticket to NI to clarify if this is the only method. The answer, mostly yes.
They said for auto-populating folders you can use the following page for information:
Renaming Auto-Populating Folders
They also stated that renaming/moving the whole project could be done through File>>Save as... and selecting Duplicate .lvproj file and contents.
Hope this helps.
02-23-2021 09:49 AM - edited 02-23-2021 09:50 AM
@crossrulz wrote:
@Mitch_Peplow wrote:
I'm wondering if a workaround is creating a new folder with the name I want, move the files over to the new folder, move the new folder into the project then finally delete the old empty folder.
That's basically what I have been doing. I have been refactoring a bunch of libraries lately and what I did was right-click on the class or library from the project view and "rename" it to the desired new folder. I could then switch to the file view of the project and drag all of the VIs and controls in that class or library to the new desired folder.
Additionally, this makes it SVN-friendly, as then you can repair the move and it will transfer the history to the new files/folders.