只需一步,快速开始
使用道具 举报
变为红色
(setq ent (entget (car (entsel))))
(entmod (setq ent (cons (cons 62 1) ent)))
龙龙斑竹发的这个程序应该对你有帮助的
(defun C:MODTBL () (setq LAY (tblobjname "LAYER" (getstring "\nLAYER NAME :"))) (if (= LAY NIL) (princ ("\nNONE THIS LAYER")) (progn (setq LAY_1 (entget LAY)) (setq TEMP_N (cdr (assoc 2 LAY_1)) TEMP_C (cdr (assoc 62 LAY_1)) ) (princ (strcat "\n图层名:<" TEMP_N ">")) (setq TEMP (getstring "\n输入改变图层的名字:")) (if (and (/= TEMP "") (/= TEMP TEMP_N) ) (setq TEMP_N TEMP) ) (princ (strcat "\n图层颜色:<" (rtos TEMP_C) ">")) (setq TEMP (getint "\n输入改变图层颜色数字")) (if (and (/= TEMP NIL) (/= TEMP TEMP_C) ) (setq TEMP_C TEMP) ) (setq TEMP (subst (cons '2 TEMP_N) (assoc 2 LAY_1) LAY_1 ) ) (setq TEMP (entmod TEMP)) (setq TEMP (subst (cons '62 TEMP_C) (assoc 62 TEMP) TEMP ) ) (entmod TEMP) ) ) (princ))
(setq sel(entsel))(setq ent_lst(entget (car sel)))(setq new_lst(cons '(62 . 3)ent_lst))(entmod new_lst)
简单一点,你分别试试以上的几句语句。依次试试就知道了。
本版积分规则 发表回复 回帖后跳转到最后一页
小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 ) ©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途
GMT+8, 2025-2-27 14:22 , Processed in 0.187576 second(s), 25 queries , Gzip On.
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.