乐筑天下

搜索
欢迎各位开发者和用户入驻本平台 尊重版权,从我做起,拒绝盗版,拒绝倒卖 签到、发布资源、邀请好友注册,可以获得银币 请注意保管好自己的密码,避免账户资金被盗
楼主: Troispistols

[编程交流] Selected Objects to color# LIS

[复制链接]

4

主题

16

帖子

12

银币

初来乍到

Rank: 1

铜币
20
发表于 2022-7-6 06:08:47 | 显示全部楼层
 
And double or triple how many layers ?
 
Not.
回复

使用道具 举报

4

主题

16

帖子

12

银币

初来乍到

Rank: 1

铜币
20
发表于 2022-7-6 06:14:00 | 显示全部楼层
 
Yes! Can I do something to open the pop up color menu if don't remember the color#?
 
Could be :
 
Specify color between [1-255] or Select Color :
 
Thanks
回复

使用道具 举报

10

主题

8258

帖子

8335

银币

初来乍到

Rank: 1

铜币
31
发表于 2022-7-6 06:20:41 | 显示全部楼层
All my "hidden" lines go on one layer called, strangely enough, Hidden.  If you were do the drawing on a drafting board would you use different colors for all the hidden lines?  Would a hidden line depicting a wall that was obscured be shown any different than a hidden line depicting another object?  Sometimes we go out of our way to make things difficult.  Do you plot in color as well?
回复

使用道具 举报

2

主题

389

帖子

387

银币

初来乍到

Rank: 1

铜币
10
发表于 2022-7-6 06:24:07 | 显示全部楼层
Yes, it should be possible to do this.  A simple approach would be to change the current color via COLOR, then CHANGE the Property Color to the current value (CECOLOR).
回复

使用道具 举报

2

主题

389

帖子

387

银币

初来乍到

Rank: 1

铜币
10
发表于 2022-7-6 06:28:17 | 显示全部楼层
For anyone who wanders in, this was the basic idea I was talking about. It allows just the standard colors 1 through 255 (no ByBlock or ByLayer).  Note that the system variable CECOLOR is a string.
 
  1. (defun C:CHC (/ ColorObjects CurrColorOrg NewColor CmdEchoOrg) (prompt "\nSelect objects to color...") (cond   ( (setq ColorObjects (ssget))     (setq CurrColorOrg (getvar 'CECOLOR)           CmdEchoOrg   (getvar 'CMDECHO)     )     (setvar 'CMDECHO 0)         (while       (not (cond       ( (initget 6) )              ( (setq NewColor (getint               "\nEnter object color (1-255) : "             )              )             (if (< NewColor 256) (setvar 'CECOLOR (itoa NewColor)))           )           (T(initdia)             (command "_.COLOR")             (numberp (read (getvar 'CECOLOR)))           )                                         )    )       (prompt "\nCannot set color to that value.\n*Invalid.*")       )       (command "_.CHANGE" ColorObjects "" "_P" "_C" (getvar 'CECOLOR) "")  ) ) (setvar 'CECOLOR CurrColorOrg) (setvar 'CMDECHO CmdEchoOrg)       (princ))
回复

使用道具 举报

发表回复

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

  • 微信公众平台

  • 扫描访问手机版

  • 点击图片下载手机App

QQ|关于我们|小黑屋|乐筑天下 繁体中文

GMT+8, 2025-3-10 18:46 , Processed in 0.343152 second(s), 60 queries .

© 2020-2025 乐筑天下

联系客服 关注微信 帮助中心 下载APP 返回顶部 返回列表