范围选数 对应变颜色
本帖最后由 龙__平 于 2018-8-21 02:40 编辑(defun c:10190 ( / &c1 &k1 &kw1 obj)
(vl-load-com)
(if (and (princ "\n请选择要改变颜色的数字,--适用于板底筋10@190通长")
(setq &kw1 (ssget '((0 . "TEXT"))))
)
(progn
(while (setq &k1 (ssname &kw1 0))
(setq &kw1 (ssdel &k1 &kw1))
(setq obj (vlax-ename->vla-object &k1))
(setq &c1 (vla-get-TextString obj))
(if (AND (> (atof &c1) 413) (<= (atof &c1) 524))(vla-put-color obj 3) );变为绿色
(if (AND (> (atof &c1) 524) (<= (atof &c1) 654)) (vla-put-color obj 6) );变为粉色
(if (AND (> (atof &c1) 654) (<= (atof &c1) 785)) (vla-put-color obj 1) );变为红色
(if (AND (> (atof &c1) 785) (<= (atof &c1) 942)) (vla-put-color obj 5) );变为蓝色
(if (AND (> (atof &c1) 942) (<= (atof &c1) 1131)) (vla-put-color obj 2) );变为黄色
)
)
)
(princ)
)
研究下用在哪里 烟盒迷唇 发表于 2018-9-4 09:49
研究下用在哪里
地下室附加支座钢筋
页:
[1]