add method
add
Adds a new layout slide to the presentation.
Returns
Added slide.
def add(self, master, layout_type, layout_name):
...
Parameter | Type | Description |
---|---|---|
master | IMasterSlide | Master slide for a new layout. |
layout_type | SlideLayoutType | Layout type for a new layout. Supported layout types: Title, TitleOnly, Blank, TitleAndObject, VerticalText, VerticalTitleAndText, TwoObjects, SectionHeader, TwoTextAndTwoObjects, TitleObjectAndCaption, PictureAndCaption, Custom. Other layout types are not supported now: Text, TwoColumnText, Table, TextAndChart, ChartAndText, Diagram, Chart, TextAndClipArt, ClipArtAndText, TextAndObject, ObjectAndText, Object, TextAndMedia, MediaAndText, ObjectOverText, TextOverObject, TextAndTwoObjects, TwoObjectsAndText, TwoObjectsOverText, FourObjects, ClipArtAndVerticalText, VerticalTitleAndTextOverChart, ObjectAndTwoObject, TwoObjectsAndObject. |
layout_name | str | Name for a new layout. If passed name is already in use the ArgumentException will be thrown. If null parameter is passed then name genarated atomatically in regards to passed layout type (for example “Title Slide” or “1_Title Slide”, “2_..”, etc.). |
Remarks
Added layout for value SlideLayoutType.Custom of
layout_type
contains no placeholders and no shapes. 2) Analogue of this method is method **Aspose.Slides.IMasterLayoutSlideCollection.Add(Aspose.Slides.SlideLayoutType,Syste** accessed with [`IMasterSlide.layout_slides`](/slides/python-net/aspose.slides/imasterslide#layout_slides) property.
Exceptions
Exception | Description |
---|---|
RuntimeError(Proxy error(NotImplementedException)) | Thrown if unsupported value of parameter <br/>layout_type is passed. Layout types that are not supported now: Text, TwoColumnText, Table, TextAndChart, ChartAndText, Diagram, Chart, TextAndClipArt, ClipArtAndText, TextAndObject, ObjectAndText, Object, TextAndMedia, MediaAndText, ObjectOverText, TextOverObject, TextAndTwoObjects, TwoObjectsAndText, TwoObjectsOverText, FourObjects, ClipArtAndVerticalText, VerticalTitleAndTextOverChart, ObjectAndTwoObject, TwoObjectsAndObject. |
RuntimeError(Proxy error(ArgumentNullException)) | Thrown if <br/>master is null. |
RuntimeError(Proxy error(ArgumentException)) | Thrown if <br/>master belongs to the other presentation. |
RuntimeError(Proxy error(ArgumentException)) | Thrown if layout name value <br/>layout_name is already in use in collection of the layouts of <br/>master . |
See Also
- class
GlobalLayoutSlideCollection
- class
ILayoutSlide
- class
IMasterSlide
- enumeration
SlideLayoutType
- module
aspose.slides
- library
Aspose.Slides