;; For polylines ONLY. Points returned in WCS
(defun foo (ent / d dis i m pm p)
(setq i 0 p 0.0 m 0.0)
(while (setq i (1+ i) d (vlax-curve-getdistatparam ent i))
(if (< m (setq dis (- d p))) (setq m dis pm (1- i)))
(setq p d)
)
(list
(vlax-curve-getpointatparam ent pm) ; Start Vertex
(vlax-curve-getpointatparam ent (1+ pm)) ; End Vertex
(vlax-curve-getpointatparam ent (setq pm (+ 0.5 pm))) ; Mid Vertex
(angle '(0.0 0.0 0.0) (vlax-curve-getfirstderiv ent pm)) ; Angle at mid vertex
)
)