LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I Open a VI Reference to a version of a VI Template running in memory?

I'm spawning multiple versions of a VI Template using the VI server. I understand that each time I run a new version of the template it gets it's own space in memory. I then need to get a VI Reference to each indiviual version of the template running in memory so that I can open and close front panels dynamically, fron the calling VI and the template itself. When a version of a VI template is dynamically run LabVIEW renames it, so that the name of the VI running in memory is slightly different from the name of the template that it was based on, so I can't wire a name into the "Open VI Reference" node. I tried using the "Current VI's Path" node inside the template itself and that did not wor
k either.

I hope I explained this well enough. Any help greatly appreciated.
0 Kudos
Message 1 of 3
(2,972 Views)
You say you`re opening the template using VI server.

This means that you already HAVE a reference to each vi you have opened (Somewhere in the code). Collect the VI references for each instance when opening (in an array for example), and use these to programatically close the VIs.

Shane.
Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
0 Kudos
Message 2 of 3
(2,972 Views)
Alternatively, you can open a reference to the LV application and use a property node to get the names of all VIs in memory. Using this, you can generate a reference to the individual VIs too (without having to enter the path). You can wire the name of the VI to the "path" input of the open VI reference VI to open a reference to the VI if it is already in memory.

Shane.
Using LV 6.1 and 8.2.1 on W2k (SP4) and WXP (SP2)
0 Kudos
Message 3 of 3
(2,972 Views)