@BIGAL
No need to convert the entity to an object, the curve functions are actually faster with enames.
(vlax-curve-getdistatpoint (car ent) pt)
_$
Benchmarking ....................Elapsed milliseconds / relative speed for 131072 iteration(s):
(vlax-curve-getDistAtPoint E P)..............1656 / 4.43 <fastest>
(vlax-curve-getDistAtPoint (vlax-ena...).....7344 / 1.00 <slowest>
; 1 form loaded from #<editor "<Untitled-0> loading...">
_$