LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Search & Replace in LabVIEW

Hello All

Is there a way to do a "Search & Replace" in LabVIEW as in other e.g. text based programming languages?

In LabVIEW you can right click at the object and select replace. But when I have many of instances this procedure is getting long.

I know I can save other vi as the given vi, but this will replace also other instances in other projects, which I do not want.

Thanks in advance.
Pawel
0 Kudos
Message 1 of 6
(2,990 Views)
The closest thing that I am aware of is "Edit > Find".
You can select all the items from the Search Results list. But unfortunately, you have to replace each one at a time... :o(

What you are looking for would be very useful. Hopefully, someone has a neat trick they can share..

🐵

-JLV-
0 Kudos
Message 2 of 6
(2,990 Views)
Hello Joe

Edit -> Find is the only thing which keeps me out from getting balistic :).

regards
Pawel
0 Kudos
Message 3 of 6
(2,990 Views)
Hi Pawel,

I don't think LabVIEW supports that kind of feature. It's definitely one nice feature everyone will be happy to see in the next version of LabVIEW though.

You can post the idea on LabVIEW poll "Features you would like to see in LabVIEW!" in this forum... 🙂

Dan
0 Kudos
Message 4 of 6
(2,990 Views)
This could have partial usefulness for sub VIs, but not for plain LabVIEW items (who would want to do a global replace of all "add" with a "multiply"... 😉

Unlike in text based languages, "replace" is not such a clear cut operation. What do do if the terminals don't match? Often, it requires a manual cleanup.

There are a few workarounds, depending on how your VIs are organized. Are both in user.lib?
For example, if you really need to replace a subVI in a complex application, save it as development distribution, quit LabVIEW, then use explorer to temporarily rename the obsolete subVI and replace it with the new VI using the old name. Now re-open the toplevel VI, doubleclick any instance of your new subVI and give it the new more appropriate name. Save e
verything again and all will be updated to call the new subVI using the new name.

Now rename the old subVI back to what it was so other projects that use it don't choke.
0 Kudos
Message 5 of 6
(2,990 Views)
Hello altenbach

I agree that it could look difficult when the terminals do not match. But this is something that NI should look into. After all even now thay have a tool called "relink to subvi", which works from time to time :).

regards
Pawel
0 Kudos
Message 6 of 6
(2,990 Views)