Croftyno1 Posted January 5, 2011 Posted January 5, 2011 I have 6 selections sets in my lisp routine ss1, ss2, ss3, ss4, ss5, ss6 I also have 6 programs in the same lisp routine and each program uses one selection set in the order as above. My problem is that if there is no value for ss1 for the first program, it will not continue to run the next one along. Having said that if I have a value for every selection set the routine works fine. How would I write the code to say, if no ss1 then continue to the next progam, if no ss2 then run the next program etc. The value for my selection sets are (layers). - Crofty - Whose idea was it to put an "S" in the word "lisp"? Quote
David Bethel Posted January 5, 2011 Posted January 5, 2011 1 way would be: (if (> (sslength ss1) 0) do_process1) (if (> (sslength ss2) 0) do_process2) (If (> (sslength ss3) 0) do_process3) etc... -David Quote
MarcoW Posted January 5, 2011 Posted January 5, 2011 Why not post the code you have? We might have a better view on the case. Regards, MarcoW edit: David beats me Quote
Croftyno1 Posted January 5, 2011 Author Posted January 5, 2011 Hi Marco, Ive attached a drawing and the lisp routine. It basically calculates quantities and works you pick a window around all the different lines. If you tried it without one of the lines it doesnt continue on to the next calc. Qtys.lsp Quantities.dwg Quote
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.