LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Programmatically searching vi's for functions or text

How can I programmatically search vi's present in different sub folders for the occurance of a particular text or a function?
0 Kudos
Message 1 of 6
(3,476 Views)

Hi rashid,

i´m not sure, but maybe it´s possible with labview scripting.

Mike

0 Kudos
Message 2 of 6
(3,434 Views)

I have to backup Mike's opinion on this Q.

Programatic searching is something I have never heard mentioned prviously.

Now if you are just trying to serach for something in a set of VI's used in an app then using a "Tree.vi" (a non-functional VI that contains all top level and dynamic VI) is useful.

I use Tree.vi"s for all of my applicaitons that involve dynamic entities.

Can you explain a bit more about what you are attempting that prompts this query?

Trying to help,

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 3 of 6
(3,431 Views)
You can't.

Using scripting, you could open each and every VI, and search for items, but
scripting not a supported feature, and in >8.0 it's not an open feature
(meaning it's not really possible, (it is possible (search LAVA forum)) but
very unconvenient, and you need 7.1 next to your version). Even if you'd
consider scripting, what you want to do is not easy at all. See all the
sidenotes? I'd stay away from it.

Why do you need this?

Sorry,

Wiebe.


0 Kudos
Message 4 of 6
(3,414 Views)
Tree.vi!
A very imaginative solution.

Now the explanation for what I wanted to do;
Sometimes we have to search for certain text or functions etc in all files (vi's and vit's). Now I was wondering if it was possible to make an application that would accomplish that for me. I would give it the path to the top level folder that contains subfolders that contains all the files making up the project and the text or the name of the function that I am searching for and the vi would return the names of all the vi's that are positive for the search term. A general purpose application that would make earching multiple files easy.
0 Kudos
Message 5 of 6
(3,396 Views)
You could make a VI that opens references to all VI's in a directory
hierarchy. That is very easy, since LV has a recursive file search. Simply
put it's output in a for loop, and use VI server to open all the VI refs.

Once the VI's are in memory, the standard LV search function will find
objects in those VI's as well. Just make sure the VI that opens the
references is still running when you use the search.

Regards,

Wiebe.


0 Kudos
Message 6 of 6
(3,382 Views)