Help! Lisp to do "Close without save"
CADForums.net Forum Index CADForums.net
Discussion of AutoCAD and other CAD software.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web cadforums.net
Help! Lisp to do "Close without save"

 
Post new topic   Reply to topic    CADForums.net Forum Index -> Customization
Author Message
Medeziner
Guest





Posted: Sun Jun 26, 2005 8:10 am    Post subject: Help! Lisp to do "Close without save" Reply with quote

I have an old set of drawings that I want to open and extract the text. I
have a lisp
routine that does then job but I have quite a few drawings where I need to
unfreeze
layers before doing the text extract. I want to then close the drawing
without saving
and without having to answer the question "Save changes". I have tried the
following
but even after setting expert to 5 they still won't close without the "Save
changes" prompt.

(command "close" "Y") <Enters the close command and then gives me [Y
Unknown command "Y". Press F1 for help.]
(command "exit" "Y") <Enters the exit command and then gives me [Y
Unknown command "Y". Press F1 for help.]
(command "quit" "Y") <works but exits AutoCad. Not what I want to do.

I have over two thousand drawings and I need these files to remain
unchanged.
Anyone got an answer?

Thanks
Richard

Back to top
medeziner
Guest





Posted: Tue Jul 19, 2005 8:10 am    Post subject: Re: Help! Lisp to do "Close without save" - THE ANSWER Reply with quote

I found that I could use a simple script file to do the trick

*** script file with the following
close
y
*** end of script file


"Medeziner" <medeziner@comcast.net> wrote in message
news:RcWdnQoRyI8NrSPfRVn-3w@comcast.com...
Quote:
I have an old set of drawings that I want to open and extract the text. I
have a lisp
routine that does then job but I have quite a few drawings where I need to
unfreeze
layers before doing the text extract. I want to then close the drawing
without saving
and without having to answer the question "Save changes". I have tried the
following
but even after setting expert to 5 they still won't close without the
"Save changes" prompt.

(command "close" "Y") <Enters the close command and then gives me [Y
Unknown command "Y". Press F1 for help.]
(command "exit" "Y") <Enters the exit command and then gives me [Y
Unknown command "Y". Press F1 for help.]
(command "quit" "Y") <works but exits AutoCad. Not what I want to do.

I have over two thousand drawings and I need these files to remain
unchanged.
Anyone got an answer?

Thanks
Richard
Back to top
Bill H
Guest





Posted: Thu Aug 25, 2005 8:10 am    Post subject: Re: Help! Lisp to do "Close without save" Reply with quote

When I get something similar, I sometimes put a (Command "undo" "B" "Y") at
the end of the lisp routine, just for peace of mind.
Doesn't really accomplish anything, but it sets the drawing back to the
state it was in when I opened it and somehow that makes me feel safe.

"Medeziner" <medeziner@comcast.net> wrote in message
news:RcWdnQoRyI8NrSPfRVn-3w@comcast.com...
Quote:
I have an old set of drawings that I want to open and extract the text. I
have a lisp
routine that does then job but I have quite a few drawings where I need to
unfreeze
layers before doing the text extract. I want to then close the drawing
without saving
and without having to answer the question "Save changes". I have tried the
following
but even after setting expert to 5 they still won't close without the
"Save changes" prompt.

(command "close" "Y") <Enters the close command and then gives me [Y
Unknown command "Y". Press F1 for help.]
(command "exit" "Y") <Enters the exit command and then gives me [Y
Unknown command "Y". Press F1 for help.]
(command "quit" "Y") <works but exits AutoCad. Not what I want to do.

I have over two thousand drawings and I need these files to remain
unchanged.
Anyone got an answer?

Thanks
Richard



Back to top
 
Post new topic   Reply to topic    CADForums.net Forum Index -> Customization All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




Windows Server DSP VoIP Electronics New Topics
Powered by phpBB