AddSmartArt

ShapeCollection.AddSmartArt method

Add SmartArt diagram.

public ISmartArt AddSmartArt(float x, float y, float width, float height, 
    SmartArtLayoutType layoutType)
ParameterTypeDescription
xSingleThe X-coordinate for a left side of diagram’s frame.
ySingleThe Y-coordinate for a left side of diagram’s frame.
widthSingleThe width of diagram’s frame.
heightSingleThe height of diagram’s frame.
layoutTypeSmartArtLayoutTypeThe type of SmartArt diagram

Return Value

Create SmartArt diagram

Examples

The following example shows how to add smart shape in PowerPoint Presentation.

[C#]
using (Presentation pres = new Presentation())
{
	Slide slide = pres.Slides[0];
	SmartArt smart = slide.Shapes.AddSmartArt(0, 0, 400, 400, SmartArtLayoutType.BasicBlockList);
}

See Also