On Wed, Aug 20, 2008 at 1:54 PM, Thomas Heller <[EMAIL PROTECTED]> wrote:
> Anthony Tuininga schrieb:
>> Hi,
>>
>> I have successfully used pywin32 for a while now for doing COM related
>> stuff but ran into a problem with it using AutoCAD to create points
>> and lines as appears to be well known given the documentation for
>> comtypes. So I downloaded comtypes and installed it (0.5.1 and later
>> on SVN trunk) but immediately ran into a problem running the sample
>> code. Specifically, the instance is created fine and
>> app.ActiveDocument returns a value but app.ActiveDocument.ModelSpace
>> yields "no such interface supported" and so does anything else on
>> app.ActiveDocument from what I can tell.
>
> Anthony,
>
> can you post the complete traceback that you get, or step with a debugger
> into the code that retrieves .ModelSpace and examine where this fails?
> I think that "no such interface supported" is the message that you get
> when a QueryInterface() call fails, but what interface is it called with and 
> why?

The traceback doesn't produce anything useful, unfortunately.

Traceback (most recent call last):
  File "CreateSchedule.py", line 17, in <module>
    modelSpace = app.ActiveDocument.ModelSpace
_ctypes.COMError: (-2147467262, 'No such interface supported', (None,
None, None, 0, None))

I've tried and app.ActiveDocument returns something but any attempt to
reference ModelSpace or anything else that looks like an object
doesn't appear to work.

As for debugging, what sort of debugger were you referring to? I'm not
familiar with the comtypes architecture yet so some pointers as to
where to look would be helpful. I already saw the "QueryInterface"
call but didn't notice anything calling that before the exception took
place. Any suggestions on where to look next would be helpful. Thanks!

Anthony

> --
> Thanks,
> Thomas
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> comtypes-users mailing list
> comtypes-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/comtypes-users
>

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
comtypes-users mailing list
comtypes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/comtypes-users

Reply via email to