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.htmlhttps://mail.python.org/pipermail/python-win32/2014-July/013234.html I am calling a method on a COM object that fills in an array passed by reference. The array must be initialized to a given size otherwise the call will fail. Currently I am able to complete the call and the array returned by the method is the one I passed as a parameter but unfortunately the value of the array does not change and it should. For your information the COM object I work with is a Position interface maintained by the CATIA COM server. The method is Sub GetComponents(CATSafeArrayVariant array). I understand that the CATSafeArrayVariant type is equivalent to an array of variants. The python call looks like this: > >> a = range(0,12) > >> b = myPosition.GetComponents(a) > >> print a # outputs (0,1,2,3,4,5,6,7,8,9,10,11) instead of the actual > >>components > >> print b # same output
This problem really bothers me. So any help will be appreciated. Thank you! luckyn...@163.com
_______________________________________________ python-win32 mailing list python-win32@python.org https://mail.python.org/mailman/listinfo/python-win32