跳到主要内容

GetVersion

Returns the document version.

Syntax

expression.GetVersion();

expression - A variable that represents a ApiCore class.

Parameters

This method doesn't have any parameters.

Returns

string

Example

This example demonstrates how to get the version of the current document.

const doc = Api.GetDocument();
const core = doc.GetCore();
core.SetVersion("v9.0");

const version = core.GetVersion();
let paragraph = doc.GetElement(0);
paragraph.AddText("Version: " + version);