AddObjectsToGroup

Adds one or more objects to an existing group.

Syntax

rhinoscriptsyntax.AddObjectsToGroup (object_ids, group_name)

rhinoscript.group.AddObjectsToGroup (object_ids, group_name)

Parameters

object_ids

Required.  List.  An array of object identifiers.

group_name

Required.  String.  The name of an existing group.

Returns

Number

The number of objects added to the group if successful.

None

If not successful, or on error.

Example

import rhinoscriptsyntax as rs

name = "NewGroup"

object_ids = rs.GetObjects("Select objects to add to group")

if object_ids: rs.AddObjectsToGroup(object_ids, name)

Also See

AddObjectToGroup

IsGroupEmpty

ObjectGroups

ObjectsByGroup