自动随机改色lsp
本人要画工具零件图,块基本是byblock,想弄个自动随机改色工具(要避开1-8,250-255这些颜色)如果内容比较多时,不同的颜色检查图纸时可以更直观,谢谢
找到论坛的资料,但不会借鉴使用,求高手解答一下
http://bbs.mjtd.com/forum.php?mod=viewthread&tid=172495&highlight=%CB%E6%BB%FA
bbColor
本帖最后由 1291500406 于 2019-3-19 00:40 编辑bbColor by bb
;; 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)
)
1291500406 发表于 2019-3-18 23:56
bbColor by bb
很好的工具,如果能一次选定一堆块,然后自动为每个块随机分配颜色,而且可以一直回车一直改色,满意时再停止就好了。 谢谢! 1291500406 分享程序!!!!! 感谢楼上分享!
页:
[1]