BURSTALLBLOCKS_v1_00....................................free

Command: BURSTALLBLOCKS

Bursts all blocks and nested blocks until there are no blocks in the drawing.

 

Code:

;;; =================================================
;;;        BURSTALLBLOCKS_v1_00.LSP   
;;;
;;;        Written by Andrzej Kalinowski,     www.autolisps.blogspot.com
;;;        v1.00 - 10.01.2023
;;;
;;;        Command: BURSTALLBLOCKS - bursts all blocks
;;;
;;; =================================================
(vl-load-com)
(defun c:BURSTALLBLOCKS ( / blo DROctr1 sset1)
	(vlax-for blo (vla-get-blocks (vla-get-activedocument (vlax-get-acad-object)))
        (or (wcmatch (vla-get-name blo) "`**_Space*")(vla-put-explodable blo :vlax-true))
    )
    (setq DROctr1 (getvar "draworderctl"))
    (setq sset1 (ssget "X" '((0 . "INSERT"))))
    (setvar "draworderctl" 0)
    (while (/= sset1 nil)
        (if (setq sset1 (ssget "X" '((0 . "INSERT"))))
            (progn
                (sssetfirst nil sset1)
                (c:Burst);Requires Express Tools
            );progn
        );if
    );while
    (setvar "draworderctl" DROctr1)
    (setq DROctr1 nil)    
    (alert "Done.")
    (princ)
);defun








 Version history:
v1.00 - 10.01.2023 - first release


 Compatibility:
-All Autocad
versions

Download file: BURSTALLBLOCKS_v1_00.FAS


No comments:

Post a Comment