Probably the easiest way is to utilize vi server operations. Vi server will allow you to open a vi and close a vi programmatically. This is a great example that is built into LV. THis should give you some ideas. Hope this helps.
BJD1613
Lead Test Tools Development Engineer
Philips Respironics
Certified LV Architect / Instructor