LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I search for controls in all VIs?

Just a question to see if this is possible or not. I want to search all of my VIs to see if a particular control exists in any of them. Is there a way to do this?
0 Kudos
Message 1 of 6
(2,974 Views)
If the control is a typedef you can just search by typedef using the built-in searching (as long as the typedef is in memory). Otherwise, you'll need to search by text. That will search the labels of the controls.
0 Kudos
Message 2 of 6
(2,960 Views)
Yeah that is what I want to do. The control is a typedef and is not in memory. I want to search the VIs that I have to see if the typedef exists in any of the VIs. Can you explain to me how you would do a search by text?
0 Kudos
Message 3 of 6
(2,956 Views)
If the control is a typedef it will be in memory as long as one VI that uses it is in memory.

To search by using the typedef:
  1. Open the search window (Edit->Find and Replace).
  2. At the top click on the "Objects" radio option.
  3. Click on the "Select Object" icon. This pops up a menu where you can select "Type Defs" and then your typedef.
  4. Set your search scope.
  5. Click Find.
To search by text:
  1. Open the search window (Edit->Find and Replace).
  2. At the top click on the "Text" radio option.
  3. Enter your text in the textbox.
  4. Set your search scope.
  5. Click Find.
0 Kudos
Message 4 of 6
(2,954 Views)

Since you say you want to search all your VIs and that the control is not in memory, it seems you have two options:

  • Write a program which opens the typedef once, opens all of your VIs and checks the typedef's Callers property each time. You can be smart and do some caching if you want so that you don't open VIs more than once. I think this is the better solution, but it will probably take longer to run.
  • If I remember correctly, a typedef will be named explicitly (in ASCII) inside the binary data, so you can read the binary data of all of the VIs and search it for the name of the typedef. I suggest you look first at a couple of VIs which you know have the typedef to see how this would work.

If you have a lot of VIs, both of these will probably take a lot of time and might consume a lot of memory. Running overnight seems to be the solution.


___________________
Try to take over the world!
0 Kudos
Message 5 of 6
(2,942 Views)
Thanks for the help.
0 Kudos
Message 6 of 6
(2,927 Views)