对齐天正对象命令
本帖最后由 wzw_km 于 2013-12-15 20:38 编辑(princ "\n天正标高对齐 命令: TT")
(defun c:tt1()
(SETQ OS (GETVAR "OSMODE") ss nil)
(if (setq TargetPt (getpoint "请选择要基准点:")) (setq ss (ssget '((0 . "TCH_ELEVATION")))))
(setvar "osmode" 0)
(if ss
(progn
(initget "H V")
(if (= (setq x (getkword "是否确定[竖向对齐-默认(V)/水平对齐(H)]: ")) nil)(setq x "V"))
(SETQ TargetPtX (car TargetPt) TargetPtY (cadr TargetPt))
(repeat (setq n (sslength ss))
(setq BasisPt (CDR (assoc '10 (entget (ssname ss (setq n (1- n)))))))
(SETQ BasisPtX (car BasisPt) BasisPtY (cadr BasisPt))
(if (= x "V") (command "_move" (ssname ss n) "" BasisPt (list TargetPtX BasisPtY 0.0)))
(if (= x "H") (command "_move" (ssname ss n) "" BasisPt (list BasisPtX TargetPtY 0.0)))
)
)
)
(SETVAR "OSMODE" OS)
)
必须支持一下。 收藏了!支持。
收藏了!支持。 路过,收藏看看
页:
[1]