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
Example
This example gets drawings by placeholder type and removes it from layout
let oPresentation = Api.GetPresentation();
let oSlide = oPresentation.GetSlideByIndex(0);
let oMaster = oPresentation.GetMaster(0);
let oLayout = oMaster.GetLayout(0);
let aDrawingsWithPh = oLayout.GetDrawingsByPlaceholderType("ctrTitle");
for (let i = 0; i < aDrawingsWithPh.length; i++) {
aDrawingsWithPh[i].Delete();
}