Hi,
Assuming :
Code:
(setq ent (entsel))
You can do:
Code:
(setq param (vlax-curve-getParamAtPoint
(car ent)
(trans (osnap (cadr ent) "_nea") 1 0)
)
)
But I had some issues with this expression on old style 2d polylines, so I write the following, which works fine with old style 2d polylines but may return wrong results with 3d polylines...
Code:
(setq param (vlax-curve-getParamAtPoint
(car ent)
(vlax-curve-getClosestPointToProjection
(car ent)
(trans (cadr ent) 1 0)
(mapcar '-
(trans (getvar "VIEWDIR") 1 0)
(trans '(0 0 0) 1 0)
)
)
)
)