500w008 发表于 2013-7-13 17:42:16

500w008 发表于 2013-7-13 17:46:37

wowan1314 发表于 2013-7-13 20:38:43

试试看行不
(apply 'min (mapcar '(lambda(x) (distance x pt0)) pt_lst))

500w008 发表于 2013-7-15 13:28:01

阿然 发表于 2013-7-15 15:10:05

(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]
查看完整版本: 把此贴删除