LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to use SubVI replace invoke node in VI scripting?

Solved!
Go to solution

Hi,

What I want to achieve was to change a VI's every SubVI's name programmactically.

For example, I have a VI called Main_tst1.vi. It called two VIs: tst1_init.vi, and tst1_close.vi. 

To change their name to tst2_init.vi and tst2_close.vi, I first copied tst1_*.vi to tst2_*.vi using "Copy" vi under Adv File Functions. Then I ran the code in the caption below:

 

Replace SubVI.png

 

I expected the next time I open Main_tst1.vi, its subVIs would become tst2_*.vi. However, they remained tst1_*.vi. 

Can anyone tell me where I did it wrong and how to fix it?

 

The VI in the capture and a folder containing the VIs to rename are attached as a zip file.

 

 

Thanks in advance!

0 Kudos
Message 1 of 3
(2,721 Views)
Solution
Accepted by topic author littlett01

I assume you need to save the modified VI also?

/Y

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

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 2 of 3
(2,694 Views)

Hi Yamaeda,

 

Yep. You are right. That's the issue. Oops, I should have noticed it.

Thanks a lot!

/L

0 Kudos
Message 3 of 3
(2,679 Views)