Try to call Rhino command in GH python

Noob here trying to add a cone using rhinoscriptsyntax in grasshopper… I succeeded in calling AddLine using "a=rs.AddLine(xpoint,point), but I got stuck here when I try to call other Rhino commands like AddCone or AddBox. Here’s the screenshot and my gh file!
unnamed.gh (9.4 KB)

It looks like your height input is being interpreted as a string (i.e. because it’s coming from a panel) and that the AddCone function in fact does not accept a point input as its base parameter (i.e. the function is bugged or its documentation is misleading). Here’ a quick fix:


unnamed.gh (7.3 KB)

1 Like

AddCone takes either point for base & point for height (so the 2 points define the height of the cone) or plane as base and number for height (so the plane’s Z axis defines the direction of the height) Rhino - RhinoScriptSyntax

1 Like

Thank you! However, I have got another noob question to ask when creating a box…:


unnamed.gh (8.1 KB)