Message 1 of 19
Not applicable
08-25-2016
12:53 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
So I'm trying to create a lisp which will burst everything in the drawing but not freeze up completely if it meets un-explodeable objects.
Here's my code so far:
(setq burstrc 0) (while (and (/= (ssget "_X" '((0 . "Insert"))) nil) (<= burstrc 5) ) (setq compare1 (ssget "_X" '((0 . "Insert")))) (sssetfirst nil (ssget "_X" '((0 . "Insert")))) (c:burst) (setq compare2 (ssget "_X" '((0 . "Insert")))) (if (and (> (sslength compare1) 0) (> (sslength compare2) 0) ) (if (= (sslength compare1) (sslength compare2)) (setq burstrc (+ burstrc 1)) (setq burstrc 0) ) ) )
The Idea is that after 5 attempted bursts without the amount of "insert" changing the loop will be broken.
Unfortunately at the moment im getting:
; error: bad argument type: lselsetp nil
I can just keep executing the command and it will burst everything, but that kind of defeats the point.
Solved! Go to Solution.