Hello all,
Not really sure that I have a problem with win32 Extensions here but anyway.. (Please also note that I'm not very well versed with win32 nor COM, I merely use it when I develop Python apps that use COM objects.) I try to call a method on the Solid Edge API, which provides a COM interface. In general, things work nicely, Thanks Mark for supplying win32 Extensions :o) The specific call expects two parameters by reference and these parameters shall, upon return, contain the sought data. Usually, I get the data as a returned tuple but this specific call instead raise an exception(!) >>> first = 1.0 >>> scnd = 1.0 >>> se.ActiveDocument.Sheets(3).ComplexStrings2d(10).GetCentroid(x=first, y=scnd) Traceback (most recent call last): File "<pyshell#7>", line 1, in <module> se.ActiveDocument.Sheets(3).ComplexStrings2d(10).GetCentroid(x=first, y=scnd) File "C:\Python25\lib\site-packages\win32com\gen_py\943AC5C6-F4DB-11D1-BE00-0 80036B4D502x0x1x0.py", line 3088, in GetCentroid , y) File "C:\Python25\lib\site-packages\win32com\client\__init__.py", line 448, in _ApplyTypes_ dispid, 0, wFlags, retType, argTypes, *args), com_error: (-2147417851, 'The server threw an exception.', None, None) Question: Where should I really look? Is it win32 Extensions or is it Solid Edge? Thought: The COM error states that the *server* threw exception so look there BUT the call works from VB.. Using Python 2.5.1, pywin32-210, SolidEdge v18 PS. In case someone out there happens to know about Solid Edge, the call is object.GetCentroid(x, y) which is expected to return coordinates for the object. The VB call looks like Dim dblx As Double Dim dbly As Double Call objCompStrn1.GetCentroid(x:=dblx, y:=dbly) DS. Maria Reinhammar Software Engineer Swisslog-Accalon AB Box 135 SE590 10 Boxholm Sweden * Phone: +46 (0)142 555 00 * Direct: +46 (0)142 556 08 * Fax: +46 (0)142 555 55 * Mobile: +46 (0)703 99 84 65 * Email: [EMAIL PROTECTED] <BLOCKED::mailto:[EMAIL PROTECTED]> * Web: http://www.swisslog-accalon.com <BLOCKED::http://www.swisslog-accalon.com> *Skype: accalonmar ************************************************************************ ************************ CONFIDENTIALITY AND DISCLAIMER This e-mail and its attachments are intended for the above named addressee(s) only and may be confidential. If the mail has come to you in error please reply to this e-mail and highlight the error. In addition, we kindly ask you to destroy the Mail. Please be aware that we disclaim all liability for the integrity or for the accuracy of this Mail, as transmissions via Internet are not error free communications medium.
_______________________________________________ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32