GetDrawingsByPlaceholderType
Returns an array of drawings by the specified placeholder type.
Syntax
expression.GetDrawingsByPlaceholderType(sType);
expression - A variable that represents a ApiLayout class.
Parameters
| Name | Required/Optional | Data type | Default | Description |
|---|---|---|---|---|
| sType | Required | PlaceholderType | The placeholder type. |
Returns
Drawing[]
Example
Get drawings by placeholder type and remove it from layout in a presentation.
// How to get all drawings as an array by indicating placeholder type in a presentation.
// Get drawings by their placeholder type in a presentation.
const presentation = Api.GetPresentation();
const master = presentation.GetMaster(0);
const layout = master.GetLayout(0);
let drawingsWithPh = layout.GetDrawingsByPlaceholderType("ctrTitle");
for (let i = 0; i < drawingsWithPh.length; i++) {
drawingsWithPh[i].Delete();
}