title: How to open autocad drawings in vb.net and run scripts?
body: <p>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:</p>
  
  <pre><code> Dim myapp As New Autodesk.AutoCAD.Interop.AcadApplication
   Dim docMgr As AutoCAD.Interop.AcadDocuments = myapp.Documents
  
   docMgr.Open(File.FullName, False)
  </code></pre>
  
  <p>Can anyone help me understand why it just doesn't work?</p>
  
  <p>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.</p>
  
  <p>The COM Details Exceptions is: -2147418113</p>
  
  <p>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 :(</p>