netta Posted May 9, 2008 Report Share Posted May 9, 2008 Hi Folks, Does anyone know a way to search a large collection of VIs for a piece of text defined in a string constant? I have an error message being logged from my application which has a piece of text which I suspect is declared statically somewhere but I have no way of finding where it's coming from. In a text-based language this is easy... In LV... not so obvious. Any suggestions would be very welcome. Cheers, Netta. Quote Link to comment
James N Posted May 9, 2008 Report Share Posted May 9, 2008 It's very simple if all VIs are loaded into memory. Open the top-level VI and hit Ctrl-F to bring up the "Find" dialog. Or via the menu, Edit>Find and Replace... Click the "Text" radio button. Type in the text to search. -James Quote Link to comment
netta Posted May 9, 2008 Author Report Share Posted May 9, 2008 QUOTE (James N @ May 8 2008, 04:06 PM) It's very simple if all VIs are loaded into memory.Open the top-level VI and hit Ctrl-F to bring up the "Find" dialog. Or via the menu, Edit>Find and Replace... Click the "Text" radio button. Type in the text to search. -James :thumbup: Thanks James.. Can't believe I missed that... I feel an utter fool now Now I just need to figure out how to get all my dynamically called VIs into memory at the same time so that I can search them.... hmm... Would a mass compile do it or does it unload the vis once it's done with them? Quote Link to comment
Rolf Kalbermatter Posted May 9, 2008 Report Share Posted May 9, 2008 QUOTE (netta @ May 8 2008, 12:59 PM) :thumbup: Thanks James.. Can't believe I missed that... I feel an utter fool now Now I just need to figure out how to get all my dynamically called VIs into memory at the same time so that I can search them.... hmm... Would a mass compile do it or does it unload the vis once it's done with them? I usually do this by creating a Top Level.vi and putting in whatever dynamic VIs I have. Masscompile won't help since LabVIEW unloads VIs during masscompile as soon as they are not used anymore. The project doesn't help either because the VIs in a project are not yet loaded. Rolf Kalbermatter Quote Link to comment
jdunham Posted May 9, 2008 Report Share Posted May 9, 2008 QUOTE (James N @ May 8 2008, 09:06 AM) It's very simple if all VIs are loaded into memory.Open the top-level VI and hit Ctrl-F to bring up the "Find" dialog. Or via the menu, Edit>Find and Replace... Click the "Text" radio button. Type in the text to search. -James Note that the Find dialog lets you limit your text search to the block diagram only and labels versus data, which can be really handy when looking for more common words. The search box will (thankfully) remember your choice, which can trip you up next time, but generally I only search on block diagrams. This is really handy if you are searching for specific bundling and unbundling of items in a cluster. The item name will be on every front panel of every VI using the cluster, but often it will be in just a handful of places on diagrams. Quote Link to comment
netta Posted May 9, 2008 Author Report Share Posted May 9, 2008 QUOTE (rolfk @ May 8 2008, 06:20 PM) I usually do this by creating a Top Level.vi and putting in whatever dynamic VIs I have. Masscompile won't help since LabVIEW unloads VIs during masscompile as soon as they are not used anymore.The project doesn't help either because the VIs in a project are not yet loaded. Rolf Kalbermatter I know this is the recommended technique but I have over 100 GOOP classes (over 2000 VIs) so putting them all in one top level VI is not something I relish doing I wonder if I could do this programmatically? In fact solving this would also help with finding usages of VIs which is also not possible at the mo unless everything is in memory... And then there's also the question of whether there's enough memory to hold it all in. Quote Link to comment
Yair Posted May 10, 2008 Report Share Posted May 10, 2008 QUOTE (netta @ May 8 2008, 11:39 PM) putting them all in one top level VI is not something I relish doing I wonder if I could do this programmatically? It should be relatively simple using scripting. I can't do this at the moment, but it's probably a matter of getting a reference to the VI's diagram and calling a method on that to add a VI or something similar. Of course, this won't help you with the memory issue. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.