Hello group,

I'm getting an error when trying to launch AutoCAD using comtypes.  The
application does get started. But the variable 'app' does not seem to hold a
valid instance of it, because I was not able to access its properties such as
ActiveDocument, WindowState, etc..

This is copied from Python shell:

>>> import comtypes
>>> comtypes.__version__
'0.4.2'
>>> app = comtypes.client.CreateObject("AutoCAD.Application")
# Generating comtypes.gen.AutoCAD
Traceback (most recent call last):
  File "<interactive input>", line 1, in <module>
  File "C:\Programming\Python\Install\comtypes\comtypes\client\__init__.py",
line 202, in CreateObject
    return _manage(obj, clsid, interface=interface)
  File "C:\Programming\Python\Install\comtypes\comtypes\client\__init__.py",
line 170, in _manage
    obj = GetBestInterface(obj)
  File "C:\Programming\Python\Install\comtypes\comtypes\client\__init__.py",
line 133, in GetBestInterface
    interface = getattr(mod, itf_name)
AttributeError: 'module' object has no attribute 'IAcadApplication'

Any idea why?

(btw, if I remember correctly, I didn't used to get this error. But I was using
an earlier version comtypes and an earlier version of AutoCAD.)

Thanks.

-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
comtypes-users mailing list
comtypes-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/comtypes-users

Reply via email to