Jessica28 Posted June 23, 2015 Posted June 23, 2015 I'm running autocad Mep 2016. I received a drawing with a ton of dynamic blocks. I'm trying to explode them all but can't. I see that you can go to the block editor and check "allow exploding" and redefine the block, but there are a TON of blocks and just as many drawings I'd have to do it to..Plus I tried it in one drawing and it did not seem to work on every block....Is there an easier and faster way to explode everything? Thanks, Jess Quote
feargt Posted June 23, 2015 Posted June 23, 2015 try using this Lisp on the blocks first, it will convert them to static blocks retaining there Parameters and then u can explode them afterwards http://www.theswamp.org/index.php?topic=32681.msg382548#msg382548 Quote
Jessica28 Posted June 23, 2015 Author Posted June 23, 2015 Hmmm. that just brought me to some home page and not to a specific post showing the Routine.....Maybe its because i'm not a member of that site? Is there another way you can get me the routine? I so want to try it..These drawings are making me crazy. Quote
feargt Posted June 23, 2015 Posted June 23, 2015 from a member called MP (defun c:UnDynamic ( / _get_item _right _make_key _dynamic->static_block _get_locked _get_dynamic_inserts _main ) (defun _get_item ( collection key / item ) (vl-catch-all-apply '(lambda ( ) (setq item (vla-item collection key))) ) item ) (defun _right ( str n / len ) (if (< n (setq len (strlen str))) (substr str (1+ (- len n))) str ) ) (defun _make_key ( collection prefix len / key ) ( (lambda ( i pad ) (while (_get_item collection (setq key (strcat prefix (_right (strcat pad (itoa (setq i (1+ i)))) len ) ) ) ) ) key ) 0 ( (lambda ( pad ) (while (< (strlen pad) len) (setq pad (strcat "0" pad)) ) pad ) "" ) ) ) (defun _dynamic->static_block ( blocks insert len ) (vla-ConvertToStaticBlock insert (_make_key blocks "STATIC_" len) ) ) (defun _get_locked ( layers / locked ) (vlax-for layer layers (if (eq :vlax-true (vla-get-lock layer)) (setq locked (cons layer locked)) ) ) locked ) (defun _get_dynamic_inserts ( blocks / inserts ) (vlax-for block blocks (vlax-for object block (if (eq "AcDbBlockReference" (vla-get-objectname object)) (if (eq :vlax-true (vla-get-isdynamicblock object)) (setq inserts (cons object inserts)) ) ) ) ) inserts ) (defun _main ( document / blocks inserts locked len ) (if (setq inserts (_get_dynamic_inserts (setq blocks (vla-get-blocks document)) ) ) (progn (foreach layer (setq locked (_get_locked (vla-get-layers document))) (vla-put-lock layer :vlax-false) ) (setq len (strlen (itoa (length inserts)))) (foreach insert inserts (_dynamic->static_block blocks insert len) ) (foreach layer locked (vla-put-lock layer :vlax-true) ) ) ) (princ) ) (_main (vla-get-activedocument (vlax-get-acad-object))) ) Quote
Jessica28 Posted June 23, 2015 Author Posted June 23, 2015 hmmm. it helped....But they still wont explode or burst after I ran that command...I can copy and paste most stuff to other drawings where before nothing would copy and paste...But now all the devices will paste but the text wont come over....Weird. Quote
tzframpton Posted June 23, 2015 Posted June 23, 2015 Are you sure they're Dynamic Blocks or are they AEC Objects? Quote
Jessica28 Posted June 24, 2015 Author Posted June 24, 2015 Ummmmm tzframpton. I'm not sure. By now I should probably know the difference but I guess I don't. How do I tell?.....I know when I click on one of their grips It brings up a list of content I can change it to....on another grip I can move it around and host it to other walls.....These are mainly electrical symbols... Quote
tzframpton Posted June 24, 2015 Posted June 24, 2015 When you select the block it should give you a description at the top of the Properties palette. Can you report back to us what it says, just to eliminate the possibility it may be an AEC Object? Quote
tzframpton Posted June 24, 2015 Posted June 24, 2015 Thank you for reporting back. That is not an AEC Object so we can eliminate that possibility. 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.