Message 1 of 7
Explode the blocks inside the blocks

Not applicable
10-19-2020
10:18 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Dear all,
I am trying that to explode all the blocks inside blocks.
I written a code like below, but i have a doubt that how to repeat the process until end of the blocks ?
(defun c:GAD()
(if
(and
(/= (setq blocks (ssget "_X" '((0 . "INSERT")))) nil)
(setq ctr 0 len (sslength blocks))
)
(progn
(while (< ctr len)
(command "qaflags" 1)
(setq blk (ssname blocks ctr))
(command "EXPLODE" blk "")
(command "qaflags" 0)
(setq ctr (1+ ctr))
)
)
)
(command "_.PURGE" "_all" "NO" "")
(princ)
)
Please teach me how to grow myself in this topics ?