(setq enobj (car (entsel "\nSelect Objectine or Pline with to point, Press \"Esc\" to Exit:"))) (while (null enobj) (setq enobj (car (entsel "\nNothing selectedine or Pline with to point, Press \"Esc\" to Exit:"))) ) (setq endata (entget enobj)) (while (or (and (/= (cdr (assoc 0 endata)) "LINE") (/= (cdr (assoc 0 endata)) "LWPOLYLINE")) (and (= (cdr (assoc 0 endata)) "LWPOLYLINE") (/= (cdr (assoc 90 endata)) 2))) (setq enobj (car (entsel "\nObject selected is unexpected, Line or Pline with to point again! Press \"Esc\" to Exit:"))) (while (null enobj) (setq enobj (car (entsel "\nNothing selectedine or Pline with to point, Press \"Esc\" to Exit:"))) ) (setq endata (entget enobj)) )