(apply 'min (mapcar '(lambda(x) (distance x pt0)) pt_lst)) (car
(vl-sort entlst
'(lambda (e1 e2)
(< (distance (getdxf e1 10) pt) (distance (getdxf e2 10) pt))
)
)
)
(defun getdxf (e dxf)
(cdr (assoc dxf (entget e)))
)
;;;entlst是选择特定层的图元列表,pt是已知点
页:
[1]