[Tutor] How to send an array of clusters from python to labview??
dyoo at hkn.eecs.berkeley.edu
Mon Jun 27 20:48:09 CEST 2005
On Mon, 27 Jun 2005, john taylor wrote:
> i am using win32com to call labview from python over COM. i want to set
> the value of a control element in a VI per SetControlValue(), and the
> control in the VI is an array of cluster, which has the structure
> (integer, integer, string).
> >>> aoc = ((2,3,"hello"), (4,5,"world"))
> >>> vi.SetControlValue("array of cluster", aoc)
> Traceback (most recent call last):
> File "<interactive input>", line 1, in ?
> File "<COMObject <unknown>>", line 2, in
> com_error: (-2147352567, 'Ausnahmefehler
> aufgetreten.', (0, None, None, None, 0, -2147352571),
This seems a bit specific to the Windows platform; you might want to ask
this on Python-win32, especially since it looks like other LabView folks
have been asking questions there too:
The Python-Win32 list is here:
It's not that we don't like answering questions, but that I don't think
many of us here have the expertise to help with COM issues. The folks at
python-win32, however, should be able to help you. It will also be useful
to show how you're constructing the labview object 'lv'.
>From a first glance, you meantion that SetControlValue takes in an array
of cluster information. You've contructed a tuple:
aoc = ((2,3,"hello"), (4,5,"world"))
and I'm not quite sure if the COM bridge will automatically translate this
into an 'array' that COM likes.
According to the thread on:
and Mark Hammond's reponse:
you might need to build your 'lv' object in a particular way to make sure
the proper type information is maintained.
But again, I don't run Windows: I have no clue what's going on. *grin*
Ask the win32 list, and someone there should be able to figure out what's
Best of wishes!
More information about the Tutor