Well, at the moment, adding a new group shape is not supported by Aspose.Slides for .NET. However, you may add a new shape to an existing group shape. As a work around, you can use a template slide with group shape and then add your shape to that group shape. You may check and see if the below code helps in implementing your requirement.
// Instantiate PresentationEx class that represents PPTX
PresentationEx presentation = new PresentationEx("D:\\data\\input.pptx");
// Access first slide
SlideEx slide = presentation.Slides[0];
foreach (ShapeEx shape in slide.Shapes)
{
if (shape.GetType() == typeof(GroupShapeEx))
{
//Getting group shapes
GroupShapeEx gShape = (GroupShapeEx)shape;
//Adding new Autoshape to existing group shape
gShape.Shapes.AddAutoShape(ShapeTypeEx.Rectangle, 300, 200, 100, 100);
}
}
// Write the PPTX to Disk
presentation.Write("D:\\data\\GroupShape.pptx");
I like to share that the support for adding group shape from scratch is unavailable in Aspose.Slides at present. Owais, has shared the possible work around with you in terms of adding group shape with you. An issue with ID SLIDESNET-19279 has already been created in our issue tracking system to provide the requested support. This thread has been linked with the issue so that you may be automatically notifeid once the feature will be available.