Iterate shapes inside SmartArt object

Hi. I searched on forum, but no results. The text annotations logic in our solution working only with AutoShape objects.

The first version of our solution working only with separated shapes, which we coverterted to AutoShape. Next step was support GrupedShape object, whick contains collection of Shapes. But in Power Point possible one more variant - SmartArt object.

I found article: Manage SmartArt|Aspose.Slides Documentation
But this option does not suit us, because 100% logic working only with AutoShape object.

Is there any possibility working with SmartArt Node object like as with AutoShape object?


I have observed your requirements and like to share that you can access the nodes inside SmartArt shape using Aspose.Slides. I suggest you to please visit this documentation link to serve the purpose on your end. Please share if I may help you further in this regard.

Yes, we can. But the project working only with AutoShape objects. For example, if shapes grouped (Aspose.Slides.GroupedShape object) than we iterate every shape in GroupedShape, by converting it to AutoShape.

The problem is obvious - we just need solution to convert SmartArt item (node) to AutoShape object. Otherwise, we must write a lot of code just for special support SmartArt object. It makes no sense.

Are you understand my idea? Other example - we have code, that works only with AutoShape object. So, we don’t care, how shapes looks like - it’s single shape, or list of shapes in GroupedShape object . We equally processing their by converting to AutoShape object at first.

But if shapes in SmartArt object, I don’t know how to convert it to AutoShape’s.

If you want, question would be: how convert SmartArt node to AutoShape? It’s possible? If not, how convert SmartArt object to GroupedShape object? In Power Point it’s possible to do by transfrom SmartArt to Grouped object.


I have observed your following requirements.

I regret to share that there is no option to typecast SmartArt to a group shape or Autoshape. The same applies to nodes of SmartArt. These are internally different shapes with different specifications. All shapes are inherited from Shape class although that contains the minimally common features of all shapes. On detailed level every shape type has its owing properties and they varies. There is no smart conversion available from transforming one shape to another. You have to do it programmatically your self. This is neither a limitation nor a missing feature in API. You have mentioned that in case of PowerPoint this is possible to transform SmartArt to Group object. Internally, PowerPoint would be doing the similar thing as I have shared.

We investigate this question, and want to ask next, does it possible to change SmartArt text? I’am found only how to get text from SmarArt:

We try change text programmaticaly, but after file save, no results. Feels like TextFrame from SmarArt readonly.


I have worked over your requirements and have been able to observe the issue while updating SmartArt node text. An issue with ID SLIDESNET-40699 has been created in our issue tracking system to investigate and resolve the issue. This thread has been linked with the issue so that you may be notified once the issue will be fixed.

The issues you have found earlier (filed as SLIDESNET-40699) have been fixed in this update.