Jump to content

You stare to much and it just dosnt work


Recommended Posts

Posted

Hello again, :P

Why is this not working? what am i missing,

it sets them, but gives an error meaning the rest of the code dosnt work

i need them as "real" for cacl's

 

 

 

[b] 
(SETQ dn 15)
(IF (= dn 15)
  ( (setq dn 20)
     (setq od 21.3)
     (setq thk 2.77)
   )
)
[/b]

Posted

You can't group a series of statements with simply parenthese, you need to use 'progn'

 

So:

 

(SETQ dn 15)

(IF (= dn 15)

(progn

(setq dn 20)

(setq od 21.3)

(setq thk 2.77)

)

)

 

 

Or cleaner:

 

(SETQ dn 15)

(IF (= dn 15)

(setq dn 20

od 21.3

thk 2.77

)

)

Posted

Thank you very much.

ive done that before and its worked so i assumed it always dose.

and dnt even remotely thing of progn

 

cheers

Flower

Posted

(progn is used for wrapping code inside "if" "while" statements to name a few.

 

i.e.

 

(if (this is true)
  (progn
    (do all of this)
    (and this)
    (and this)
  ) ; end progn
  (progn
    (else do this)
    (and this)
    (and this)
  ) ; end progn
) ; end if

 

 

See here for more

Posted

lee. that is kinda weird, you link me to a post, on a topic of exactly what i am doing.

 

ive created a list to create all elbows from 0- 90(haven't tried any hight)

with an input of angle to the lisp, and "A" to find "x" (that is if use similar catalog as i do).

and creates a 3d block, with a handy name, and insertion point

then i run pt and it flat shots it and create the plan's as blocks.

What does you's do? (if u dnt mind me asking)

And does it just do elbows?

as i am after reducer tee's

and many other things.

 

but cheers than link gave me a better insite of "or"

 

Flower

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