Skip to main content

GetCategory

Returns the document category.

Syntax

expression.GetCategory();

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 category of the document using the ApiCore.

const doc = Api.GetDocument();
const core = doc.GetCore();
core.SetCategory("Examples");

const category = core.GetCategory();
let paragraph = doc.GetElement(0);
paragraph.AddText("Category: " + category);