When I enter an alias with macro for an object snap such as _CenterSnap while
import rhinoscriptsyntax as rs
rs.GetPoint()
is waiting for input, The "Center" point picking option is available only when picking points.
is reported on the command line, and the snap is not enabled.
The same alias works during a Rhino command, e.g. _Point
Is there a way to use an alias for an object snap while running a Python script via _RunPythonScript or from the Rhino Python Editor?
Thanks, but I’m looking to use a custom alias to on-the-fly set an object snap while _RunPythonScript is executing a script, waiting for the point input.
In the case of using _CenterSnap, I would like to enter CS when the script is waiting for the point input.
Yeah, this is odd - seems like running snaps from aliases is explicitly excluded while running a script…
If I run rs.GetPoints() and then try to pick the center point of a circle (while it is not checked in the osnap panel)
Clicking on the “Center” osnap toolbar button - works
Typing out the snap at the command line (i.e. CenterSnap) - works
Typing a pre-set alias for the center snap (i.e. cs=CenterSnap) - fails
with the message “The “Center” point picking option is not usable at this time.”