08-13-2012 03:51 PM
Hello, I was wondering if there was a way to programatically use the Find All Instances function with scripting? At the moment my work around is very slow but works.
I have a reference to a VI and I have my project open, I then want to find all the places that this VI is used. At the moment I get all VIs in Memory (Application >> All VIs in Memory), then for each VI I get all SubVIs on the block diagram (Traverse References). Then for each subVI in each VI in memory, I get the path to the VI and compare it to the path of the VI I want to find.
As one can imagine this takes too long. Especially when I can right click my VI's Icon and say Find all Instances and get all 6 instances seemingly instantly. I searched for a while and couldn't figure out if this was possible or how to do it. Thanks.
Attached is my attempt, which just counts the number of times the search VI is called.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
Solved! Go to Solution.
08-13-2012 03:57 PM
I would try the following:
Since everything is in memory already, I would expect this to take very little time. I could be wrong, since I have not tried.
08-14-2012 07:41 AM
Well that was easy, not sure why I didn't think of that. In any case I made a new VI that does what you mention and it indeed works much faster. Attached is the improved version in case someone was interested.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord