1) I think, no matter how you do it, you're going to have to define some
tolerance as to what you call "on the line". A good value depends on the
scale of the lines and the precision of the variables (since the precision
is not infinite). A decent value is probably somewhere between 1e-4 and
1e-6, i.e. if the point is closer to the line than this distance, call it
"on". www.acadx.com has a function EQ in their VB section, which does this
"fuzzy" equality check.
2) one simple way to code, would be to check the distance from the line's
StartPoint to the selected point, and then from the line's EndPoint to the
selected point. Add these distances together, and compare to the length of
the line. The absolute minimum length between the StartPoint and Endpoint
is a straight line (or so I've heard). If the selected point is on the
line, the summed distances will equal the line length, otherwise it will be
longer (never shorter). If the difference between the two lengths is >
TOLERANCE, call it "off".
between two points A (at Xa, Ya, Za) & B (at Xb, Yb, Zb)
distance = sqrt((Xa-Xb)^2 + (Ya-Yb)^2 + (Za-Zb)^2)
If you don't want to do the math yourself, add Lines between the points and
get their .Length property.
3) a more textbook approach would be to find the distance from the selected
point to the line, and compare it to the TOLERANCE. You could find lots of
formulas for the distance from a point to a line, i.e.
http://www.google.com/search?q=distance+point+line
but the math will be a little trickier (cross products, dot products, etc)
than method #2.
James