GetClassType
Returns a type of the ApiCore class.
Syntax
expression.GetClassType();
expression - A variable that represents a ApiCore class.
Parameters
This method doesn't have any parameters.
Returns
"core"
Example
This example gets a class type and pastes it into the presentation.
- Code
- Result
const presentation = Api.GetPresentation();
const core = presentation.GetCore();
const classType = core.GetClassType();
const fill = Api.CreateSolidFill(Api.CreateRGBColor(150, 200, 150));
const stroke = Api.CreateStroke(0, Api.CreateNoFill());
const shape = Api.CreateShape('rect', 300 * 36000, 100 * 36000, fill, stroke);
shape.SetPosition(0, 2 * 36000);
const docContent = shape.GetDocContent();
const paragraph = docContent.GetElement(0);
paragraph.AddText("Class type: " + classType);
const slide = presentation.GetSlideByIndex(0);
slide.RemoveAllObjects();
slide.AddObject(shape);