Luvrbcs Posted February 13, 2008 Share Posted February 13, 2008 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? Quote Link to comment Share on other sites More sharing options...
lpseifert Posted February 13, 2008 Share Posted February 13, 2008 Startup=1 ... Quote Link to comment Share on other sites More sharing options...
Luvrbcs Posted February 13, 2008 Author Share Posted February 13, 2008 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. Quote Link to comment Share on other sites More sharing options...
SLW210 Posted February 13, 2008 Share Posted February 13, 2008 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. Quote Link to comment Share on other sites More sharing options...
Luvrbcs Posted February 13, 2008 Author Share Posted February 13, 2008 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. Quote Link to comment Share on other sites More sharing options...
steezin_and_wheezin Posted June 26, 2009 Share Posted June 26, 2009 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! Quote Link to comment Share on other sites More sharing options...
AirSchatz Posted August 24, 2009 Share Posted August 24, 2009 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? Quote Link to comment Share on other sites More sharing options...
rkmcswain Posted August 24, 2009 Share Posted August 24, 2009 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.... Quote Link to comment Share on other sites More sharing options...
alanjt Posted August 24, 2009 Share Posted August 24, 2009 this might be a little safer: (and (wcmatch (getvar "dwgname") "Drawing*") (zerop (getvar "sdi")) (command "_.close" "_y") ) ;_ and Quote Link to comment Share on other sites More sharing options...
rkent Posted August 24, 2009 Share Posted August 24, 2009 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. Quote Link to comment Share on other sites More sharing options...
AirSchatz Posted August 24, 2009 Share Posted August 24, 2009 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 Quote Link to comment Share on other sites More sharing options...
alanjt Posted August 24, 2009 Share Posted August 24, 2009 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. Quote Link to comment Share on other sites More sharing options...
rkmcswain Posted August 24, 2009 Share Posted August 24, 2009 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". Quote Link to comment Share on other sites More sharing options...
AirSchatz Posted August 24, 2009 Share Posted August 24, 2009 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 Quote Link to comment Share on other sites More sharing options...
AirSchatz Posted August 24, 2009 Share Posted August 24, 2009 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? Quote Link to comment Share on other sites More sharing options...
alanjt Posted August 24, 2009 Share Posted August 24, 2009 maybe something like this? (and (eq (getvar "dwgname") "Drawing1.dwg") (zerop (getvar "sdi")) (if (zerop (getvar "dbmod")) (command "_.close") (command "_.close" "_y") ) ;_ if ) ;_ and Quote Link to comment Share on other sites More sharing options...
rkmcswain Posted August 25, 2009 Share Posted August 25, 2009 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. Quote Link to comment Share on other sites More sharing options...
rkmcswain Posted August 25, 2009 Share Posted August 25, 2009 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. Quote Link to comment Share on other sites More sharing options...
AirSchatz Posted August 25, 2009 Share Posted August 25, 2009 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..... Quote Link to comment Share on other sites More sharing options...
rkmcswain Posted August 25, 2009 Share Posted August 25, 2009 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 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.