Jump to content

Select all or convert *X### Anonymous blocks.


Recommended Posts

Posted

I need a way to select all the *X anonymous blocks (Hatches) and either convert to regular blocks, back into a hatch or just delete them.

 

QSelect will only do it one at a time, wildcard doesn't seem to work, Filter doesn't appear to recognize anonymous blocks, either.

 

I have a lot to do, one at a time , while not impossible for one drawing, I have several .dwg I would like to do.

 

Thanks in advance.

 

Here is a drawing with one *X in it.

Anonymous Hatch.dwg

Posted

Here's some quick code to select all blocks in the active layout/viewport with block names starting "*X":

(defun c:myblksel nil
   (sssetfirst nil
       (ssget "_X"
           (list
              '(0 . "INSERT")
              '(2 . "`*X*")
               (if (= 1 (getvar 'cvport))
                   (cons 410 (getvar 'ctab))
                  '(410 . "Model")
               )
           )
       )
   )
   (princ)
)

The code could of course be modified to convert/explode/delete if necessary.

 

Lee

Posted

Thanks!!

 

Works a treat, I was surprised Filter didn't handle these.

 

Would have been nice to convert them, but I just mainly wanted them gone and they aren't really necessary for my current work.

 

Once again, I appreciate this.

Posted
I need a way to select all the *X anonymous blocks (Hatches) and either convert to regular blocks, back into a hatch or just delete them.

 

QSelect will only do it one at a time, wildcard doesn't seem to work, Filter doesn't appear to recognize anonymous blocks, either.

 

I have a lot to do, one at a time , while not impossible for one drawing, I have several .dwg I would like to do.

 

Thanks in advance.

 

Here is a drawing with one *X in it.

Try to use U2B or U2BM command from here (download bgtools2.32.zip from #1)

...

M2U - Convert MINSERT to Unnamed block

M2B - Convert MINSERT to block

U2B - Convert UNNAMED to block

U2BM - Convert UNNAMED to block multiple selection

UX - Explode UNNAMED block

...

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...