I'm new to pyautocad and trying to work with an existing .dwg file open in a running instance of autoCAD.
from pyautocad import Autocad, APoint
acad = Autocad(create_if_not_exists=False, visible = True)
acad.Application #this gives me an error
I cannot even get the active application instance. When I try to access the active application instance via acad.Application
or acad.app
I get an error:
[WinError -2147221005] Invalid class sting
Even the example from the docs doesn't work.
acad = Autocad(create_if_not_exists=True)
acad.prompt("Hello, Autocad from Python\n")
print(acad.doc.Name)
What am I doing wrong? Is there another Python library I can use to interact with AutoCAD?