Skip to main content

GetDrawingsByPlaceholderType

Returns an array of drawings by the specified placeholder type.

Syntax

expression.GetDrawingsByPlaceholderType(sType);

expression - A variable that represents a ApiMaster class.

Parameters

NameRequired/OptionalData typeDefaultDescription
sTypeRequiredPlaceholderTypeThe placeholder type.

Returns

Drawing[]

Example

Get all drawings by placeholder type from a slide master.

// Retrieve drawings using GetDrawingsByPlaceholderType, specifying the placeholder type.

// Delete all drawings with the specified placeholder type from the 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();
}