Siberian Posted August 17, 2007 Share Posted August 17, 2007 It annoys me that AutoCAD always opens a new drawing at startup...can I disable this somehow? Quote Link to comment Share on other sites More sharing options...
pefi Posted August 17, 2007 Share Posted August 17, 2007 Another dirty hack.... (defun QuitIfEmpty ( / ) (if (and (= (getvar "SDI") 0) (= (ssget "_X") nil)) (command "_close")) ) (QuitIfEmpty) Przemo Quote Link to comment Share on other sites More sharing options...
Guest Alan Cullen Posted August 17, 2007 Share Posted August 17, 2007 Pefi.....do I stick that in the acaddoc.lsp file? Quote Link to comment Share on other sites More sharing options...
Norts Posted August 17, 2007 Share Posted August 17, 2007 The lisp posted above by pefi will only work if your AutoCAD starts up with a template that has no entities within it. e.g. if your template has layouts (paper or model) in it that contain borders for example then the above lisp will not work. having said that, it is quite nifty Quote Link to comment Share on other sites More sharing options...
Guest Alan Cullen Posted August 17, 2007 Share Posted August 17, 2007 My template only has system settings etc I want.....no entities of any kind.....sorry for the thread-jack, Siberian.....but we are both after the same thing here...... So do I stick pefi's code in the acaddoc.lsp file? Quote Link to comment Share on other sites More sharing options...
Norts Posted August 17, 2007 Share Posted August 17, 2007 Alan, I think you can either put it in your acaddoc.lsp or you can put in your appload startup suite. i think either way would be fine. i did the latter of the 2 options i've listed here, and it worked ok. Quote Link to comment Share on other sites More sharing options...
pefi Posted August 17, 2007 Share Posted August 17, 2007 The lisp posted above by pefi will only work if your AutoCAD starts up with a template that has no entities within it. e.g. if your template has layouts (paper or model) in it that contain borders for example then the above lisp will not work.having said that, it is quite nifty Yes, you're right - my mistake! But I think I've got idea how to do it... stay in tune! :wink: Przemo Quote Link to comment Share on other sites More sharing options...
pefi Posted August 17, 2007 Share Posted August 17, 2007 My template only has system settings etc I want.....no entities of any kind.....sorry for the thread-jack, Siberian.....but we are both after the same thing here...... So do I stick pefi's code in the acaddoc.lsp file? Yes, as Norts said.. Przemo Quote Link to comment Share on other sites More sharing options...
Guest Alan Cullen Posted August 17, 2007 Share Posted August 17, 2007 Cheers all, and thanks very much..... Quote Link to comment Share on other sites More sharing options...
Norts Posted August 17, 2007 Share Posted August 17, 2007 Itsa nota problem Quote Link to comment Share on other sites More sharing options...
pefi Posted August 17, 2007 Share Posted August 17, 2007 Dirty hack No. 2.... (defun QuitIfEmpty (/) (vl-load-com) (if (and (= (getvar "SDI") 0) (= (vla-get-fullname (vla-get-activedocument (vla-get-application(vla-get-documents (vlax-get-acad-object))))) "" ) ) (command "_close") ) ) (QuitIfEmpty) I'm waiting for someboty to tell: "you can get the same result if you set system variable xyz to 0".... Przemo Quote Link to comment Share on other sites More sharing options...
Siberian Posted August 21, 2007 Author Share Posted August 21, 2007 I don't seem to have the acaddoc.lsp anywhere...can I create it, and if so, where do I put it? Quote Link to comment Share on other sites More sharing options...
Guest Alan Cullen Posted August 21, 2007 Share Posted August 21, 2007 yeah, create it and stick it in your acad\support folder. Quote Link to comment Share on other sites More sharing options...
SLW210 Posted August 21, 2007 Share Posted August 21, 2007 I don't seem to have the acaddoc.lsp anywhere...can I create it, and if so, where do I put it? It is here.................. C:\Program Files\AutoCAD 2008\Support Quote Link to comment Share on other sites More sharing options...
qball Posted November 21, 2007 Share Posted November 21, 2007 under "options - system tab", you could pick "show startup dialog box" on the right. then you pick a recently used drawing or browse instead of having a new, blank drawing open. Quote Link to comment Share on other sites More sharing options...
AFitchguy07 Posted May 20, 2010 Share Posted May 20, 2010 in 2011 is this file called acad2011doc.lsp? Quote Link to comment Share on other sites More sharing options...
ReMark Posted May 20, 2010 Share Posted May 20, 2010 Do not edit acad2011doc.lsp. Edit acaddoc.lsp if you feel you must. Quote Link to comment Share on other sites More sharing options...
MSasu Posted May 20, 2010 Share Posted May 20, 2010 No, must use the acaddoc.lsp as suggested; the acad2011doc.lsp file is used by Autodesk and therefore should not be modified. Regards, Quote Link to comment Share on other sites More sharing options...
ReMark Posted May 20, 2010 Share Posted May 20, 2010 Actually Dean Saadallah posted this over at the AutoDesk Discussion forums some time ago saying the advice came from the people at DOTSOFT. He said it needs to go in the acad.lsp file. (defun-q mystartup () (while (eq 1 (logand 1 (getvar "CMDACTIVE")))) (command "_CLOSE") ) (setq S::STARTUP (append S::STARTUP mystartup)) Quote Link to comment Share on other sites More sharing options...
DNK Posted May 20, 2010 Share Posted May 20, 2010 STARTUP at command line. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.