跳到主要内容

GetLength

如果 CDocBuilderValue 对象是数组/类型化数组,则返回长度。否则返回 0。

备注

此方法不适用于 JS。

语法​

def GetLength(self) -> int

参数​

此方法没有参数。

示例​

builder = docbuilder.CDocBuilder()
context = builder.GetContext()
globalObj = context.GetGlobal()
api = globalObj["Api"]
document = api.GetDocument()
charts = document.GetAllCharts()
length = charts.GetLength()