Yes you can.
- Getpoint
- Create a ray line.
- Then ssget with string mode "_X" for all polylines in current space.
- Then iterate through all selected polylines then sort them based on their closets intersected point to the first point you picked then first element of the list must be the polyline that surrounds the point.
Good luck.
One I use for 2d or 3d
; convert now to xyz
(defun co-ords2xy ()
(if (= xyz 2)
(progn
(setq I 0)
(repeat numb
(setq xy (list (nth i co-ords)(nth (+ I 1) co-ords) ))
(setq co-ordsxy (cons xy co-ordsxy))
(setq I (+ I 2))
)
)
)
)
(if (= xyz 3)
(progn
(setq I 0)
(repeat numb
(setq xy (list (nth i co-ords)(nth (+ I 1) co-ords)(nth (+ I 2) co-ords) ))
(setq co-ordsxy (cons xy co-ordsxy))
(setq I (+ I 3))
)
)
)
)