Jump to content

How to convert all subblock to main block ?


Trai

Recommended Posts

Dear all, 

In my drawing have many block, so it's very hard to manager it and it will lag to PC system. Every block have many subblock. You can see a example below. So i want to  convert all of them to to main block. Someone can help me a lisp to resolve them. Many thank for your help.

image.thumb.png.272c6b9de693bb80250631f26e5b41d2.png

Link to comment
Share on other sites

There probably is a lisp out there but if you just explode 1 block repeatedly down to individual parts then make a new block, there is replace block1 with block2 out there. You can purge block1 and then do a rename block if you want.

Link to comment
Share on other sites

;;Dynamic block to ordinary block

;;by:o0ki1ler

(defun c:1ptk (/ cnt)
  (if (ssget (list '(0 . "INSERT") (cons 410 (getvar 'CTAB))))
    (progn
      (setq cnt 0)
      (vlax-for        obj
                    (vla-get-activeselectionset
                      (vla-get-activedocument (vlax-get-acad-object))
                    )
        (if (and
              (vlax-property-available-p obj 'isdynamicblock)
              (eq :vlax-true (vla-get-isdynamicblock obj))
            )
          (progn
            (setq cnt (1+ cnt))
            (vla-ConvertToAnonymousBlock obj)
          )
        )
      )
      (princ (strcat "\n***Co-modification " (itoa cnt) " Dynamic blocks***"))
    )
  )
  (princ)
)

Link to comment
Share on other sites

mhupp that pulls the block apart into single blocks, does not say make a new single block with all the entities. That could though be 1st step, then need maybe Burst, then make back into a block, that seemed to work. Now for some time.

Link to comment
Share on other sites

14 hours ago, mhupp said:

this should be what your looking for.

http://www.lee-mac.com/extractnestedblock.html

Thank for the this link.

I have just test this lips, it working very good , but if posible, I want  to select many object  simultaneous instead of choice ony a object. Someone can edit again this lisp

 

Edited by Trai
Link to comment
Share on other sites

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