Open jaivishnuks opened 4 years ago
I encounter the same question, and I solved it by different way. for obj in acad.iter_objects(): print(obj.ObjectName)`
This reason may be we have installed more than one version of AutoCAD, so I changed :
for obj in self.acad.model: print(obj.ObjectName)
Hi i tried a small code as shown below `from pyautocad import Autocad, APoint
acad = Autocad(create_if_not_exists=True) acad.prompt("Hello, Autocad from Python\n") print(acad.doc.Name)
for obj in acad.iter_objects(): print(obj.ObjectName)`
I am getting an error. COMError: (-2147417851, 'The server threw an exception.', (None, None, None, 0, None))
I am using python 3.7.7 , win10 64 bit and autocad mechanical 2019 with vba enabler engine installed.