explode all selected dynamic blocks

explode all selected dynamic blocks

Migumby
Advocate Advocate
934 Views
8 Replies
Message 1 of 9

explode all selected dynamic blocks

Migumby
Advocate
Advocate

Hello,

I’m hoping to find a routine that I can select and explode all selected dynamic blocks.

Our CNC machine software doesn’t seem to like them.

thanks

0 Likes
Accepted solutions (1)
935 Views
8 Replies
Replies (8)
Message 2 of 9

ВeekeeCZ
Consultant
Consultant
They must be exploded? What about convert them into regular blocks...
http://www.cad-notes.com/how-to-convert-dynamic-block-to-regular-block/
Message 3 of 9

hmsilva
Mentor
Mentor

@ВeekeeCZ wrote:
They must be exploded? What about convert them into regular blocks...

If acceptable as approach, my choice would be that one also...

 

Henrique

EESignature

0 Likes
Message 4 of 9

Migumby
Advocate
Advocate
No, sorry. The Software for the CNC machine that we use, doesn't except that.
Unfortunately it has to be exploded.
0 Likes
Message 5 of 9

hmsilva
Mentor
Mentor

@Migumby wrote:
No, sorry. The Software for the CNC machine that we use, doesn't except that.
Unfortunately it has to be exploded.

Do the Dynamic blocks have attributes?

 

Henrique

EESignature

0 Likes
Message 6 of 9

Migumby
Advocate
Advocate

no they dont.

 

0 Likes
Message 7 of 9

hmsilva
Mentor
Mentor
Accepted solution

@Migumby wrote:

no they dont.

 


Quick and dirty...

 

(vl-load-com)
(defun c:demo (/) (or acdoc (setq acdoc (vla-get-activedocument (vlax-get-acad-object)))) (vlax-for layt (vla-get-layouts acdoc) (vlax-for blk (vla-get-block layt) (if (and (= (vla-get-ObjectName blk) "AcDbBlockReference") (= (vla-get-isdynamicblock blk) :vlax-true) (not (vl-catch-all-error-p (vl-catch-all-apply 'vlax-invoke (list blk 'explode)))) ) (vla-delete blk) ) ) ) (princ) )

 

Hope this helps,
Henrique

EESignature

0 Likes
Message 8 of 9

Migumby
Advocate
Advocate
great!
Thank you very much
0 Likes
Message 9 of 9

hmsilva
Mentor
Mentor

@Migumby wrote:
great!
Thank you very much

You're welcome, Migumby!
Glad I could help

Henrique

EESignature

0 Likes