Spire.Presentation is a professional PowerPoint® compatible library that enables developers to create, read, write, modify, convert and Print PowerPoint documents. Get free and professional technical support for Spire.Presentation for .NET, Java, Android, C++, Python.

Thu May 09, 2019 4:47 am

Hi,

How to name a GroupShape?
I would like to name the GroupShape, please.
Thanks.

Here's my code:
Code: Select all
     ArrayList list = new ArrayList();
     IAutoShape shp = this.ppt.Slides[0].Shapes.AppendShape(ShapeType.Ellipse, new RectangleF(convCM2Points(0.9f) + pos, convCM2Points(6.9f), convCM2Points(0.7f), convCM2Points(0.8f)));
     shp.Name = "circTLE_W" + item.Value.semana;
     shp.TextFrame.Text = Math.Round(item.Value.tle,0).ToString();
     ......  // Others setting
     list.add(shp);

     shp = this.ppt.Slides[0].Shapes.AppendShape(ShapeType.Ellipse, new RectangleF(convCM2Points(0.9f) + pos, convCM2Points(6.9f), convCM2Points(0.7f), convCM2Points(0.8f)));
     shp.Name = "circTLE_W" + item.Value.semana;
     shp.TextFrame.Text = Math.Round(item.Value.tle,0).ToString();
     ......  // Others setting
     list.add(shp);

     txtTitulo1 = this.ppt.Slides[0].Shapes.AppendShape(ShapeType.Ellipse, new RectangleF(convCM2Points(0.9f) + pos, convCM2Points(6.9f), convCM2Points(0.7f), convCM2Points(0.8f)));
     txtTitulo1.Name = "txtSHR_W" + item.Value.semana;
     txtTitulo1.TextFrame.Text = Math.Round(item.Value.shr,0).ToString() +"%";
     ......  // Others setting
     list.add(shp);

     this.ppt.Slides[0].GroupShape(list);


psoares
 
Posts: 3
Joined: Wed Nov 21, 2018 2:45 am

Thu May 09, 2019 8:30 am

Hello,

Thanks for your inquiry.
Please refer to the following code snippet to name the GroupShape. If there is any question, just feel free to write back.
Code: Select all
......
this.ppt.Slides[0].GroupShape(list);
GroupShape groupSahpe = (GroupShape)this.ppt.Slides[0].Shapes[0];
groupSahpe.Name = "sample";

Sincerely,
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1271
Joined: Wed Apr 25, 2018 3:20 am

Thu May 16, 2019 9:47 am

Hello,

Greetings from E-icbelue.
Did the code work for you? Any feedback will be highly appreciated. Thanks in advance.

Sincerely,
Lisa
E-iceblue support team
User avatar

Lisa.Li
 
Posts: 1271
Joined: Wed Apr 25, 2018 3:20 am

Return to Spire.Presentation