Skip to main content

CreateNewHistoryPoint

Creates a new history point.

Syntax

expression.CreateNewHistoryPoint();

expression - A variable that represents a ApiPresentation class.

Parameters

This method doesn't have any parameters.

Returns

This method doesn't return any data.

Example

This example creates a new history point.

// How to add a new history point to the presentation.

// Create a presentation history point.

const presentation = Api.GetPresentation();
const slide = presentation.GetSlideByIndex(0);
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);

const docContent = shape.GetDocContent();
let paragraph = docContent.GetElement(0);
paragraph.AddText("This is just a sample text.");
presentation.CreateNewHistoryPoint();
paragraph = Api.CreateParagraph();
paragraph.AddText("New history point was just created.");
docContent.Push(paragraph);
slide.AddObject(shape);