# Working with groups

To perform operations with groups:

In the main menu select New entity > Groups.

Create a group

Description: Creates a group of subshapes of a geometrical object.

Result: GEOM_Object.

TUI Command: geompy.CreateGroup(MainShape, ShapeType), where MainShape is a shape for which the group is created, ShapeType is a type of shapes in the created group.

Arguments: 1 Shape + Type of subshape.

Dialog Box:

Example:

Edit a group

Description: Allows to edit the existing group.

Result: GEOM_Object.

TUI Command:

- geompy.AddObject(Group, SubShapeID), where Group is a group to which a sub shape has to be added, SubShapeID is an ID of the sub shape to be added to the group

- geompy.RemoveObject(Group, SubShapeID), where Group is a group from which a sub shape has to be removed, SubShapeID is an ID of the sub shape to be removed from the group

- geompy.GetObjectIDs(Group), where Group is a group for which its object ID’s are returned.

Returns: List of IDs.

Arguments: 1 Shape + its subshapes.

Dialog Box: