alexmai 发表于 2019-3-18 11:31:46

自动随机改色lsp

本人要画工具零件图,块基本是byblock,想弄个自动随机改色工具(要避开1-8,250-255这些颜色)
如果内容比较多时,不同的颜色检查图纸时可以更直观,谢谢

找到论坛的资料,但不会借鉴使用,求高手解答一下
http://bbs.mjtd.com/forum.php?mod=viewthread&tid=172495&highlight=%CB%E6%BB%FA

1291500406 发表于 2019-3-18 23:56:11

bbColor

本帖最后由 1291500406 于 2019-3-19 00:40 编辑

bbColor by bb

xyp1964 发表于 2019-3-19 14:20:38


;; tt(框选图块随机分配颜色)
(defun c:tt ()
(if (setq ss (ssget '((0 . "insert"))))
    (setq slst (xyp-Ss2List ss)
          clst (xyp-Get-Randoms 9 249 (length slst))
          aa   (mapcar '(lambda (x y) (xyp-SubUpd x 62 y)) slst clst)
    )
)
(princ)
)

panliang9 发表于 2019-3-19 08:35:22

1291500406 发表于 2019-3-18 23:56
bbColor by bb

很好的工具,如果能一次选定一堆块,然后自动为每个块随机分配颜色,而且可以一直回车一直改色,满意时再停止就好了。

yoyoho 发表于 2019-3-19 11:04:16

谢谢! 1291500406 分享程序!!!!!

luhy2008 发表于 2019-7-4 14:35:30

感谢楼上分享!
页: [1]
查看完整版本: 自动随机改色lsp