Can someone help me with lisp code for the following problem if angle betweet PT1 and PT2 = 0 to 90 then do this if angle betweet PT1 and PT2 = 270 to 360 then do this I am working on a routine to insert blocks that represent ridge line roof tiles. It works fine as long as the pitch inclines from left to right. They are upside down if the pitch is inclined from right to left. Thanks! -JB here is what I have so far (defun ridgeline_er (s) (if (/= s "function cancelled") (if (= s "quit / exit abort") (princ) (princ (strcat " Error:"s)) ) ) (setvar "snapang" 0) (setq *error* olderr) (princ) ) (defun c:ridgeline () (setq olderr *error* *error* ridgeline_er) (setvar "cmdecho" 0) (graphscr) (setq PT1 (getpoint " Select bottom point of Ridgeline:")) (setq PT2 (getpoint " Select top point of Ridgeline:")) (setq LAY (cdr (assoc 8 ENAME))) (setq CLR (cdr (assoc 62 (tblsearch "layer" LAY)))) (setq ANG (* (/(angle PT1 PT2)pi)180)) (setq DIST (distance PT1 PT2)) (setq QTYR (/ DIST 12)) (setq QTYI (fix QTYR)) (setq SCL "1") (setq blknam "ridgetile") (command "_.insert" blknam PT1 SCL "" ANG) (setq STD (entlast)) (command "snap" "r" "0,0" ANG) (setq cpyang (strcat "@12<" (rtos ang 2 2))) (repeat QTYI (setq STD (entlast))(command "copy" STD "" "@" cpyang)) (setvar "snapang" 0) )