Is there any reason this function would return 0 if the point provided is not at the start of an LWPolyline?
Maybe it's because I'm using 2002?
John F. Uhden
Solved! Go to Solution.
Solved by john.uhden. Go to Solution.
No, there should be no reason. Are you encountering a scenario where it is? Provide insight if so
It does that if you give it the start/end of a closed one, even if you request it for the end point:
(vlax-curve-getDistAtPoint pline (vlax-curve-getEndPoint pline))
returns zero [also for other closed shapes -- Circle, Ellipse, Spline]. But the Parameter approach to the same question does give the length of the Polyline [or other].
If you're not talking about the start/end point, is it just close enough to the start for display rounding to show zero? Post a little drawing indicating where the Point in question is along the Polyline.
It was all my fault.
Before you ask for distatpoint, you have to get the closestpointto...
(defun @getdistatpoint (e p)
(vlax-curve-getdistatpoint e
(vlax-curve-getclosestpointto e p)
)
)
The zero was my own mistake (embarrassing).
John F. Uhden
Can't find what you're looking for? Ask the community or share your knowledge.