JimmySean Posted July 21, 2017 Share Posted July 21, 2017 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 Quote Link to comment Share on other sites More sharing options...
Roy_043 Posted July 22, 2017 Share Posted July 22, 2017 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) ) Quote Link to comment Share on other sites More sharing options...
boucher5767 Posted July 27, 2017 Share Posted July 27, 2017 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:) Quote Link to comment Share on other sites More sharing options...
Roy_043 Posted July 28, 2017 Share Posted July 28, 2017 Not sure what you are trying to say. If you think there is anything wrong with my code please elaborate. Quote Link to comment Share on other sites More sharing options...
boucher5767 Posted July 28, 2017 Share Posted July 28, 2017 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.