Delete Shapes from a Group Shape

Introduction

This article shows you how to delete shapes from a group shape using Aspose.Slides Cloud API in your applications. DeleteShape method has an optional subShape parameter that allows to specify path to the sub-shape to be deleted. The sub-shape path is a string that contains shape index (e.g., “1”) or a path in case of more than one level of grouping (e.g. “1/shapes/1”).

Examples

The second slide in MyFolder/MyPresentation.pptx document contains a single shape. The shape is a group shape consisting of four shapes. Delete the third shape from the group.

cURL Solution

SDK Solutions

DeleteShapes

API Information

API Type Description Resource
/slides/{name}/slides/{slideIndex}/shapes DELETE Deletes shapes. DeleteShapes

Request Parameters

Name Type Location Required Description
name string path true The name of a presentation file.
slideIndex integer path true The 1-based index of the slide with the group shape.
shapes string query false The indices of the shapes to be deleted. Delete all by default.
password string header false The password to open the presentation.
folder string query false The path to the folder containing the presentation.
storage string query false The name of the storage contaning the folder.
subShape string query false Sub-shape path (e.g. “3”, “3/shapes/2)

In case of Amazon S3 storage folder path starts with Amazon S3 bucket name.

Examples

The second slide in MyFolder/MyPresentation.pptx document contains a single shape. The shape is a group shape consisting of four shapes. Delete the first and third shapes from the group.

cURL Solution

SDK Solutions

SDKs

Using an SDK (API client) is the quickest way for a developer to speed up development. An SDK takes care of a lot of low-level details of making requests and handling responses and lets you focus on writing code specific to your particular project. Check out our GitHub repository for a complete list of Aspose.Slides Cloud SDKs along with working examples, to get you started in no time. Please check Available SDKs article to learn how to add an SDK to your project.