LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Renaming auto populating folders

Solved!
Go to solution

Hello Community,

 

I have a project which uses auto populating folders and I need to rename some of them. There are LOTS of VIs under the folders so pressing F2 on each individual VIs would be really error prone and time consuming. 

 

If I simply rename the folder on the harddrive then the project will get broken and there will be hundreds of conflicts which I need to address individually. This is also seems a troublesome way to do it.

 

Its any sort of an easy way to rename a folder? (There is THIS idea which has only implemented for NXG... I'm looking for something like this). I have tried scripting the Project Explorer by using Invoke and Property nodes, but could't find anything allowing me to programatically rename VIs in the project structure. (of course I have found the nodes allowing me to save the VIs to a different place ("Save.Instrument" node) but it does not update the project dependencies, so its not a solution.)

 

Let me know if you have any ideas. Thanks.

 

(Normally I dont use virtual folders, but in this case using auto populating folders is a customer requirement I cant deviate from.)

0 Kudos
Message 1 of 37
(4,137 Views)
Solution
Accepted by 1984

Move a single vi from each folder to the new one with F2. Select Files view (click the tab or press Ctrl+E), then drag and drop all remaining vi's to the new folder. I seldom use auto populating folders so there may be a quicker way though.

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
Message 2 of 37
(4,125 Views)

This should work, but i'm not 100% sure, so always backup. 🙂

Close LV

Rename the folder on disk

Open project in a text editor, it's an XML file

Change paths to fit

Open LV

/Y

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 3 of 37
(4,118 Views)

No, it has nothing to do with that.

0 Kudos
Message 4 of 37
(4,109 Views)

@1984  ha scritto:

No, it has nothing to do with that.


What has nothing to do with what?

Paolo
-------------------
LV 7.1, 2011, 2017, 2019, 2021
0 Kudos
Message 5 of 37
(4,098 Views)

Sorry mate, it was a response for the 2nd reply. Yours seems working fine. I did not try moving the files in the "files" view of the project explorer, so I have not found that earlier. Thx.

0 Kudos
Message 6 of 37
(4,096 Views)

In the project, select CTRL+E (Show in Files view). That will show the files view of the project. Or click on the File tab of the project explorer. Then select the VIs or folders to move, and right click the selection, and select move on disk. Browse to the new location (optionally make the now location from the browse dialog with new folder), and LV will move the files and folders, and often it will relink everything properly.

 

There are limits. After a successful move, I'd close and reload the project. Especially moving in combination with renaming classes seems to confuse LV after a while.

Message 7 of 37
(4,095 Views)

@1984 wrote:

Hello Community,

...

 

(Normally I dont use virtual folders, but in this case using auto populating folders is a customer requirement I cant deviate from.)


I am very familiar with adapting my coding approach to a style that make my customers comfortable but I hope you did advise that auto-populating folders is a bad requirement.

 

At the very lest it greatly slows down LV as it constantly is scanning for changes to the folders.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 8 of 37
(4,072 Views)

@Ben wrote:

@1984 wrote:

Hello Community,

...

 

(Normally I dont use virtual folders, but in this case using auto populating folders is a customer requirement I cant deviate from.)


I am very familiar with adapting my coding approach to a style that make my customers comfortable but I hope you did advise that auto-populating folders is a bad requirement.

 

At the very lest it greatly slows down LV as it constantly is scanning for changes to the folders.

 

Ben


I never do anything else then auto-populating, and I really don't like the virtual folder approach... I find managing one hierarchy hard enough. Managing two (the one on disk and the one in the project) is just too hard for me.

 

I never noticed any slow down, but then again I might be used to it.

Message 9 of 37
(4,061 Views)

wiebe@CARYA wrote:

...

I never noticed any slow down, but then again I might be used to it.


Trying to help a fellow wire-worker...

 

When the project tops 100- VIs, you will notice.

 

I actually go a step beyond the virtual folders and use virtual folders inside of Libraries (see here for a blog I wrote about libraries). I have found that a developer only has to clone a library once to fall in love with Libraries (and the virtual folders used to define the scope).

 

Try it, you will like it!

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 10 of 37
(4,049 Views)