duke Posted May 16 Share Posted May 16 Hello again friends ‼‼ I have a doubt if it is possible to touch a POLY and somehow capture the coordinates of the 2 vertices that make up the segment where I touched the POLY. I don't know if I explain myself. I am attaching an image for greater understanding. And thank you very much in advance ‼‼‼‼‼ Quote Link to comment Share on other sites More sharing options...
Jonathan Handojo Posted May 16 Share Posted May 16 Yes, it's possible: (defun c:foo ( / pl pm) (and (setq pl (entsel "\nSelect polyline <exit>: ")) (progn (setq pm (vlax-curve-getParamAtPoint (car pl) (vlax-curve-getClosestPointTo (car pl) (trans (cadr pl) 1 0)))) (princ (list (vlax-curve-getpointatparam (car pl) (fix pm)) (vlax-curve-getpointatparam (car pl) (1+ (fix pm))) ) ) ) ) (princ) ) 2 Quote Link to comment Share on other sites More sharing options...
duke Posted May 16 Author Share Posted May 16 1 hour ago, Jonathan Handojo said: Yes, it's possible: (defun c:foo ( / pl pm) (and (setq pl (entsel "\nSelect polyline <exit>: ")) (progn (setq pm (vlax-curve-getParamAtPoint (car pl) (vlax-curve-getClosestPointTo (car pl) (trans (cadr pl) 1 0)))) (princ (list (vlax-curve-getpointatparam (car pl) (fix pm)) (vlax-curve-getpointatparam (car pl) (1+ (fix pm))) ) ) ) ) (princ) ) Bro,, you save meeeee ‼‼‼‼‼ THANKS ‼‼‼‼‼ Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.