Hello - on a button you can use something like this:
! _-RunPythonScript (
import rhinoscriptsyntax as rs
def toggle_control_points():
ids = rs.GetObjects("Select objects", preselect=True)
if not ids: return
for id in ids:
if rs.ObjectGripsOn(id):
rs.EnableObjectGrips(id, False)
else:
rs.EnableObjectGrips(id, True)
toggle_control_points()
)
But for a keyboard shortcut or alias you’ll need to point it at an external py file like the one attached
To use the Python script use RunPythonScript, or a macro:
_-RunPythonScript "Full path to py file inside double-quotes"