SetElementByIndex
function SetElementByIndex(ctx: TcHmi.SelectableRequired<TcHmi.Context, 'success' | 'error'>, arraySymbol: TcHmi.Symbol<any[]> | null, arrayIndex: number | null, value: any): voidThe function SetElementByIndex sets the value of a certain array index in a binding.
Parameter
|
Name |
Type |
Description |
|---|---|---|
|
ctx |
Context object Does not need to be specified by the user when it is used in a trigger or function expression. In this case the transfer and the evaluation is done by the corresponding parser. Is used by the caller to indicate success or failure to the framework during execution. If the function is used directly in JavaScript/TypeScript, the context object must be passed in the call and evaluated if necessary. | |
|
arraySymbol |
A binding to the symbol of an array. | |
|
index |
The index of the array for which the value is to be set. | |
|
value |
The value to be written in the position of the array. |
Return value
|
Type |
Description |
|---|---|
|
void |
No return value. |
NuGet package: Beckhoff.TwinCAT.HMI.Functions
![]() | NuGet packages are available from version 1.12. |
![]() | Available from 1.8 |
