AddSmartArt

ShapeCollection.AddSmartArt method

Creates a SmartArt diagram and adds it to the end of the shape collection.

public ISmartArt AddSmartArt(float x, float y, float width, float height, 
    SmartArtLayoutType layoutType)
ParameterTypeDescription
xSingleThe x-coordinate of the diagram’s frame, in points.
ySingleThe y-coordinate of the diagram’s frame, in points.
widthSingleThe width of the diagram’s frame, in points.
heightSingleThe height of the diagram’s frame, in points.
layoutTypeSmartArtLayoutTypeThe SmartArt layout type.

Return Value

The newly created ISmartArt.

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