[ Foro de Python ]
from pyautocad import Autocad, APoint
acad=Autocad()
acad.model.AddLine(APoint(1,1),APoint(2,2))
Traceback (most recent call last):
File "c:\Users\alexx\OneDrive\Documentos\Python\ejemplo.py", line 3, in <module>
acad.model.AddLine(APoint(1,1),APoint(2,2))
File "C:\Users\alexx\AppData\Local\Programs\Python\Python38\lib\site-packages\pyautocad\api.py", line 85, in model
return self.doc.ModelSpace
File "C:\Users\alexx\AppData\Local\Programs\Python\Python38\lib\site-packages\pyautocad\api.py", line 74, in doc
return self.app.ActiveDocument
File "C:\Users\alexx\AppData\Local\Programs\Python\Python38\lib\site-packages\pyautocad\api.py", line 63, in app
self._app = comtypes.client.GetActiveObject('AutoCAD.Application', dynamic=True)
File "C:\Users\alexx\AppData\Local\Programs\Python\Python38\lib\site-packages\comtypes\client\__init__.py", line 180, in GetActiveObject
obj = comtypes.GetActiveObject(clsid, interface=interface)
File "C:\Users\alexx\AppData\Local\Programs\Python\Python38\lib\site-packages\comtypes\__init__.py", line 1239, in GetActiveObject
oledll.oleaut32.GetActiveObject(byref(clsid), None, byref(p))
File "_ctypes/callproc.c", line 948, in GetResult
OSError: [WinError -2147221021] Operación no disponible
(No se puede continuar esta discusión porque tiene más de dos meses de antigüedad. Si tienes dudas parecidas, abre un nuevo hilo.)