Closes the drawing file and exits the AutoCAD application.
Supported platforms: Windows only
No return value.
If AutoCAD is in the middle of a command, an "AutoCAD unable to service automation request" error message will be generated. If the document has not been saved, you will be prompted to save the drawing.
VBA:
Sub Example_Quit()
    ' Warning: This example will quit AutoCAD and VBA.
    
    ThisDrawing.Application.Quit
    
End Sub
Visual LISP:
(vl-load-com)
(defun c:Example_Quit()
    ;; Warning: This example will quit AutoCAD.
    (setq acadObj (vlax-get-acad-object))
    (vla-Quit acadObj)
)