Dear All,

I am facing a problem passing an array by reference. It is exactly the
same problem as described in this thread:

https://mail.python.org/pipermail/python-win32/2002-November/000562.html

In short, I have a valid reference to a Position object. This object has
two methods,
GetComponents and SetComponents that each take a CATSafeArrayVariant as
an argument. This CATSafeArrayVariant should in this case be a
one-dimensional
array of real values.

A CATSafeArrayVariant is a typedef for a CATVariant which itself is (exactly
copied from the documentation) "typedef any CATVariant".

I tried the obvious ways of passing standard python tuples and lists of
size 12.
The calls itself succeed, however the values are never updated.

I also tried the new VARIANT object with different type specifiers, but I
always
get the error message:
     TypeError: Objects for SAFEARRAYS must be sequences (of sequences),
                        or a buffer object

I do not have access to either the IDL description or sourcecode for the
call. In
addition, I cannot find the Get/SetComponent methods when I run makepy.

All in all, not the best situation. It is a little frustrating, because I
have 95% of the
functionality I need up and running in Python instead of VBA. This way it
perfectly
fits in the rest of the code I have, so if I can avoid switching to VBA, it
would be
great. By the way, the call works fine in VBA.

Does anybody have an idea on how to solve this?

Kind regards,

Marco
_______________________________________________
python-win32 mailing list
python-win32@python.org
https://mail.python.org/mailman/listinfo/python-win32

Reply via email to