ObjectGroups

Returns all of the group names that an object is assigned.

Syntax

rhinoscriptsyntax.ObjectGroups (object_id)

rhinoscript.object.ObjectGroups (object_id)

Parameters

object_id

Required.  String or Guid.  The identifier of the object.

Returns

List

A list of all group names for the object if successful.

Example

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."

Also See

ObjectsByGroup

ObjectTopGroup