LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Change each vi name and preserve hierarchy programatically in LabVIEW 7-1

Hi,
 
I'm looking to compare two projects which contain vi's with the same vi names; they are developments of each other made years apart.  I can successfully change each vi name (add an x on the end for instance so Top Level.vi would become Top LevelX.vi) and save a copy programatically, however, all of the called vis still reference the vi's without the x extension.  What I'm trying to do is to change all of the names within the project and change the hierarchy to use all the x's.  I can't see any way of doing it to be honest, but I can't believe that there isn't one.
 
I'm working in LabVIEW 7-1, but I can make them both 8-20 for the purposes of this exercise.
 
Thanks
 
0 Kudos
Message 1 of 3
(3,071 Views)

You need to recursively open all the VIs (not including vi.lib VIs) using the Callee's property available for each VI and then save them from the bottom up. If you don't do it from the bottom up, you will need to do the saving more than once to make sure they all reference the new names. There are several demonstrations of various stack based recursive algorithms available on the net. 8.2 should have such a VI for listing a hierarchy of files.

Specifically, if I remember correctly, MGI had a VI for renaming a hierarchy in its site.


___________________
Try to take over the world!
Message 2 of 3
(3,067 Views)

Many thanks, I will have a root around some more.  I have made one which I think works this afternoon but it is a bit rough.

Thanks again.

 

0 Kudos
Message 3 of 3
(3,057 Views)