AddSmartArt

IShapeCollection.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

Example:

[C#]
Presentation pres = new Presentation();
Slide slide = pres.Slides[0];
SmartArt smart = slide.Shapes.AddSmartArt(0, 0, 400, 400, SmartArtLayoutType.BasicBlockList);
[Visual Basic]
Private pres As New Presentation()
Private slide As Slide = pres.Slides(0)
Private smart As SmartArt = slide.Shapes.AddSmartArt(0, 0, 400, 400, SmartArtLayoutType.BasicBlockList)

See Also