Jump to content

Alter visibility states across mutilpe layouts


Recommended Posts

Posted

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.

Posted
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)
             )

Posted

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

Posted

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.

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...