Skip to main content

GetClassType

Returns a type of the ApiTextAnnotation class.

Syntax

expression.GetClassType();

expression - A variable that represents a ApiTextAnnotation class.

Parameters

This method doesn't have any parameters.

Returns

"textAnnot"

Example

This example gets class type of text annotation.

let doc = Api.GetDocument();
let textAnnot = Api.CreateTextAnnot([10, 10, 20, 20]);
let classType = textAnnot.GetClassType();
textAnnot.SetContents(classType);
let page = doc.GetPage(0);
page.AddObject(textAnnot);
console.log(`Annot class type is: ${classType}`);