Get

def Get(self, key);

Returns an array value by its index.

Please note, that for the .docbuilder file the CDocBuilderValue.Get method is not used.

Parameters

NameTypeDescription
keyintThe index of the array value.

Example

Python

builder = docbuilder.CDocBuilder()
context = builder.GetContext()
globalObj = context.GetGlobal()
api = globalObj["Api"]
document = api.Call("GetDocument")
charts = document.Call("GetAllCharts")
chart = charts.Get(1);

The default[] postfix expression can be also used to get an array value by its index:

property CDocBuilderValue default[int]

Example

Python

builder = docbuilder.CDocBuilder()
context = builder.GetContext()
globalObj = context.GetGlobal()
api = globalObj["Api"]
document = api.Call("GetDocument")
charts = document.Call("GetAllCharts")
chart = charts[1];

Get Help

  • If you have any questions about ONLYOFFICE Docs, try the FAQ section first.
  • You can request a feature or report a bug by posting an issue on GitHub.
  • You can also ask our developers on ONLYOFFICE forum (registration required).