Advertisement
Guest User

BOKill

a guest
May 17th, 2018
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lisp 0.60 KB | None | 0 0
  1. (defun c:BOKill ()
  2. (vl-load-com)
  3. (vlax-for blk (vla-get-Blocks
  4.     (vla-get-ActiveDocument (vlax-get-acad-object))
  5. )
  6. (if
  7.     (and
  8.         (= (vla-get-IsLayout blk) :vlax-false)
  9.         (= (vla-get-IsXref blk) :vlax-false)
  10.         (not (wcmatch (vla-get-name blk) "*|*"))
  11. )
  12. (vlax-for obj blk
  13.     (if (= (vla-get-ObjectName obj) "AcDbBlock")
  14.     (vl-catch-all-apply 'VLA-EXPLODE
  15.     (command "_.-overkill" "_All" "" "")
  16.  
  17. (command "_.bsave)
  18.  
  19. (command "_.bclose)
  20. (list obj))
  21.     (princ)
  22.     )
  23. )
  24. )
  25. )
  26. (vla-regen (vla-get-activedocument (vlax-get-acad-object)) acAllViewports)
  27.    (princ "\rFinished                  ")
  28.    (princ)
  29. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement