Jump to content

Disabling new drawing at startup


Recommended Posts

Posted

It annoys me that AutoCAD always opens a new drawing at startup...can I disable this somehow?

  • Replies 40
  • Created
  • Last Reply

Top Posters In This Topic

  • AFitchguy07

    8

  • ReMark

    6

  • pefi

    4

  • MSasu

    4

Posted

Another dirty hack....

 

(defun QuitIfEmpty ( / )
 (if (and (= (getvar "SDI") 0) (= (ssget "_X") nil)) (command "_close"))
)
(QuitIfEmpty)

Przemo

Guest Alan Cullen
Posted

Pefi.....do I stick that in the acaddoc.lsp file?

Posted

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 :)

Guest Alan Cullen
Posted

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......:lol:

 

So do I stick pefi's code in the acaddoc.lsp file?

Posted

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.

Posted
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

Posted
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......:lol:

 

So do I stick pefi's code in the acaddoc.lsp file?

 

Yes, as Norts said..

Przemo

Posted

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

Posted

I don't seem to have the acaddoc.lsp anywhere...can I create it, and if so, where do I put it?

Guest Alan Cullen
Posted

yeah, create it and stick it in your acad\support folder.

Posted
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

  • 2 months later...
Posted

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.

  • 2 years later...
Posted

in 2011 is this file called acad2011doc.lsp?

Posted

Do not edit acad2011doc.lsp. Edit acaddoc.lsp if you feel you must.

Posted

No, must use the acaddoc.lsp as suggested; the acad2011doc.lsp file is used by Autodesk and therefore should not be modified.

 

Regards,

Posted

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))

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...