woodman78 Posted April 16, 2012 Posted April 16, 2012 I have creates dynamic blocks that are inserted using a lisp. Is there some way I can select blocks across multiple layouts and change the states once? This will save me a lot of time if it is possible. Thanks. Quote
pBe Posted April 17, 2012 Posted April 17, 2012 I have creates dynamic blocks that are inserted using a lisp. Is there some way I can select blocks across multiple layouts and change the states once? Of course you can. (setq ss (ssget "_x" '((0 . "INSERT")(2 . "bname,`*U*")))) (repeat (setq i (sslength ss)) (process visibility state here) ) Quote
BlackBox Posted April 17, 2012 Posted April 17, 2012 Building on Pbe's post, be sure to check for locked layer(s) before iterating the ActiveSelectionSet Object. Also be sure to limit the desired visibility state to those included in the AllowedValues Property for the Dynamic Block's Properties. HTH Quote
irneb Posted April 17, 2012 Posted April 17, 2012 And probably also check the EffectiveName inside that loop, since the "bname,`*U*" will filter all the blocks (named bname) without any DB changes, but also all other DB's with a change (even those not inserted from bname). Another thing you might do (if you also have the same block in Model space, but don't want to update that) is to include a (410 . "~Model") filter as well. That way it would select only blocks on layout tabs. Probably not needed as you'd very seldom have the same block in both PS & MS, but just to catch all possible scenarios. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.