AddSmartArt

ShapeCollection.AddSmartArt-Methode

Fügen Sie ein SmartArt-Diagramm hinzu.

public ISmartArt AddSmartArt(float x, float y, float width, float height, 
    SmartArtLayoutType layoutType)
ParameterTypBeschreibung
xSingleDie X-Koordinate für die linke Seite des Diagrammrahmens.
ySingleDie Y-Koordinate für die linke Seite des Diagrammrahmens.
widthSingleDie Breite des Diagrammrahmens.
heightSingleDie Höhe des Diagrammrahmens.
layoutTypeSmartArtLayoutTypeDer Typ des SmartArt-Diagramms

Rückgabewert

Erstellt ein SmartArt-Diagramm

Beispiele

Das folgende Beispiel zeigt, wie man eine smarte Form in einer PowerPoint-Präsentation hinzufügt.

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

Siehe auch