GetDrawingsByPlaceholderType
Returns an array of drawings by the specified placeholder type.
Syntax
expression.GetDrawingsByPlaceholderType(sType);
expression
- A variable that represents a ApiMaster class.
Parameters
Name | Required/Optional | Data type | Default | Description |
---|---|---|---|---|
sType | Required | PlaceholderType | The placeholder type. |
Returns
Drawing[]
Example
This example gets drawings by placeholder type and removes it from slide master.
- Code
- Result
// How to get all drawings as an array by indicating placeholder type from a master.
// Get drawings by their placeholder type knowing a slide master.
const presentation = Api.GetPresentation();
const slide = presentation.GetSlideByIndex(0);
const master = presentation.GetMaster(0);
const aDrawingsWithPh = master.GetDrawingsByPlaceholderType("title");
for (let i = 0; i < aDrawingsWithPh.length; i++) {
aDrawingsWithPh[i].Delete();
}