Parameter must be a Guid or a string representing a Guid

Hello all,

I’m trying to write a Python script in Grasshopper that sorts a tree of boxes and encountering the infamous guid error. I’ve used the type hint to suggest that the inputs are boxes, and I’m pretty sure that I’m passing the offending rhinscriptsyntax command a box, but it still isn’t happy. Any thoughts?

guid issue.gh (7.7 KB)

I solved this myself. If anyone’s curious: it seems that rs.SurfaceVolumeCentroid doesn’t work when I set the type suggestion to Box, but it does when I set the type suggestion to Brep. Who knew.

The rhinoscriptsyntax functions generally operate on GUIDs. So setting your typehint to ghdoc Object when geometry should solve things for you. Also you had a bug with AllSupports.append[RowList], it should be AllSupports.append(RowList).

Here’s quick fix in Rhino 5 (i.e. with no treehelpers):