明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1423|回复: 5

要改变对象的颜色,这样写对不对啊!!!

[复制链接]
发表于 2010-7-19 22:04:00 | 显示全部楼层 |阅读模式

(setq ys0 4 ys0 (cons 62 ys0) endata (subst ys0 ys endata))

要改变对象的颜色,这样写对不对啊!!!

发表于 2010-7-19 22:31:00 | 显示全部楼层

(setq ys0 4
      ys0 (cons 62 ys0)
   endata (subst ys0 ys endata)
)

代码不全 ....
决定权在 Ys + entdata

对不对? 测一下即知

发表于 2010-7-19 22:38:00 | 显示全部楼层

(setq $ent (car (entsel)))
(if (assoc 62 (entget $ent))
 (entmod (append (entget $ent) (list (cons 62 111))))
 (entmod (subst (cons 62 3)(assoc 62 (entget $ent)) (entget $ent)))
)

 

or

 

(command "change" (car (entsel)) "" "p" "co" "BYLAYER" "")

发表于 2010-7-19 22:42:00 | 显示全部楼层

(cons 62 0)  byblock

(cons 62 256)  bylayer

发表于 2010-7-26 15:45:00 | 显示全部楼层
 (VLA-PUT-COLOR (vlax-ename->vla-object(car(entsel))) color)
color:0~256
发表于 2010-7-26 16:06:00 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-10-2 08:19 , Processed in 0.175567 second(s), 25 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表