---
Product: Aspose.Slides
Platform: python
Page Type: reference
Canonical URL: https://reference.aspose.org/slides/python/ShapeCollection
---

# ShapeCollection

## Overview

`ShapeCollection` is a class in Aspose.Slides FOSS for Python.
Inherits from: `BaseCollection`, `IShapeCollection`.

Represents a collection of shapes.

This class provides 18 methods for working with ShapeCollection objects in Python programs.
Available methods include: `__init__`, `add_auto_shape`, `add_chart`, `add_connector`, `add_group_shape`, `add_picture_frame`, `add_table`, `clear`, `index_of`, `insert_auto_shape`, `insert_chart`, `insert_connector`, and 6 additional methods.
All public members are accessible to any Python application after installing the Aspose.Slides FOSS for Python package.
Properties: `as_i_collection`, `as_i_enumerable`, `length`, `parent_group`.

## Properties

| Name | Type | Access | Description |
|------|------|--------|-------------|
| `parent_group` | `IGroupShape` | Read | Gets the parent group shape object for the shapes collection. |
| `as_i_collection` | `list` | Read | Gets the as i collection. |
| `as_i_enumerable` | `Any` | Read | Gets the as i enumerable. |
| `length` | `int` | Read | Returns the number of elements. |

## Methods

| Signature | Description |
|-----------|-------------|
| `__init__()` | Initialize an empty shape collection. |
| `to_array()` → `list[IShape]` | Convert the collection to an array. |
| `reorder()` | Reorder shapes in the collection. |
| `add_auto_shape()` → `IAutoShape` | Adds a new IAutoShape to the collection |
| `insert_auto_shape()` → `IAutoShape` | Inserts a new IAutoShape at a specific position |
| `add_connector()` → `IConnector` | Adds a new IConnector shape to the collection |
| `insert_connector()` → `IConnector` | Inserts a new IConnector at a given index |
| `add_group_shape()` → `IGroupShape` | Add a new GroupShape to the collection. |
| `index_of(shape: IShape)` → `int` | Return the zero-based index of the specified shape. |
| `add_picture_frame(shape_type, x, y, width, height, image)` → `IPictureFrame` | Adds an IPictureFrame with given type, position, size, and image |
| `insert_picture_frame(index, shape_type, x, y, width, height, image)` → `IPictureFrame` | Inserts an IPictureFrame at index with given parameters |
| `add_chart()` | Add a chart to the slide. |
| `insert_chart()` | Insert a chart at a specific index. |
| `add_table(x, y, column_widths, row_heights)` → `ITable` | Adds an ITable at position with column widths and row heights |
| `insert_table(index, x, y, column_widths, row_heights)` → `ITable` | Inserts an ITable at index with position and dimensions |
| `remove_at(index: int)` | Remove the shape at the specified index. |
| `remove(shape: IShape)` | Remove the specified shape from the collection. |
| `clear()` | Remove all shapes from the collection. |

## See Also

- [Aspose.Slides — Enterprise API Reference](https://reference.aspose.com/slides/)