I was wondering if there is a method in rhinocommon or RhinoScriptSyntax to sketch a curve。Just like the command _sketch on toolbar.
thanks.
I was wondering if there is a method in rhinocommon or RhinoScriptSyntax to sketch a curve。Just like the command _sketch on toolbar.
thanks.
Thank you for your reply. But the message shows that ‘module’ object has no attribute ‘Sketch’. I’m in Rhino python editor. Did I input the command wrong?
[quote=“dale, post:2, topic:71044, full:true”]
Hi @kyxiang1, _Sketch
is a built in Rhino command. You might try like below:
import Rhino
import scriptcontext
import rhinoscriptsyntax as rs
def SampleSketch():
cmd = "_Sketch"
rc = rs.Command(cmd, False)
if not rc: return
new_curve_ids = rs.LastCreatedObjects(select=True)
if __name__=="__main__":
SampleSketch()
_
c.