Selection within a command

selection
command
python

#1

I am looking to make a selection during a command by using a script (python ideally). For example, suppose i run a command that takes a point as input. how do i script the selection of the point, and allow the command to continue?

I tried a naive approach of making a document with one point in it, running the command, and then typing SELPT, but this didn’t work.


#2

rs.GetPoint()

will allow you to click a point.

http://developer.rhino3d.com/api/RhinoScriptSyntax/win/#userinterface-GetPoint

rs.GetObject()
may be used to select a pre-existing point in a document.

http://developer.rhino3d.com/api/RhinoScriptSyntax/win/#selection-GetObject

(there are some other ways as well)