Adding SmartArt shape in Python
Contents
[
Hide
]
Aspose.Slides - Adding SmartArt shape
To Add SmartArt shape document using Aspose.Slides Java for Python. Here you can see example code.
Python Code
# Create an instance of Presentation class
pres = self.Presentation()
\# Get the first slide
slide = pres.getSlides().get_Item(0)
\# Add Smart Art Shape
smartArtLayoutType = self.SmartArtLayoutType
smart = slide.getShapes().addSmartArt(0, 0, 400, 400, smartArtLayoutType.BasicBlockList)
\# Write the presentation as a PPTX file
saveFormat = self.SaveFormat
pres.save(self.dataDir + "SimpleSmartArt.pptx", saveFormat.Pptx)
print "Created smartart shape, please check the output file."
Download Running Code
Download running code from any of the below mentioned social coding sites: