- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello all, I'm new here so please correct me If i am not following any rules.
I'm trying to write/ manipulate some lisp code that will continue to explode blocks until no more can be exploded.
I've managed to get this to happen, but the lisp function keeps running even though the returned results are unchanging.
eg. This is continuously returned.
"Command: _.explode
Select objects: 7 found
Select objects:
Cannot explode that block.
Cannot explode that block.
Cannot explode that block.
Cannot explode that block.
Cannot explode that block.
Cannot explode that block.
Cannot explode that block.
I believe I need to find a way to tell the lisp to stop once it returns two unchanged numbers of found blocks (in the case above - 7).
If anyone is able to help I would really appreciate it. Code below:
(defun c:exall(/ bSet)
(setvar "qaflags" 1)
(while (setq bSet(ssget "_X" '((0 . "INSERT"))))
(command "_.explode" bSet "")
); end while
(repeat 3(command "-purge" "all" "" "n"))
(setvar "qaflags" 0)
(princ)
); end of c:exall
Solved! Go to Solution.