LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is there a way to programatically call the LabVIEW "find" function?

Hi,

My situation is this. I've inherited a LabVIEW program with about 375 vi's. Now when I build this into an executable, for memory reasons, I only want the "remove panel" feature set to no for vi's that are dynamically loaded. But I don't know exactly which vi's are dynamically laoded. But if I have all of the vi's in memory, I can search text for the vi name and if I find it, then that is where the vi is being dynamically loaded. That works okay, but you still have to search for each vi. I would like to run the find command through a for loop with an array of vi names as the indexed input and get some type of reply out. Is this possible or is there a better way to determine w
hich vi's are dynamically loaded? Thanks
0 Kudos
Message 1 of 4
(2,838 Views)
Using VI Server you can get a list of all VIs that are loaded at any given
time, using the "Application.AllVIs" property of the Labview application.
You can also find out if the panel is open or not. It should be quite
trivial to write a program to periodically- every 10 seconds, say, get the
list of all VIs in memory then at some later time give you a list of all the
VIs that have been loaded and do not open their panels. Or the program could
build a list internally of all the loaded VIs when you start it and then
only give you those VIs that have been loaded in since a certain time- the
possibilities are limited only by the bloodymindedness of the programmer.

sal wrote in message
news:506500000008000000C7160000-984280909000@quiq.com...
> Hi,
>
> My si
tuation is this. I've inherited a LabVIEW program with about 375
> vi's. Now when I build this into an executable, for memory reasons, I
> only want the "remove panel" feature set to no for vi's that are
> dynamically loaded. But I don't know exactly which vi's are
> dynamically laoded. But if I have all of the vi's in memory, I can
0 Kudos
Message 2 of 4
(2,838 Views)
Hi Craig,
I don't think that will work. The reason is this: If a vi is in memory, how do I know if it has been statically called or dynamically called? Some of my vi's that are dynamically called show their front panels and some do not. Maybe I'm missing something here.
0 Kudos
Message 3 of 4
(2,838 Views)
Well, that's covered in my suggestion of having a program first build a list
of all VIs in memory, and then start logging from then and only giving you
the VIs opened since the logger started. You load the application into
memory with all statically linked VIs then start the logger. The logger then
notes all the VIs in memory and ignores them. You then start the
application, and the logger notes all the VIs that are loaded in from that
point on, excluding itself, your application and your statically linked VIs.

All my suggestion does is gives you a list of the VIs in memory that you
then use to see if the panel is open using the relevant property node of the
VI- I recall you originally mentioned wanting to just type in an array of VI
names. There's
nothing stopping you doing this instead and having the
program periodically see if a reference can be opened to each VI in the
array and, if so, seeing if the panel is open. It's just that having a
program that does as I describe will save you having to identify and type in
all the names in such an array.

sal wrote in message
news:506500000005000000091C0000-984280909000@quiq.com...
> Hi Craig,
> I don't think that will work. The reason is this: If a vi is in
> memory, how do I know if it has been statically called or dynamically
> called? Some of my vi's that are dynamically called show their front
> panels and some do not. Maybe I'm missing something here.
0 Kudos
Message 4 of 4
(2,838 Views)