RhinoCommon Command as Point Picker / Custom OSnap

Hello there!

I’m trying to implement a custom point picker, similar to eg. the Between command. In particular, I want to be able to select the virtual intersection point of two curves (virtual, meaning if they were extended to intersect) from within another command, e.g. a Line.

I’ve managed to set up a transparent command (using [CommandStyle (Style.Transparent)]), so that I can call it while another command is running, but I haven’t found any way to talk the previous command in the CommandStack or fill in anything into the current command prompt.

Is there any way to do so, or would there be a different approach to solve my problem? (Or do I need to integrate some MacOS automation and just make my command store the coordinates of the desired point somewhere and have some other program feed it into the Rhino command prompt afterwards?)

Thanks for any help in advance!


I’ve had tried everything before starting this topic. Well, except one thing: RhinoApp.RunScript. I didn’t expect, I could pass it just command parameters, not a whole command. But it does work! I still have to code everything around, but the basics are clear now!

RhinoApp.RunScript("5,2", true);   # instead of the coordinates 5 and 2, obviously use calculated ones


Instead of writing [SOLVED] in your title you could actually click the Solution button…

Ah, thank you for pointing that out!

1 Like