Get
def Get(self, key: int)
Description
Returns an array value by its index.
Please note, that for the
.docbuilder
file theCDocBuilderValue.Get
method is not used.
Parameters
- key
int
- The 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];