Message 1 of 10
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi guys, need a little bit of help here.
I want to change color to "ByBlock" for all entities inside of a selected block, including entities on nested blocks and excluding blocks color properties only.
What I mean is color of all blocks (selected one and nested) must remain whitout changes.
It's possible to do something like this?
I've got this code, but only works for a single block and doesnt change nested items.
(defun c:test (/ ss e blk doc) (setq doc (vla-get-activedocument (vlax-get-acad-object))) (if (setq ss (ssget ":L" '((0 . "INSERT")))) (repeat (setq i (sslength ss)) (setq e (vlax-ename->vla-object (ssname ss (setq i (1- i))))) (setq blk (vla-item (vla-get-blocks doc) (vla-get-Effectivename e))) (vlax-for x blk (vla-put-color x 0) ) ) ) (vla-regen doc acAllViewports) (princ) )
Solved! Go to Solution.