跳到主要内容

GetClassType

Returns a type of the ApiCustomProperties class.

Syntax

expression.GetClassType();

expression - A variable that represents a ApiCustomProperties class.

Parameters

This method doesn't have any parameters.

Returns

"customProperties"

Example

This example demonstrates how to get the class type of ApiCustomProperties.

const worksheet = Api.GetActiveSheet();
const customProps = Api.GetCustomProperties();
const classType = customProps.GetClassType();

let fill = Api.CreateSolidFill(Api.CreateRGBColor(0, 100, 200));
let stroke = Api.CreateStroke(0, Api.CreateNoFill());
const shape = worksheet.AddShape("rect", 100 * 36000, 50 * 36000, fill, stroke, 0, 0, 5, 0);

let paragraph = shape.GetDocContent().GetElement(0);
paragraph.AddText("ApiCustomProperties class type: " + classType);