Skip to main content

GetClassType

Returns the type of the ApiNotesPage class.

Syntax​

expression.GetClassType();

expression - A variable that represents an ApiNotesPage class.

Parameters​

This method doesn't have any parameters.

Returns​

"notesPage"

Example​

Identify the type of the notes page object in a presentation.

// How do I determine the class type of the notes page in a presentation?

// Retrieve and display the class type of the slide notes in a presentation.

const presentation = Api.GetPresentation();
const slide = presentation.GetSlideByIndex(0);
slide.RemoveAllObjects();

const notesPage = slide.GetNotesPage();
const classType = notesPage.GetClassType();

const fill = Api.CreateSolidFill(Api.CreateRGBColor(100, 150, 200));
const stroke = Api.CreateStroke(0, Api.CreateNoFill());
const shape = Api.CreateShape('rect', 300 * 36000, 100 * 36000, fill, stroke);
shape.SetPosition(0, 30 * 36000);
slide.AddObject(shape);

const paragraph = shape.GetContent().GetElement(0);
paragraph.AddText('Class type of ApiNotesPage: ' + classType);