Jump to content

Looping overkill


JimmySean

Recommended Posts

I'm hoping someone can point me in the correct direction. I am not versed in autolisp and only know enough to be dangerous.

 

I'm wanting to loop -overkill until it gets 0 entities and then quit. The trouble is I'm not sure how to capture the results and record them in the lisp routine.

 

Here is what i have

(defun c:KIWF ()
;Create List and quit on nil or 0
(while ;I think I may be missing a part here for the true false condition
	(command "-overkill" "all" "" "")
	;record output to List
)
(princ)
)

 

Any help would be appreciated.

-Sean

Link to comment
Share on other sites

Try:

(defun c:Test ( / len ss)
 (setq len 2147483647) ; Initial value: Max. 32 bit integer.
 (while
   (and
     (setq ss (ssget "_A"))
     (> len (setq len (sslength ss)))
   )
   (command "_.-overkill" ss "" "")
 )
 (princ)
)

Link to comment
Share on other sites

Try:

(defun c:Test ( / len ss)
 (setq len 2147483647) ; Initial value: Max. 32 bit integer.
 (while
   (and
     (setq ss (ssget "_A"))
     (> len (setq len (sslength ss)))
   )
   (command "_.-overkill" ss "" "")
 )
 (princ)
)

 

I've got only one name for you :

 

Lee Mac

 

Look for him, you'll discover the beauty of the Lisp. He's a God amongst sheeps. 3:)

Link to comment
Share on other sites

Not sure what you are trying to say.

If you think there is anything wrong with my code please elaborate.

Well, i'm sorry for the repost of your code, it wasn't intend.

I just wanted to share some good references for jimmy...

You know, nowaday, smaller cellphone, bigger thumbs.... Sometimes it takes only a seconde and you misclick the good button... But the day must goes on!

Sorry pal!

 

Have a good day!

 

Sent from my SM-N910W8 using Tapatalk

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...