Quit AutoCAD

<?xml encoding=”UTF-8″>By Virupaksha Aithal

AutoCAD.NET API exposes “Application.Quit()” to exit the AutoCAD. However, “Application.Quit()” at present is unable to save all the user profile setting (like active ribbon tab ). One alternative approach for the issue is to use quit AutoCAD command through “SendStringToExecute”   

[CommandMethod("quitACAD", CommandFlags.Session)]
static public void quitACAD()
{
//Quit AutoCAD
Application.DocumentManager.MdiActiveDocument.SendStringToExecute("quit ", true, false, true);
}

Comments

One response to “Quit AutoCAD”

  1. very informative.thanks

Leave a Reply

Discover more from Autodesk Developer Blog

Subscribe now to keep reading and get access to the full archive.

Continue reading