Is there a way to get osnap event in Rhino?

Just like the title, i m working on my own rhino command and i am stuck in getting the osnap event in Rhino: that is to say when a mouse click is happend to be an osnap point, how can i catch this event?

Hi @gw1119,

Rhino does not trigger an event when you osnap to something while picking a point. Why do you need this?

– Dale

Hi Dale, i would like to know the (x,y,z) number while an osnap mouse-click happens for my command need. or maybe my question should be that is there a way to get the x,y,z in Rhino coordinate once a mouse-click on geometric objects happens?

in addition to my question, is there a way to get the obj ID when an osnap type of mouse-click happens? for instance if i create a circle, then i click the centre of the circle by osnap to the curve obj, how can i get the crv obj’s ID once this happen?