Create SmartArt in PowerPoint Presentations using C++

SmartArt is used to enhance the experience of PowerPoint presentations and to present data visually. It can be used to make the text more prominent and appealing and also be used to show flow diagrams, processes, relational charts, etc. In this article, you will learn how to create SmartArt in PowerPoint presentations using C++.

C++ API for Creating SmartArt In PowerPoint Presentations

Aspose.Slides for C++ is a C++ API for working with PowerPoint files. It enables you to create, read and modify PPT and PPTX files without needing additional software. Furthermore, the API supports creating SmartArt in PowerPoint presentations. You can either install the API through NuGet or download it directly from the Downloads section.

PM> Install-Package Aspose.Slides.Cpp

Create a SmartArt Shape in PowerPoint using C++

The following are the steps to create a SmartArt shape in PowerPoint presentations.

The following sample code shows how to create a SmartArt shape in PowerPoint using C++.

Create SmartArt in PowerPoint Presentations using C++
Image of the output generated by the sample code

Access a SmartArt Shape in PowerPoint Presentation

You can access the SmartArt shapes in PowerPoint files by following the steps given below.

  • Load the PowerPoint file using the Presentation class.
  • Loop through the shapes.
  • If the shape is of type ISmartArt, then get its reference as an ISmartArt object.

The following sample code shows how to access a SmartArt shape from a PowerPoint presentation using C++.

Change the Style of a SmartArt Shape using C++

You can easily change the style of the SmartArt shape after accessing it. The following are the steps to change the style of a SmartArt shape using C++.

The following sample code shows how to change the style of a SmartArt shape using C++.

Get a Free License

In order to try the API without evaluation limitations, you can request a free temporary license.

Conclusion

In this article, you have learned how to create a SmartArt shape in PowerPoint presentations using C++. Furthermore, you have seen how to access and change the style of a SmartArt shape using Aspose.Slides for C++ API. It is a robust and feature-rich API that provides many additional features for working with PowerPoint files. You can explore the API in detail by visiting the official documentation. In case of any queries, please feel free to reach us at our free support forum.

See Also