flowerrobot Posted January 9, 2009 Posted January 9, 2009 Hello again, 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] Quote
CarlB Posted January 9, 2009 Posted January 9, 2009 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 ) ) Quote
flowerrobot Posted January 9, 2009 Author Posted January 9, 2009 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 Quote
Lee Mac Posted January 9, 2009 Posted January 9, 2009 (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 Quote
flowerrobot Posted January 9, 2009 Author Posted January 9, 2009 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 Quote
Lee Mac Posted January 10, 2009 Posted January 10, 2009 This is mine: (badly written I must admit - it was one of my first. ) PIPE & FLANGE DRAUGHTSMAN.zip 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.