AUTOCAD自定义快捷键方法(你的最佳选择)

合集下载
相关主题
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

很多人都有用Autocad自带的快捷键,但系统默认的快捷键往往不是那么顺手,也缺少那么些个性化!通过下面的方法可以自定义自己喜欢的任何快捷键,只要你整会了,工作效率立马上来!你的领导,你的老板想不给你加薪水都难啦!
代码说明,1、(defun c:x ()(command"y"))其中,“x”为要设定的快捷键,“y"为cad系统默认的快捷键代号,比如(defun c:s ()(command"line"))这就是用‘s’键替换了原来直线快捷键‘line’
2、设置图层快捷键代码(defun c:gX (/ gp) (setq gp (ssget)) (command "change" gp "" "p" "la" "Y" ""))其中组合键“g+X”为所设置快捷键,Y对应所建立的图层名称!如:(defun c:gc (/ gp) (setq gp (ssget)) (command "change" gp "" "p" "la" "center" "")),按组合键gc即可更换至“center”图层下(注意一个前提就是,你的图层里必须预先建立有图层“center”)
具体操作:新建一文本文档————编辑文本,按上面1、2步编写相关代码—————另存为.lsp文件,把此文件命名为“ACAD.LSP",放到cad安装目录下,运行cad,加载(命令行输入ap)刚才所建立文件,可设置为自动加载,往后每次打开cad就能用上自己所设置的快捷键了!

以下为本人所用快捷键!仅供参考(建议AUTOCAD版本在2010以上使用)
(defun c:c ()(command"circle"))
(defun c:cc (/ gp)(setq gp(ssget))(command"copy"gp"""m"))
(defun c:a ()(command"arc"))
(defun c:aa ()(command"array"))
(defun c:b ()(command"break"))
(defun c:d ()(command"dist"))
(defun c:dal ()(command"dim""ali"))
(defun c:dan ()(command"dim""ang"))
(defun c:dc ()(command"dim""cen"))
(defun c:dd ()(command"ddlmodes"))
(defun c:de ()(command"ddedit"))
(defun c:dh ()(command"dim""hor"))
(defun c:dl ()(command"dim""lea"))
(defun c:dm ()(command"dragmode"))
(defun c:dn ()(command"dim""n"))
(defun c:dr ()(command"dim""rot"))
(defun c:cd ()(command"chprop"))
(defun c:ds ()(command"dimscale"))
(defun c:dt ()(command"dtext"))
(defun c:di ()(command"divide"))
(defun c:dv ()(command"dim""ver"))
(defun c:du ()(command"dim""update"))
(defun c:elp ()(command"elipse"))
(defun c:e ()(command"erase"))
(defun c:ex ()(command"EXTEND"))
(defun c:ee ()(command"extend"))
(defun c:f ()(command"fillet"))
(defun c:ff ()(command"offset"))
(defun c:fs ()(command"files"))
(defun c:fl ()(command"fill"))
(defun c:fr ()(command"fillet""r"))
(defun c:fp ()(command"fillet""p"))
(defun c:i ()(command"insert"))
(defun c:li ()(command"list"))
(defun c:ls ()(command"ltscale"))
(defun c:mm ()(command"mirror"))
(defun c:pe ()(command"pedit"))
(defun c:pl ()(command"pline"))
(defun c:rg ()(command"regen"))
(defun c:rr ()(command"rotate"))
(defun c:s ()(command"line"))
(defun c:sc ()(command"scale"))
(defun c:st ()(command"stretch""c"))
(defun c:tr ()(command"trim"))
(defun c:x ()(command"explode"))
(defun c:za ()(command"zo

om""a"))
(defun c:zz ()(command"zoom""p"))
(defun c:y ()(command"rotate"))
(defun c:q ()(command"copy"))
(defun c:bz ()(command"DIMLINEAR"))
(以下为设置图层的代码,组合键“g1”为图层1,以此类推)
(defun c:g1 (/ gp) (setq gp (ssget)) (command "change" gp "" "p" "la" "1" ""))
(defun c:g2 (/ gp) (setq gp (ssget)) (command "change" gp "" "p" "la" "2" ""))
(defun c:g3 (/ gp) (setq gp (ssget)) (command "change" gp "" "p" "la" "3" ""))
(defun c:g4 (/ gp) (setq gp (ssget)) (command "change" gp "" "p" "la" "4" ""))
(defun c:g5 (/ gp) (setq gp (ssget)) (command "change" gp "" "p" "la" "5" ""))
(defun c:g6 (/ gp) (setq gp (ssget)) (command "change" gp "" "p" "la" "6" ""))
(defun c:g7 (/ gp) (setq gp (ssget)) (command "change" gp "" "p" "la" "7" ""))
(defun c:g8 (/ gp) (setq gp (ssget)) (command "change" gp "" "p" "la" "8" ""))
(defun c:g0 (/ gp) (setq gp (ssget)) (command "change" gp "" "p" "la" "0" ""))
(defun c:gc (/ gp) (setq gp (ssget)) (command "change" gp "" "p" "la" "center" ""))
(defun c:gh (/ gp) (setq gp (ssget)) (command "change" gp "" "p" "la" "hidden" ""))
(defun c:ghh (/ gp) (setq gp (ssget)) (command "change" gp "" "p" "la" "hatch" ""))
(defun c:gd (/ gp) (setq gp (ssget)) (command "change" gp "" "p" "la" "dim" ""))
(defun c:gt (/ gp) (setq gp (ssget)) (command "change" gp "" "p" "la" "text" ""))
(defun c:gp (/ gp) (setq gp (ssget)) (command "change" gp "" "p" "la" "Phantom" ""))

相关文档
最新文档