Jump to content
Luvrbcs

Start AutoCAD with no new drawing...

Recommended Posts

Luvrbcs

How can I start up AutoCAD and not have a blank drawing show up?

 

I work the majority of the time with existing drawings and I am tired of closing Drawing1.dwg every time.

 

I looked for a command line switch for the shortcut icon, but, no joy.

 

Any suggestions?

Share this post


Link to post
Share on other sites
lpseifert

Startup=1 ...

Share this post


Link to post
Share on other sites
Luvrbcs
Startup=1 ...

 

That gave me a dialog box for Open a drawing. Not quite what I want. I want it to go to a blank screen that is like the screen you get when you close all your drawings. Nothing.

 

Thanks anyways.

Share this post


Link to post
Share on other sites
SLW210

Read this Open AutoCAD without a New Drawing

 

You could put (command "CLOSE") (the part in red) in your acad.lsp, just make sure you do not have acad.lsp to open with every drawing _ACADLSPASDOC = 0.

Share this post


Link to post
Share on other sites
Luvrbcs
Read this Open AutoCAD without a New Drawing

 

You could put (command "CLOSE") (the part in red) in your acad.lsp, just make sure you do not have acad.lsp to open with every drawing _ACADLSPASDOC = 0.

 

Thanks, SLW210. That is exactly what I was looking for.

 

I used the close.scr option.

Share this post


Link to post
Share on other sites
steezin_and_wheezin
Read this Open AutoCAD without a New Drawing

 

You could put (command "CLOSE") (the part in red) in your acad.lsp, just make sure you do not have acad.lsp to open with every drawing _ACADLSPASDOC = 0.

 

THANK YOU! haha i have tried everything, then i found this thread- tried all of those except for..

 

(command "CLOSE")

 

^THIS!!

 

i'm running adt08 and this was the only thing that was successful for me. Thank you again SLW210!

Share this post


Link to post
Share on other sites
AirSchatz

does this work with AutoCAD MEP 2010? I tried it, but it kept shutting the whole cad program down. How does it need to be coded?

Share this post


Link to post
Share on other sites
rkmcswain

I work the majority of the time with existing drawings and I am tired of closing Drawing1.dwg every time.

 

I'm just curious as to what difference it makes, because as soon as you open a new or existing drawing, "drawing1.dwg" closes....:?:

Share this post


Link to post
Share on other sites
alanjt

this might be a little safer:

(and (wcmatch (getvar "dwgname") "Drawing*")
    (zerop (getvar "sdi"))
    (command "_.close" "_y")
) ;_ and

Share this post


Link to post
Share on other sites
rkent
That gave me a dialog box for Open a drawing.

....and then you navigate to your existing drawings. I have never understood why this isn't an option for people. You have to navigate to the file one way or another, may as well be in autocad.

Share this post


Link to post
Share on other sites
AirSchatz

I tried that code, but it just makes AutoCAD MEP close completely when finished opening.

 

As far as the drawing1.dwg closing when you opening an existing drawing, not on my machine, if that's an option that would work to, but drawing1.dwg stays open and I have to close it manually..

 

Any other suggestions?

 

Thanks guys

Share this post


Link to post
Share on other sites
alanjt
I tried that code, but it just makes AutoCAD MEP close completely when finished opening.

 

As far as the drawing1.dwg closing when you opening an existing drawing, not on my machine, if that's an option that would work to, but drawing1.dwg stays open and I have to close it manually..

 

Any other suggestions?

 

Thanks guys

did you try the one i posted, it will check if the sdi mode is set to 0, if not, it will not continue and try to close the drawing.

Share this post


Link to post
Share on other sites
rkmcswain
As far as the drawing1.dwg closing when you opening an existing drawing, not on my machine, if that's an option that would work to, but drawing1.dwg stays open and I have to close it manually..

 

Then something is modifying the drawing at startup. As soon as AutoCAD opens with drawing1.dwg - type in DBMOD at the command line. If it's not zero (0), then something is modifying the drawing.

 

