本帖最后由 x_s_s_1 于 2013-5-28 17:44 编辑
试试,这个是最大,最小的您自己将MAX改为MIN,测试图结果(461027.0 3.63835e+006) - (defun c:ttt(/ ss lst x y n)
- (setq ss (ssget'((0 . "INSERT"))) n 0)
- (repeat(sslength ss)(setq lst(cons (ssname ss n)lst) n (1+ n)))
- (setq x(mapcar '(lambda(x)(car(cdr(assoc 10 (entget x)))))lst))
- (setq y(mapcar '(lambda(x)(cadr(cdr(assoc 10 (entget x)))))lst))
- (list(eval (cons 'max x))(eval (cons 'max y)))
- )
|