跳到主要内容

GetClassType

返回 ApiSection 类的类型。

语法

expression.GetClassType();

expression - 表示 ApiSection 类的变量。

参数

此方法没有任何参数。

返回值

"section"

示例

获取文档中节的类类型。

// How to identify the class type of a section in a document?

// Obtain the class type identifier of a section object in a document.

let doc = Api.GetDocument();
let paragraph = doc.GetElement(0);
let section = doc.GetFinalSection();
section.SetPageMargins(720, 720, 720, 720);
section.SetPageSize(7200, 4320);
let classType = section.GetClassType();
paragraph.AddText("Class Type = " + classType);