getIndexOf
Short summary
This method returns ths index of the first object for which isEqual matches.
Return: SingleExecutionResult.SUCCESS: object found
SingleExecutionResult.ERROR: object couldn't be found in the list, index is undefined
- Return type: CNM_ReturnTypes.SingleExecutionResult
Parameters
| Name | Type | Comment | Kind |
|---|---|---|---|
| object | CNM_AbstractObject.IObject | the object to get the index from | input |
| index | UDINT | the index of the object inside the collection | output |
Code
Declaration
METHOD getIndexOf :CNM_ReturnTypes.SingleExecutionResult
VAR_INPUT
(*the object to get the index from*)
object :CNM_AbstractObject.IObject;
END_VAR
VAR_OUTPUT
(*the index of the object inside the collection*)
index :UDINT;
END_VAR