06-27-2014 06:38 PM
Suppose that several VIs running simultaneously on the same computer. How can I find out the names of the running VIs, from another VI?
If the already running VIs are clones of the same basic VI, open and run with the option "Prepare to call and forget", how can I find out the names and index of each clone?
06-28-2014 12:06 AM
You have the VI server property to find the Names of the VIs that is in memory. Then you can find out the state of the VI and check whether the VI is clone or not. I am not sure about the clone index.
06-28-2014 12:18 AM
Thanks for the information. I'll dig around it.
06-28-2014 07:48 PM
If by clone index you mean like "clone 1" or "clone 42", I believe that is part of the instance's clone name (there's a property for it).
Mike...
07-05-2014 01:02 PM
I had an application where I spawned (= ran with Start Asynchronous Call) multiple (reentrant) copies of VIs, and would occasionally "lose control" of them. I needed a way to find all VIs that were running "Top Level" and stop them (so I didn't have to log off from Windows).
I used the Application Property "All VIs in Memory" to get an array of (wait for it ...) All VIs in Memory. I took each name, opened a VI reference to it (simply wire the name string in, as the VI is, by definition, "in memory"), looked at its VI Execution State, and if it was Run Top Level, Invoked the FP.Close and Abort VI Methods. [To prevent the VI that did all this from "committing Suicide", I compared the name string with the current Call Chain, and did nothing if there was a match].
I think you could adopt this idea to do what you need.
BS