06-14-2011 05:56 PM
I have 50+ VIs that have the same subvi that needs to be replaced with a different VI.
Any ideas on how to do this?
Solved! Go to Solution.
06-15-2011 01:28 AM
Hi,
on the sub-vi : right click => Find All instances
Then you can check all places where the sub-vi is called, and click under "Replace with", and select the replacement VI.
Then Replace all.
I Hope this will solve your problem.
regards,
06-15-2011 01:55 AM - edited 06-15-2011 01:55 AM
Post deleted.. ramses solution will be better:)
06-15-2011 12:56 PM
Your solution only handles open VIs.
I need to look through 50+ VIs that are not in memory.
06-15-2011 01:58 PM
Hey glennjammin,
It might be sort of a pain, but you could drop all your VIs into a project and use the methods in this article. That should allow you to identify all of the VIs that use your subVI and replace them. Hope that helps!
06-15-2011 02:30 PM
Assuming none of the VIs are in memory, and you don't have any other projects that use the old VI, you can simply make a backup copy of the old VI and then copy the new one to the same location with the same name (assuming the same connector pane). At least, this is what I have done with LV7.1 - no idea if this is a problem with later versions or for projects using source code control.
Regards,
Michael Tracy
Synergy Microwave
06-15-2011 02:49 PM
Use a Tree VI. A Tree VI is an non-functional VI which contains all the VIs which are part of the overall program. Nothing is wired to any of them. It is primarily for documentation purposes. It is not as common with Projects.
If all the VIs which contain the subVI are placed on the block diagram of the Tree VI and you replace the subVI on the Tree, it should replace it everywhere. I have not done this for a while, so make sure you look at the replacement options to be sure to replace all.
Lynn
06-15-2011 03:43 PM
Inject the new VI inside the old VI, the overhead of the extra call is (almost) nothing.
However search and replace would be my friend.
Ton
06-17-2011 09:18 AM
Thanks for all the suggestions! I believe the the Tree method works the best. Also I am not familiar with it too much but it may be possible to use VI scripting.