I have a process to create drawings using LISP. Basically, it creates a drawing using LISP. My VB.NET project reads this data from some text files and the launches AutoCAD, loads the proper LISP file and creates the drawing. The question now becomes how do I return control back to the VB.NET program so I can take care of some housekeeping chores, and then shutdown AutoCAD? The time it takes to create the drawing is minimal, but waiting for AutoCAD to open up is painfully slow. Regardless, it runs pretty well. I just need a way to take control again once the drawing is completed.
A little bit of research shows me that could use (startapp) from within the LISP program. I think that will work for me but I'm wondering what happens to control of the system. The app runs and does it's housekeeping chores so I could either have the app (which will be a compiled vb.net program) shutdown AutoCAD or I could have the LISP program shutdown AutoCAD.
I'm still left wondering what happens to the original VB.NET program which launched autocad. If I added additional code to the end of it, of course I would need to wait until the LISP program has created the drawing, but that seems to be the way I would want to go. Then I could continue where I left off with the tasks needed to complete the process.
Controlling full AutoCAD from a .NET application using Scripts is a little messy, as i'm sure you have found.
If you are using AutoCAD 2013, you should not run acad.exe with the scripts, but instead accoreconsol.exe. That way, you won't get any UI that takes focus away from your parent .NET app.