(defun c:tt ( / *error* ans b cmdecho d e n ss)
(defun *error* (s)
(setvar 'cmdecho cmdecho)
(princ s)
)
(setq cmdecho (getvar 'cmdecho))
(setvar 'cmdecho 0)
(setq d (getdist "\n输入定距:"))
(initget "Y N ")
(setq ans (cond ((getkword "\n对齐线[(Y)是/(N)否] <对齐>: "))("Y")))
(while (not (tblobjname "block" (setq b (getstring "\n输入块名称:")))))
(if (setq ss (ssget '((0 . "*line,arc,circle,ellipse"))))
(repeat (setq n (sslength ss))
(setq e (ssname ss (setq n (1- n))))
(command "measure" e "b" b ans d)
)
)
(setvar 'cmdecho cmdecho)
(princ)
);;多玩玩,多动动