AddSmartArt

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

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