;仅对附图有效- (defun c:tt ()
- (setvar "CMDECHO" 0)
- (if (and (princ "\n选择尺寸: ") (setq ss (ssget '((0 . "DIMENSION"))))) (progn
- (setq dimlst (list))
- (repeat (setq i (sslength ss))
- (setq ent (entget(ssname ss (setq i (1- i)))))
- (setq dimlst (cons(cdr(assoc 42 ent)) dimlst))
- )
- (setq dimlst (vl-sort dimlst '(lambda (a b) (> a b))))
- (setq dimlst (mapcar '(lambda (x) (rtos x 2 1)) dimlst))
- (setq txt (strcat (car dimlst) "x" (cadr dimlst) "+" (caddr dimlst) "x" (last dimlst)))
- (command "TEXT" "M" PAUSE "" "" txt)
- ))
- (setvar "CMDECHO" 1)
- (princ)
- )
|