CAD中"Φ”尺寸及上下公差怎么标注?
网站建设 2021-07-03 14:35www.dzhlxh.cn网站建设
一个lisp快捷键,搞定cad中“Φ”及上下公差的输入!
1、新建一个文本文档,将下列字符复制其中保存,并将其后缀名改为LSP放到AUTOCAD子目录下;
字符:
标注的快捷键
(DEFUN C:DD()(COMMAND "dimlinear"))
垂直标注公差
复制内容到剪贴板
- (defun c:czc()
- (setq p1 (getpoint "\n 请输入标注起点:"))
- (setq p2 (getpoint "\n 请输入标注终点:"))
- (setq d21 (cadr p1))
- (setq d22 (cadr p2))
- (setq d1 (getstring "\n 请输入标注尺寸:"))
- (setq d2 (abs (- d21 d22)))
- (setq s (getstring "\n输入上公差:") x (strcat "^" (getstring "\n输入下公差:")))
- (if (= s "0") (setq s " 0"))
- (if (= x "^0") (setq x "^ 0"))
- (if (/= d1 "")
- (setq dd (strcat "%%c" d1 "{" "\\" "H0.7X" ";" "\\" "S" s x ";" "}" )) (setq dd (strcat "%%c" "<" ">" "{" "\\" "H0.7X" ";" "\\" "S" s x ";" "}" )))
- (command "dimlinear" "ve" p1 p2 "T" dd)
- )
2、按图加载lisp文件
3、重启AUTOCAD;
4、标注步骤:
1)在输入栏输入快捷键CZC;
2、点击要标注的上端点;
3)点击要标注的下端点;
4)输入要标注的尺寸;(若为默认尺寸,该步骤则右键点击)
5)输入上公差数值,按回车键结束;(无图)
6)输入下公差数值,按回车键结束;(无图)
7)点击放置标注的位置;