by Paul Jordan
(Vancouver, WA)
I've been working on mine for over 20 years. Some of the commands were project specific, some I use all the time. I basically keep my left hand on the keyboard and my right hand on the mouse.. I've also got a Nostromo N52 Gamers keypad that I've added a ton of commands to. If you have a chance, look at this bad boy on their website.
Anyhow, I figured the easiest way to share my lisp commands is to post the text from my acad.lsp file.. So, here goes: Whoah... WWait a minute.. That file is 26k in size..
Well, if anyone wants to give it a shot, drop me a message. I'm still new here so I don't know if you can email me straight from this site or not.
Don't worry, the files is 100% safe as it's all simple text with some AutoCad functions in it...
Here's an example.. This routine will make an AS-Built layer and allow you to type text right on that layer..
(defun c:abh ()
(setq cl (getvar "clayer") ;current layer
cc (getvar "cecolor") ;current color
tln (cdr (assoc 8 el)) ;text layer name
tc (cdr (assoc 62 el)) ;text color
)
(command "LAYER" "M" "as-built" "")
(print "Enter location of text and start typing: ")
(print)
(command "DTEXT" pause "0")
(if (/= cl tln)(command "LAYER" "S" cl ""))
(if (/= cc tc)(command "COLOR" cc))
;else
(setq cl nil cc nil)
(setq tc nil tln nil)
(princ)
)
OK, another quick example:
(defun C:1X()
(command "OFFSET" "3/4")
)
(defun C:2X()
(command "OFFSET" "1-1/2")
)
(defun C:4X()
(command "OFFSET" "3-1/2")
)
(clock)
(defun C:6X()
(command "OFFSET" "5-1/2")
)
(defun C:8X()
(command "OFFSET" "7-1/4")
)
(defun C:10X()
(command "OFFSET" "9-1/4")
)
(defun C:12X()
(command "OFFSET" "11-1/4")
)
Now what the heck do all those do?? Well, I got tired of typing in Offset 3-1/2" to make a 2x4 (the "4" side so I made it 4x.
These are simple and most of the routines can be figured out with just a little bit of knowledge of lisp.
Let me know if you have any questions.
Join in and write your own page! It's easy to do. How? Simply click here to return to AutoCAD Tips.
Sign up for our FREE CAD Tips and Tricks Newsletter:
"The CAD Times"
Join "The CAD Times" Newsletter Along With 5,000 Subscribers
Jan 27, 23 07:50 PM
Oct 29, 21 09:34 AM
Oct 29, 21 09:31 AM