Returns all of the group names that an object is assigned.
rhinoscriptsyntax.ObjectGroups (object_id)
rhinoscript.object.ObjectGroups (object_id)
object_id |
Required. String or Guid. The identifier of the object. |
List |
A list of all group names for the object if successful. |
import rhinoscriptsyntax as rs
obj = rs.GetObject("Select object")
if obj:
groups = rs.ObjectGroups(obj)
if groups:
for group in groups: print "Object group: ", group
else:
print "No groups."