(defun c:lineflip (/ entity entinf point1 point2) (setq entity (car (entsel "\nLine to flip: "))) (setq entinf (entget entity)) (if (= (cdr (assoc 0 entinf)) "LINE") (progn (setq point1 (assoc 10 entinf)) (setq point2 (assoc 11 entinf)) (entmod (subst (cons 10 (cdr point2)) (assoc 10 entinf) entinf)) (setq entinf (entget entity)) (entmod (subst (cons 11 (cdr point1)) (assoc 11 entinf) entinf)) (entupd entity) ) (princ "\nYou did not select a line!") ) (princ) )