hi, 

anybody has called two VIs in parallel?? 

somehow like this: 
*****************************************
import win32com.client 
import thread 

lv = win32com.client.Dispatch("LabVIEW.Application") 

def start(): 
    vi2 = lv.GetVIReference("p2.vi") 
    vi2.Run() 

thr = thread.start_new_thread(start, ()) 

vi1 = lv.GetVIReference("p1.vi") 
vi1.Run() 

*****************************************

it doesn't work. i've tried calling functions of usual
objects in several threads like this and everything
was fine. but in this case, there must be sth to take
care of between COM objects and python. 

i've also tried the following: 
1. construct two lv objects in the main thread. 
2. construct lv objects in the main and the new
threads respectively. 
3. construct two vi objects in the main thread. 
4. pass lv or vi as argument when calling new thread. 
none of them works.  

anybody can help? 

cheers, 
john

_______________________________________________
Python-win32 mailing list
Python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to