Open unmht001 opened 7 years ago
i read api.py , i found this:
def init(self, create_if_not_exists=False, visible=True): ....
and this :
def app(self): .... self._app = comtypes.client.GetActiveObject('AutoCAD.Application', dynamic=True)
i think , if init() and app() could know the version of autocad , will be better. like this .
self._app = comtypes.client.GetActiveObject('AutoCAD.Application.21', dynamic=True)
and it worked.
What is .21 in this self._app = comtypes.client.GetActiveObject('AutoCAD.Application.21', dynamic=True)?
i installed 2 versions of autocad cad2017 and cad2014 mechanical , i used code like this:
from pyautocad import Autocad a=Autocad() a.prompt("hello")
cad2014 mechanical was opened , why not cad2017? how to run this in cad2017?