Retrieving Alternative Text

Hi - I am wondering if there is a way to set the text of a shape without looping through every shape in a slide. I have a very detailed slide with over 500 shapes on it (lines, textboxes, checkboxes, etc) and it is very slow for me to loop through all the shapes to find the corresponding ones that have dynamic data.

Currently I use the technique recommended by you…

for(int i=0; i < slide.getShapes().size(); i++)
{
shape = (Shape)slide.getShapes().get_Item(i);

if(shape.getAlternativeText().equals(“Username”))
((IAutoShape)shape).getTextFrame().setText(“this is the user name”);
}

But if I have many shapes and ‘if’ statements for each shape that will be very slow.

I just want to pick out the shapes and populate them with data.

Hi John,


Thank you for your growing interest in Aspose.Slides.

I have observed your comments and like to share with you that Alternative Text is the only property using which you can differentiate between shapes and then manipulate them accordingly.

Please share if I may help you further in this regard.

Best Regards,