跳到主要内容

CreateNewHistoryPoint

Creates a new history point.

Syntax

expression.CreateNewHistoryPoint();

expression - A variable that represents a ApiDocument 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.

let doc = Api.GetDocument();
let paragraph = doc.GetElement(0);
paragraph.AddText("This is a sample text.");
doc.CreateNewHistoryPoint();
paragraph = Api.CreateParagraph();
paragraph.AddText("New history point was just created.");
doc.Push(paragraph);