如何让这个程序 实现查找到的数值亮显!
本帖最后由 spp_wall 于 2014-10-10 10:57 编辑(defun c:www( / ss1 sslst numlst num)
(defun ss->EnLst (ss / retu)
(setq retu (apply 'append (ssnamex ss)))
(setq retu (vl-remove-if-not '(lambda (x) (= (type x) 'ENAME)) retu))
)
(setq K (getint "\n 最小值<1>,最大值<2>"))
(setq sslst (ss->EnLst (ssget (list (cons 0 "TEXT") (cons 1 "~*[~`--9]*")))))
;(setq ss1(ssget'((8 . "0")));如何实现只选择PJ图层文字查找
(setq numlst (mapcar '(lambda(x) (atof (cdr (assoc 1 (entget x))))) sslst))
(cond
((= K 1)(setq num (apply 'min numlst)))
((= K 2)(setq num (apply 'max numlst)))
(T (setq num (apply 'min numlst)))
)
(princ num)
(setq insPt0 (getpoint "\n请输入计算结果插入点: "));;;计算结果显示在图中位置
(setq bb (strcat "计算结果="(rtos num )""))
(command "_text" insPt0"0"bb 0)
(princ)
)
如何让这个程序实现下面的功能:
1:查找到 最大和最小值 后再图形上亮显!
2:如何实现只选择PJ图层文字查找 这样应该会快点!
页:
[1]