AutoCAD Tips, Tricks and LISPs! - Page 2


© Jonathan Jonas
Page 2

Tip #4 - Here's a few LISP codes for you to toss into your ACAD.LSP file. They require no editing. Simply open ACAD.LSP in WordPad or NotePad and paste them in there. If you don't have a LISP file yet, simply create a new text file with the name ACAD.LSP and paste them into it. When done, save the file as a text file, not as a DOC file. On some computers using Notepad to do the editing will place a ".TXT" as a new suffix - if this is your situation, rename the file ACAD.LSP.TXT to ACAD.LSP You will need to restart ACAD or open a new drawing after making any changes to the LSP file before AutoCAD will recognize the new commands.

The new command name is the 2 or 3 letters that follow C: Example: (Defun C:XRR () (Command "-xref" "R" "*"));; gives you the new command name XRR at the keyboard command prompt.

These two will allow you to Reload all Xref's or Unload all Xref's without going into the dialog box and typing in only one command. If you replace the command -xref with -image and give the resulting code a new command name, this same LISP routine will work on the Image function as well! (Defun C:XRR () (Command "-xref" "R" "*"));; (Defun C:XRU () (Command "-xref" "U" "*"));;

This will let you type 5, press return and have ACAD automatically zoom out by 50%. Much easier than the normal type in method, and many power users find this is much quicker than the RTZOOM command. You can also copy this and edit it for whatever scale factor you choose. Simply change the .5x to whatever scale you want. (Defun C:5 () (Command "ZOOM" ".5x"));;

For the last LISP function for this week, it's a little bit longer. This one I've had allot of requests for. It's an easy way to switch between Tilemodes. Just type in TT and return and you switch back and forth between modes.

(DEFUN C:TT (/ TM) (SETQ TM(GETVAR "TILEMODE")) (IF (= TM 0 ) (SETVAR "TILEMODE" 1)) (IF (= TM 1 ) (SETVAR "TILEMODE" 0)))


Tip #5 - There are times when you want to use RTPAN and there are times when you don't. Specifically, if you need to pan in a perfectly straight line, turn your Ortho on (double click ORTHO or press F8) and then instead of typing RTPAN, P, or PAN for the RTPAN command, instead type in -P and press return. This will use the original Pan command as found back in r12 and r13.

Go To Page: 1 2 3


The copyright of the article AutoCAD Tips, Tricks and LISPs! - Page 2 in AutoCAD Design is owned by . Permission to republish AutoCAD Tips, Tricks and LISPs! - Page 2 in print or online must be granted by the author in writing.

Post this Article to facebook Add this Article to del.icio.us! Digg this Article furl this Article Add this Article to Reddit Add this Article to Technorati Add this Article to Newsvine Add this Article to Windows Live Add this Article to Yahoo Add this Article to StumbleUpon Add this Article to BlinkLists Add this Article to Spurl Add this Article to Google Add this Article to Ask Add this Article to Squidoo