GetCurrentSlide
Returns the current slide.
Syntax
expression.GetCurrentSlide();
expression
- A variable that represents a ApiPresentation class.
Parameters
This method doesn't have any parameters.
Returns
Example
This example shows how to get the current slide.
- Code
- Result
// How to get a current slide as an object.
// Get current working slide and update its content.
const presentation = Api.GetPresentation();
const slide = presentation.GetCurrentSlide();
slide.RemoveAllObjects();
const fill = Api.CreateSolidFill(Api.CreateRGBColor(255, 111, 61));
const stroke = Api.CreateStroke(0, Api.CreateNoFill());
const shape = Api.CreateShape("flowChartMagneticTape", 300 * 36000, 130 * 36000, fill, stroke);
shape.SetPosition(608400, 1267200);
slide.AddObject(shape);