Passing a tuple of lists to ActiveX

Anand anand at calbay.com
Thu Feb 27 21:20:23 EST 2003


Hi,
       I am trying to talk to labview XY graph using ActiveX. Here is
a small piece of code that i used.

>>> LV = win32com.client.Dispatch("Labview.application") #get an
handle to labview activex server

>>> vi = lv.getvireference(r'c:\test.vi') # open the vi containing the
graph

>>> vi.setcontrolvalue("Graph1",[(1,2,3),(1,2,3)])
Traceback (most recent call last):
  File "<interactive input>", line 1, in ?
  File "<COMObject <unknown>>", line 2, in setcontrolvalue
com_error: (-2147352567, 'Exception occurred.', (0, None, None, None,
0, -2147352571), 2)
>>> vi.getcontrolvalue("Graph1")
((10.0, 11.0), (10.0, 11.0))

I am able to read from the graph object but i am not able to write to
it!. The write works only for 'None'. Is this because python cannot
send a array of tuple or sequence as a variant?  I am a new to python.
Thanks in advance for your time and help.

Thanks,
Anand.




More information about the Python-list mailing list