IsObjectInGroup

Verifies that an object is a member of a specified group.

Syntax

rhinoscriptsyntax.IsObjectInGroup ( object_id, group_name=None )

rhinoscript.object.IsObjectInGroup ( object_id, group_name=None )

Parameters

object_id

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

group_name

Optional.  String.  The name of a group.  If omitted, the function verifies that the object is a member of any group.

Returns

True

The object is a member of the specified group.  If a group_name was not specified, the object is a member of some group.

False

The object is not a member of the specified group.  If a group_name was not specified, the object is not a member of any group.

Example

import rhinoscriptsyntax as rs

id = rs.GetObject("Select object")

if id:

    name = rs.GetString("Group name")

    if name:

        result = rs.IsObjectInGroup(id, name)

        if result:

            print "The object belongs to the group."

        else:

            print "The object does not belong to the group."

Also See

IsObject

IsObjectHidden

IsObjectLocked

IsObjectNormal

IsObjectReference

IsObjectSelectable

IsObjectSelected

IsObjectSolid