If DBMOD = 0 AND you start another drawing or open an existing one, then "drawing1.dwg" closes.

 

If DBMOD /= 0 AND SDI = 0, AND you start another drawing or open an existing one, then "drawing1.dwg" stays open.

 

If DBMOD /= 0 AND SDI = 1, AND you start another drawing or open an existing one, then you will be prompted to save "drawing1.dwg".

Share this post


Link to post
Share on other sites
AirSchatz
did you try the one i posted, it will check if the sdi mode is set to 0, if not, it will not continue and try to close the drawing.

 

 

I did try that, but when I open ACAD, it loads up then when the drawing1.dwg would the whole program just shut down. But then again, maybe I put the code in the wrong place....I inserted at the bottom of of the acad2010doc.lsp. I couldn't find the acad.lsp. Also, this is a AutoCAD MEP 2010 programs.

 

Thanks for your help

Share this post


Link to post
Share on other sites
AirSchatz
Then something is modifying the drawing at startup. As soon as AutoCAD opens with drawing1.dwg - type in DBMOD at the command line. If it's not zero (0), then something is modifying the drawing.

 

If DBMOD = 0 AND you start another drawing or open an existing one, then "drawing1.dwg" closes.

 

If DBMOD /= 0 AND SDI = 0, AND you start another drawing or open an existing one, then "drawing1.dwg" stays open.

 

If DBMOD /= 0 AND SDI = 1, AND you start another drawing or open an existing one, then you will be prompted to save "drawing1.dwg".

 

 

the DBMOD = 20 (read only)......what does that mean?

Share this post


Link to post
Share on other sites
alanjt

maybe something like this?

(and (eq (getvar "dwgname") "Drawing1.dwg")
    (zerop (getvar "sdi"))
    (if (zerop (getvar "dbmod"))
      (command "_.close")
      (command "_.close" "_y")
    ) ;_ if
) ;_ and

Share this post


Link to post
Share on other sites
rkmcswain
the DBMOD = 20 (read only)......what does that mean?

 

You can find all the system variables in HELP.

A DBMOD value of 20 means that the view has been modified and a database variable has been modified.

Share this post


Link to post
Share on other sites
rkmcswain
I inserted at the bottom of of the acad2010doc.lsp. I couldn't find the acad.lsp.

 

First off, "acad2010doc.lsp" is executed every time a drawing is opened. Secondly, that file "belongs" to AutoCAD, meaning that it can be overwritten by reinstalls, service packs, upgrades, etc. Anything you put in here will probably be lost someday.

 

"Acad.lsp" is only executed at application startup (assuming ACADLSPASDOC is not changed from its default value of zero), and is "owned" by the user. AutoCAD will never touch this file, it's under your control. Because it's a user file, you have to create it. It doesn't exist OOTB.

Share this post


Link to post
Share on other sites
AirSchatz
First off, "acad2010doc.lsp" is executed every time a drawing is opened. Secondly, that file "belongs" to AutoCAD, meaning that it can be overwritten by reinstalls, service packs, upgrades, etc. Anything you put in here will probably be lost someday.

 

"Acad.lsp" is only executed at application startup (assuming ACADLSPASDOC is not changed from its default value of zero), and is "owned" by the user. AutoCAD will never touch this file, it's under your control. Because it's a user file, you have to create it. It doesn't exist OOTB.

 

 

That makes sense....The Acad.lsp you are talking about, is that the same as Acad2010.lsp? That was the only other lsp file in the support folder.

 

Thanks for the help guys, this forum rawks.....

Share this post


Link to post
Share on other sites
rkmcswain
That makes sense....The Acad.lsp you are talking about, is that the same as Acad2010.lsp?

 

No! acad2010.lsp is "owned" by AutoCAD also.

 

"acad.lsp" and "acaddoc.lsp" are the USER equivalents to "acad2010.lsp" and "acad2010doc.lsp" There is just no reason to edit the latter two files.

 

See: http://usa.autodesk.com/getdoc/id=TS21336

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×