AutoCAD/grid off by default
Expert: Bill DeShawn - 6/29/2011
QuestionI was wondering if there is a way to have the grid off when you startup Autocad? I hit F7 to turn it off, would be nice if it was off by default. I am using Autocad 2012 full version.
Thanks
Kevin
AnswerYou can create a template drawing file (.dwt) with all the settings your heart desires and have AutoCAD use that to start new drawings. (See Options; Files; Template Settings; Drawing Template File Name for QNEW.
Another way is to create a text file by the name of ACAD.LSP. You can do that with notepad. Make five line of text as follows:
(defun startup ()
(setvar "gridmode" 0)
(princ)
)
(startup)
The first four define a function. the fifth line executes the new function. This is very basic LISP. The princ function (in this case) gives you a clean finish that won't display "nil" when you finish the function. More code can be added for other settings if desired, such as turning off object snap mode and ortho mode.
(defun startup ()
(setvar "gridmode" 0)
(setvar "osmode" 0)
(setvar "orthomode" 0)
(princ)
)
(startup)
After you create ACAD.LSP put it in the Support File Search Path, or better yet, create a new folder for your LISP files. Don't put it as a subfolder of an Autodesk AutoCAD or vertical program folder. That way you can have your acad.lsp and future lisp files in your own special folder and they will not be removed accidentally if you upgrade your AutoCAD and delete an old version. Then add the new folder to the Support File Search Path (Options; Files; Support File Search Path; Add) The set ACADLSPASDOC to 1 (you should never again have to set that system variable.) To check a LISP file, I recommend that you set *error* to nil. Do so by typing (setq *error* nil). Then AutoCAD will return "nil". When you edit or create a LISP file, you can load the code it contains with the "load" lisp function. For acad.lsp just type (load "acad") at the command line.
So, there's your lesson number one in LISP, and it's also a great way to build up a drawing system variables that will set themselves every time you open a drawing and start a new one.
Keep in touch
Bill DeShawn
http://my.sterling.net/~bdeshawn