@mursix wrote:
I want to select a lightweight polyline and determine which segment of the polyline was picked when selecting. Any ideas would be appreciated.
If by "which segment" you mean you want to know whether it was picked on the first one, or the second one, etc., with a number:
(vl-load-com); if needed
(defun C:PSN (/ plsel); = Polyline Segment Number
(setq plsel (entsel "\nSelect LWPolyline: "))
(prompt
(strcat
"\nPolyline was selected on segment number "
(itoa
(1+
(fix
(vlax-curve-getParamAtPoint (car plsel)
(osnap (cadr plsel) "_nea")
)
)
)
)
"."
)
)
(princ)
)
Kent Cooper, AIA