;;说明:获取图元间距离表
;;参数:entlst:图元表
;;返回:返回图元间距离表
(defun GetEntPtDis(entlst / getptx getpty)
(defun getptx(ent) (cadr (assoc 10 (entget ent))))
(defun getpty(ent) (caddr (assoc 10 (entget ent))))
(mapcar (function (lambda (x y) (abs (- (getptx x) (getptx y))))) (cdr entlst) (reverse (cdr (reverse entlst))))
)