Here's part of what you need, from another routine I'm working on. It returns the coordinate of a point a given distance to one side of any point on any object. To use, simply call as follows:
(uc:offsetInDir entname point dir offDist)
where:
entname is the entity name of the polyline (or other entity)
point is the incident point on the polyline (or other entity)
dir is which side to offset
offDist is the distance
Direction is based on the fact that entities have a start point and an end point. The direction of the entity is this direction, along the path of the entity from start point to end point. If you call the routine with dir=-1, it will calculate an offset on the right side of the line (i.e., direction to the offset point is 90 degrees clockwise from the direction of the line); if dir=1, it creates the offset on the left side (counter-clockwise from the direction of the line).
It's up to you to add the code that interacts with the user, and figures what distances to go along the polyline.
(vl-load-com)
(setq QUAD (/ PI 2)) ; radians in a quadrant
(defun uc:azimuthAtParam (entname selPar / dvec)
(setq dvec (vlax-curve-getFirstDeriv entname selPar))
(angle '(0 0) dvec)
;; note: angle projected on xy plane
) ;defun uc:azimuthAtParam
; value of dir: -1 = clockwise (rt), 1 = counterclockwise (lt)
(defun uc:offsetInDir (entname point dir offDist / ang par)
(if (= offDist 0)
(append point)
(progn
(setq par (vlax-curve-getParamAtPoint entname point)
ang (+ (* dir QUAD) (uc:azimuthAtParam entname par))
) ;setq
(polar point ang offDist)
) ;progn
) ;if
) ;defun uc:offsetInDir