I think I have a good challenge. I have been searching in all known forums a routine to explode all blocks and hatches (those hatches that allow this). This must to be done both in model and paper space with some particular issues. The routine must:
During my research, I found some useful informations here and there, if someone need.
http://forums.cadalyst.com/showthread.php?t=5628 (some discussions about explode all blocks)
http://www.lee-mac.com/upgradedburst.html (pretty good one)
Thanks for any help!
Thanks for the reply 3wood.
I did not know that EXPLODEALL.vlx existed. I did the install and the registration.
My feedback, if you allow me
- When I started to use the routine, something was not working. So I realized that my QAFLAGS was set to 0, because yesterday I tested several routines and one of these routines had changed my QAFLAGS without my knowing. So, I suggest to you add to your routine, a "device" that makes this variable set to 1 before executing the routine.
- I realized that every time I restart the AutoCAD or in each new project I open the routine resets its settings. I would like to suggest that the routine record the last configuration chosen by the user. I think it would be more practical.
- In Model space when I get the prompt "Select objects" and I write ALL, the routine does not affect the objects in Paper space. Likewise, when I am in a Paper space and I write ALL, the command does not affect the Model space objects or even the objects in other Model spaces layouts. I suggest here a "device" so the user can choose the entire drawing, or the current space/layout location (such as in the FIND command).
Now, about my issues:
Sorry, but Step 4 is really important, because I have thousands of fields in each project.
I asked the Step 12, because all my blocks have wipeouts and solid hatches with texts. When I do the “as built” project, I erase the solid hatch and I keep only the wipeout to hide the objects below. Sometimes, the solid is not erased because the constructor did not make his job as it was supposed. So, using your routine made me realize that my problem is not the wipeout, but the solid. After exploding the block, is the solid that hides all my texts. I know there are routines to send all hatches to back but, if I do that, the solids will go to the back of the wipeouts and I do not want this. This is the reason to bring all texts to front.
I can do Steps 1, 3, 4 and 13 manually but, you must agree with me that it is to avoid making manual work that routines exist.
I appreciate your reply and I hope that I may have contributed to improving your routine.
Thank you very much for the great suggestions.
I just tested it and acturally field values are remained as they are.
To incorparate more functions in one go, I guess the best way is to provied a command-line-only function of EXPLODEALL once the initial setting is saved in the system. So you can use it combined with other fuctions in a script file / new lsp / Startup.
An other routine (I am using sometimes) which explodes
ALL Blocks (and Blocks inside Blocks) in the current DWG
From www.cadxp.com - Author: Bred & Patrick_35
;; Explode ALL Blocks even Block inside Block ;; From Bred & Patrick_35 ;; Routine: EXPBS ;; ATTENTION : no error management, so ... (defun c:expbs (/ N NB X) (vl-load-com) (while (setq n (ssget "_X" '((0 . "INSERT")))) (setq x 0 nb 0) (repeat (sslength n) (vla-explode (vlax-ename->vla-object (ssname n x))) (vla-delete (vlax-ename->vla-object (ssname n x))) (setq nb (+ (sslength n) nb)) (setq x (+ x 1))) ) (if nb (princ (strcat "\n" (rtos nb) "Bloc(s) explosé(s) dans le DWG ")) (princ "\n pas de Blocs dans le DWG ")) (princ) )
Bonjour Patrice, comment ça va?
Thanks for the reply.
The routines kill hatchs and kill wipeouts are realy good. They are so fast!
Unfortunately that's not what I'm looking for. I do not want to erase the hatchs and the wipeouts. I actually want to keep them, especially without changing the draw order. I'm trying very hard to find a routine that explodes the blocks without changing the draw order. By the way, your routine to explode all blocks it’s also good and fast but that does not respect the Step 7 I asked. Secondly, it does not keep the draw order. In my blocks I have: wipeouts underhacths under lines. I would not to change this draw order sequence because otherwise hatches will be in front of the lines, or the wipeouts will be in front of hatches and that is not good. So, keep the draw order is important.
Anyway, thanks for the help. I'll keep trying to find routines and unite them in the sequence I need.
Merci beaucoup et bonne journée! Thanks and have a nice day!