我也想要, 先给一个ZML的半成品 (defun C:TJ () (princ "统计线段长度") (if (setq SS (ssget '((0 . "LWPOLYLINE")) ) ) (progn ;; (setq LST_LEN '() I 0 ) ;;逐个统计 (repeat (sslength SS) (setq EN (ssname SS I) LEN (vlax-curve-getdistatparam EN (vlax-curve-getendparam EN) ) LST_LEN (cons LEN LST_LEN) I (1+ I) ) ) ;;显示输出 (princ "\n找到个数:") (princ (sslength SS)) ) ) (princ) )
|