I'm trying to open all .dwg files in a folder with AutoCad and run a previous written script. In order to do that, I built the following code:
Dim myapp As New Autodesk.AutoCAD.Interop.AcadApplication
Dim docMgr As AutoCAD.Interop.AcadDocuments = myapp.Documents
docMgr.Open(File.FullName, False)
Can anyone help me understand why it just doesn't work?
First, I was getting that "RPC_E_CALL_REJECTED" error. But I inserted a handle to read the isQuiescent state and now I just run .Open when AutoCad is idle but stills, Visual Studio is returning me an error without any number.
The COM Details Exceptions is: -2147418113
Does anybody know the correct way to simple open an existing file and run a script in AutoCad? I don't know, I just followed the AutoDest instruction at their webpage and I thought that it would be easy :(