Hi,
I’m trying to do something pretty simple - creating a group from all objects in a layer.
This is my script:
import rhinoscriptsyntax as rs
layers = rs.LayerNames()
if layers:
for layer in layers:
thisObjSet = rs.ObjectsByLayer(layer)
if thisObjSet:
name = str(layer)
ng = rs.AddObjectsToGroup(thisObjSet, name)
if ng:
print "Grouped " + name
There doesn’t seem to be a ‘createGroup’ function that I can find, and the help in the docs for the command seems to suggest using a unused name should do.
When I run this script, it steps through but the rs.AddObjectsToGroup(thisObjSet, name)
call fails.
Any ideas about what I’m doing wrong?
thanks
Peter