- (defun c:bzcdqh()
- (setq cmd (getvar "cmdecho"))
- (setvar "cmdecho" 0)
- (if (progn
- (princ "\n请选取标注:")
- (setq ssa (ssget '((0 . "DIMENSION") )))
- )
- (progn
- (setq cdz 0)
- (setq i 0)
- (setq n (sslength ssa))
- (repeat n
- (setq dxf (entget (ssname ssa i)))
- (setq cdz (+ cdz (cdr (assoc 42 dxf))))
- (setq i (1+ i))
- )
- (alert (strcat "共选取了" (itoa n) "个标注,总长度=" (rtos cdz 2 3)))
- (princ (strcat "\n共选取了" (itoa n) "个标注,总长度=" (rtos cdz 2 3)))
- )
- )
- (setvar "cmdecho" cmd)
- (princ)
- )
|