Add a Shape to a Group Shape


This article shows you how to create a shape and immediately add it to a shape group in a PowerPoint presentation using Aspose.Slides for Cloud API in your applications. CreateShape method has an optional subShape parameter that allows to specify path to the shape that will be the parent for the new shape. 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”). You should pass a data transfer object for the new shape to the method parameters or specify an index of the shape that you want to clone.


The first slide in MyFolder/MyPresentation.pptx document contains three shapes. The last shape is a shape group containing five shapes. Add a square with default style at coordinates (20, 20) and size 100x100 to the shape group.

cURL Solution

SDK Solutions


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.