.NET

.NET

Reply
Active Contributor
btillman
Posts: 48
Registered: ‎07-25-2012
Message 1 of 3 (148 Views)

How To Shut AutoCAD Down After Launching from VB.NET

148 Views, 2 Replies
07-26-2012 09:37 AM

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.

Active Contributor
btillman
Posts: 48
Registered: ‎07-25-2012
Message 2 of 3 (147 Views)

Re: How To Shut AutoCAD Down After Launching from VB.NET

07-26-2012 09:55 AM in reply to: btillman

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.

ADN Support Specialist
fenton.webb
Posts: 352
Registered: ‎07-24-2007
Message 3 of 3 (114 Views)

Re: How To Shut AutoCAD Down After Launching from VB.NET

07-30-2012 04:40 PM in reply to: btillman

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.





Fenton Webb

Developer Technical Services

Autodesk Developer Network


Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.