Jump to content

selection sets and program logical order


Croftyno1

Recommended Posts

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"?

Link to comment
Share on other sites

1 way would be:

 

(if (> (sslength ss1) 0)
 do_process1)
(if (> (sslength ss2) 0)
 do_process2)
(If (> (sslength ss3) 0)
 do_process3)

etc...

 

-David

Link to comment
Share on other sites

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

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...