求助标注问题
请问一下我们如何控制qdim的方向呢,如图片如何实现一次性qdim实现标注四方尺寸呢?求凸包或包围盒,标注在凸包外侧。 vitalgg 发表于 2021-4-4 23:06
求凸包或包围盒,标注在凸包外侧。
你有没有解决 别人的代码,四边、对角标注
(defun c:tt1(/)
(setvar "cmdecho" 0)
(setvar "osmode" 0)
(setq tt (getreal "\n输入偏移距离:"))
(if (setq ss(ssget '((0 . "LWPOLYLINE"))))
(progn
(setq i 0)
(while i
(repeat (sslength ss)
(setq en (ssname ss i))
(setq lst (mapcar 'cdr (vl-remove-if-not ''((x)(= (car x) 10)) (entget en))))
(mapcar 'set '(p1 p2 p3 p4) lst)
(setq ang1 (angle p1 p2))
(setq ang2 (angle p2 p3))
(setq ang3 (angle p3 p4))
(setq ang4 (angle p4 p1))
(setq ang5 (angle p4 p2))
(setq ang6 (angle p1 p3))
(command "layer" "m" "dim" "c" "yellow" "" "")
(command "dimaligned" p1 p2 (polar p1 (- ang1 (/ pi 2)) tt)"" "")
(command "dimaligned" p2 p3 (polar p2 (- ang2 (/ pi 2)) tt)"" "")
(command "dimaligned" p3 p4 (polar p3 (- ang3 (/ pi 2)) tt)"" "")
(command "dimaligned" p4 p1 (polar p4 (- ang4 (/ pi 2)) tt)"" "")
(command "dimaligned" p4 p2 (polar p4 (- ang5 (/ pi 2)) tt)"" "")
(command "dimaligned" p1 p3 (polar p3 (- ang6 (/ pi 2)) tt)"" "")
(setq i (1+ i))
);repeat结束
);while结束
);progn结束
);if结束
(princ)
);defun结束
(prin1)
天凉好个秋 发表于 2021-7-20 09:13
别人的代码,四边、对角标注
(defun c:tt1(/)
(setvar "cmdecho" 0)
亲测,no function definition: X 位置-> 行:12 列:31
页:
[1]