PDA

View Full Version : initget/getkword with 2 capital letters


tflaherty
2005-05-12, 02:55 AM
Here's my code, which doesn't work. All the examples I've seen always have the 2 capital letters together; is that how I have to do it, or is there a way to make this code work.

(initget "Yes No")
(setq drawroof (getkword "\nReady to draw roof? [Yes/No] <Yes> "))
(if (or (= drawroof "Yes") (not drawroof))
(progn
(initget "TopRight TopLeft BottomLeft BottomRight")
(setq hip (getkword "\nSpecify corner to insert hip [TopRight/TopLeft/BottomLeft/BottomRight]: "))
(cond ((= hip "TopRight") (hip45))
((= hip "TopLeft") (hip135))
((= hip "BottomLeft") (hip225))
((= hip "BottomRight") (hip315)))))

RobertB
2005-05-12, 03:01 AM
That is the it must be.

Opie
2005-05-12, 04:06 AM
Could you change your capitals to "toPRight, toPLeft, bottoMRight, bottoMLeft"?

Just a question.

CAB2k
2005-05-12, 05:26 AM
(initget "TR-topright TL-topleft BL-bottomleft BR-bottomright") :)

RobertB
2005-05-12, 04:26 PM
That is the it must be.
Hmm... English is my mother-tongue. :screwy:

(initget "TR TL BR BL")
(getkword "\nSpecify corner to insert hip (Top Right/Top Left/Bottom Right/Bottom Left)
[TR/TL/BR/BL]: ")

CAB2k
2005-05-12, 04:34 PM
Now why didn't we think of that?
Very good Robert.

tflaherty
2005-05-12, 05:17 PM
Thanks everybody. All these suggestions work great. Now I just have to pick the one I like best.