Use (entsel.... and the find out where the point that is retuned by it is
closest to. You may also want to check to make sure you only select a line.
Something like
(if
(and
(setq Sel (entsel "\n Select line: "))
(setq EntData (entget (car Sel)))
(= (cdr (assoc 0 EntData)) "LINE")
(setq Pt (cadr Sel))
(setq StPt (cdr (assoc 10 EntData)))
(setq EndPt (cdr (assoc 11 EntData)))
)
(if (< (distance Pt StPt) (distacne Pt EndPt))
StPt
EndPt
)
)
--
Tim
"A blind man lets nothing block his vision."
wrote in message news:5249088@discussion.autodesk.com...
Hey folks, heres my question. How do i snap to the end point of a line
using entget?
for example i want to use:
(setq line (entget "\nSelect line:"))
but i want to get the endpoint closest to where i picked the line. this is
not an assoc 11 question, i want it to find the endpoint as if i were using
osnaps. Just incase there is any confusion i made a jpg showing what i
want. Any ideas? thanks in advance.