LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Re-naming all VIs in a project or library without breaking dependencies

Solved!
Go to solution

Hi,

 

I have a library that has several hundred VIs in it, with one top-level VI.

 

Each VI name has a suffix in it I would like to remove.

 

1.) Ideally I would like to write a script that changes the names so I don't have to do it one-by-one.

2.) Upon renaming I would like all dependencies within the library to be preserved

 

I'd also like to change the path and name of library itself without LabVIEW getting confused about where it's looking for various files. In particular I don't want it loading old versions of the VIs.

 

What is the best way to manage VI and library filenames?

 

 

0 Kudos
Message 1 of 4
(2,381 Views)
That's a lot of VIs for one library! This is a good application for scripting if you are up to it. Just make backups (obviously but you never know)
=====================
LabVIEW 2012


0 Kudos
Message 2 of 4
(2,375 Views)
Solution
Accepted by topic author caleyjag

Jim Kring has a utility which will do that:

 

http://lavag.org/topic/4810-openg-rename-folder-of-vis-utility-v16-released/

 

As long as you have your code is in memory (open the project), it will automatically link to the new files.

Message 3 of 4
(2,372 Views)

This is a relatively easy task to automate using LabVIEW.

 

  1. Create a cluster whose first element is an I32 containing the number of items called by a VI and the second item is a VI reference.
  2. In your automation VI, open every VI in your library and populate the VI references in an array of the above clusters.
  3. Populate the number of items called by using Get VI Dependencies and using the number of items returned.  Make sure you query for the whole hierarchy.
  4. Sort the array
  5. Save the VIs to the new names using the array.  This will give you a bottom up save so everything will be correct.
0 Kudos
Message 4 of 4
(2,371 Views)