I am work on a new line command with some more option and it works fine unless I draw the line up to another line and run it accross the line to the angle I want it, it will not snap to the point it snaps to endp midp or prep If I have the intersection osnap on it will not snap to the point I am at htis is not all of the command I left out some of the (= null pt1)
(setq pt1a (getpoint "\nSpecify point"))
(setq pt2 (getpoint pt1 "\nSpecify second point" ))
(if (null pt2)
(vl-exit-with-error "")
)
(command "_line" pt1 pt2 "")
(while
(setq ang1 (angtos (angle pt2 pt1) 0 1))
(command "angbase" pt2 pt1)
(initget "C D U")
(setq pt3 (getpoint pt2 "\nPick next Point or [Undo/Close]:"))
(cond
((null pt3)
(vl-exit-with-error "") );end null
((= 'LIST (type pt3))
(command "angbase" pt2 Pt1)
(command "_line" pt2 pt3 "")
(setq pt1 pt2)
(setq pt2 pt3)
(setq l (cons (entlast) l)) ); end list
((= pt3 "U")
(entdel (car l))
(setq l (cdr l))
(setq obj1 (cdr (assoc 10 (entget (entlast)))))
(setq obj2 (cdr (assoc 11 (entget (entlast)))))
(setq ob1 (list(car obj1) (cadr obj1)))
(setq ob2 (list(car obj2) (cadr obj2)))
(setq ang (angtos (angle ob2 ob1)))
(setq pt1 ob1) (setq pt2 ob2)