Passing a tuple of lists to ActiveX

Lexy Zhitenev zhitenev at
Fri Feb 28 15:06:07 CET 2003

"Anand" <anand at> wrote in message:
news:c6303995.0302271820.5bf8d3c9 at

> >>> 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.

I'm not sure, I haven't worked with COM, but I have two possible reasons:
1) you supplied a _list_ of tuples, not a tuple of tuples, as you have got
in .getcontrolvalue
2) you used three-tuples, but .getcontrolvalue returned two-tuples.

Maybe, you need a special object to pass parameters. Are
setcontrolvalue/getcontrolvalue COM object methods?


More information about the Python-list mailing list