From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to replace a sub vi that is used in many main VIs with another sub vi under a different file name without repeating the replace vi operation?

Hello,
I am converting a LV5.1.1 llb to LV7.1 that contains serial sub VIs ("Serial Port Read.vi", "Serial Port Write.vi", and "Bytes at Serial Port.vi") that need to be replaced with the newer VISA serial sub VIs ("VISA Read.vi", "VISA Write.vi", and "VISA Bytes at Serial Port.vi").  The older serial sub VIs are used on many different main VIs under the same llb, and I want to be able to replace all the older serial sub VIs with the equivalent VISA sub VIs in LV7.1 without repeating the same replace VI task on each main VI.  Please advise if it can be done in LV7.1 and how?
 
Thank you so much for your help,
Valen
Message 1 of 6
(2,604 Views)
If you have the old serial VIs in the llb, make a copy of it and delete them. Then, when you open the top level VI in 7.1, LabVIEW should replace them with compatibility VIs of the same name but using VISA.
0 Kudos
Message 2 of 6
(2,600 Views)

I have the same question but the answer given by Dennis_Knutson wasn't exactly clear.  Can you break out the explanation with more details?

 

I have a few subvi's that used in a few dozen places in my application that i would like to replace with updated versions that have a different name.

-Regards

eximo
_______________________________________________
UofL Bioengineering M.S.
Neuronetrix

"I had rather be right than be president" -Henry Clay
0 Kudos
Message 3 of 6
(1,972 Views)

Here's how I've approached such things, there may be a better way.

 

1. With your project and any calling vi's open (to make sure linkages get updated), rename your old subvi to have the name of the new subvi.

 

2. Shutdown LabVIEW entirely.

 

3. Behind LabVIEW's back, rename or move the old subvi so it can't be found.  Place the new subvi of the same name in a location next to one of its callers where it *can* be found.

 

4. Re-open LabVIEW, your project, and any calling vi's.  You may get prompted once to locate the new subvi, after that the project and all its callers should update their links. 

 

5. Save callers and project.

 

 

-Kevin P

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 4 of 6
(1,965 Views)

"ctrl-f"

 

You can select the VI you want to replace and copy it.

 

"Ctrl-f" and then select object and search for it.

 

Once you find it there is an option to replace.

 

It should allow replacing one with another.

 

Try it out!

 

Ben 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 5 of 6
(1,961 Views)

Better way found.  Thanks Ben!

 

 

-Kevin P

CAUTION! New LabVIEW adopters -- it's too late for me, but you *can* save yourself. The new subscription policy for LabVIEW puts NI's hand in your wallet for the rest of your working life. Are you sure you're *that* dedicated to LabVIEW? (Summary of my reasons in this post, part of a voluminous thread of mostly complaints starting here).
0 Kudos
Message 6 of 6
(1,953 Views)