I am having trouble writing a line in lisp that will close a drawing and not save changes. In a sense answering NO when prompted "Do you want to save changes". Can anyone help?
Thanks Jason
|
I am having trouble writing a line in lisp that will close a drawing and not save changes. In a sense answering NO when prompted "Do you want to save changes". Can anyone help?
Thanks Jason
Are you trying to close the current one? or other open ones?
The problem is that a lisp wants to finish in the drawing it is called in, so you will have to use a call to a VBA statement. Something like
This does not work, but maybe someone who knows more VBA can chime in a help with the correct statement.Code:(command "_.vbastmt" (strcat "AcadApplication.ThisDrawing.Close(false,\"" (getvar "dwgname") "\")"))
Okay, what you need is
This will close the current drawing without saving it.Code:(command "_.vbastmt" "ThisDrawing.Close(false)")