It sounds like you are looking to pick a segment of a lwpolyline. What I've done in the past is explode a copy saving the info needed from the segment that snaps to the pick point, then deleting all the newly created objects leaving the origional polyline untouched.
Code:
(princ "\nSelect Line, Arc or Polyline segment ")
(setq ent (entsel))
(vl-cmdf "undo" "BEgin")
(setq eend (cdar(entget(entlast))) ; last entity
pt (cadr ent) ; selection point
ent (car ent) ; selected entity
obj (vlax-ename->vla-object ent)
EnTyp (cdr(assoc 0 (cdr(entget ent)))); entity type
)
;|Change pick point to midpoint to select newly created
line instead of original polyline with width.
===========================================|;
(vl-cmdf "point" "mid" pt)
(setq pt(cdr(assoc 10(entget(entlast)))))
(entdel(entlast))
(vla-copy obj) ; Copy selected object.
(setq SS (ssadd (entlast)))
(if (= EnTyp "POLYLINE")(vl-cmdf "convertpoly" "Light" ss ""))
(if(or(eq EnTyp "POLYLINE")(eq EnTyp "LWPOLYLINE"))
(vl-cmdf "explode" (entlast)) ; Explode the copied object.
)
(setq elist (cdr(entget (ssname (ssget pt) 0))) ; Entity list of selected segment.
EnTyp (cdr(assoc 0 elist)) ; Entity Type of selected segment.
)
(while(not(eq (entlast) eend))
(entdel(entlast)) ; Delete everything that we added so far.
)
Of course if you know for sure you're looking for the second segment of the lwpolyline that would be easyer. You wouldn't need to make a copy just extract the information directly.