hi, couple of quest. this routine is supposed to check 2 endpoints of diff lines to see if they lie on the same point. (defun c:ce () (setvar "cmdecho" 0) (while (not (setq ent (entsel " Pick line 1 (near endpoint)")))) ;quest. if the "not" returns true if nothing's selected then y DOESN'T it quit the loop when nothing's selected? (setq z (car ent)) (redraw z 3) (setq a (cdr ent) b (car a) end1 (osnap b "endp")) ; the following is where the prob is. if nothing's selected it's supposed to go to nothing selected. ; neither of the conditions work (while (or (equal z (setq ent1 (entsel " Pick line 2 (near endpoint)")) (car ent1)) (not ent1)) ;or (alert (cond ((null ent1) "Nothing Selected") (T "You've Picked the same Line") );cond ) ;alert ) ;while (setq a1 (cdr ent1) b1 (car a1) end2 (osnap b1 "endp")) (if (equal end1 end2) (print "Endpoints are Equal") (progn (setq east (rtos (- (car end1) (car end2)) 2 4) north (rtos (- (cadr end1) (cadr end2)) 2 4) de (strcat "Diff E=" east) dn (strcat "Diff N=" north)) (alert (strcat "Endpoints are Not Equal!!" " "de " "dn)))) (redraw z 4) (princ) ) TIA, Shawn