- ;; 需要e派工具箱(XCAD)的支持:[url]http://yunpan.cn/QXQKsW9gAPmpF[/url] 访问密码 2ffa
- (defun c:tt ()
- (if (setq ss (ssget '((0 . "text"))))
- (progn
- (setq lst (mapcar '(lambda (x) (xyp-DXF 1 x)) (xyp-ss2list ss))
- lst (mapcar '(lambda (x) (xyp-Get-HzEngNum x 0)) lst)
- lst (vl-remove-if '(lambda (x) (not (vl-some 'distof x))) lst)
- lst (vl-sort lst '(lambda (x y) (< (car x) (car y))))
- lst (mapcar '(lambda (x) (list (car x) (distof (cadr x)))) lst)
- )
- (if (and lst
- (setq lst (XYP-COUNT-NUM lst 1))
- (setq p1 (getpoint "\n基点<退出>: "))
- )
- (foreach a lst
- (setq tx (strcat "SUM(" (car a) ")=" (rtos (cadr a) 2 2))
- s1 (xyp-Text 4 p1 tx)
- p1 (xyp-Pt2Y p1 -600)
- )
- )
- )
- )
- )
- (princ lst)
- )
|