F_VN_SortContainerExp

F_VN_SortContainerExp 1:

Sort container elements. (expert function)

Syntax

Definition:

FUNCTION F_VN_SortContainer: HRESULT
VAR_INPUT
ipContainer:    ITcVnContainer;
nSortByElemIdx: UINT;
eComparisonOp:  ETcVnComparisonOperator;
nFirstIdx:      ULINT;
nLastIdx:       ULINT;
hrPrev:         HRESULT
END_VAR

F_VN_SortContainerExp 2: Inputs

Name

Type

Description

ipContainer

ITcVnContainer

Container to sort (only basic arithmetic, TcVnPoint and TcVnVector containers are supported).

nSortByElemIdx

UINT

Index of the element data to sort by (0 for arithmetic types, 0 or 1 for TcVnPoint2 and TcVnVector2, 0 to 2 for TcVnPoint3 and TcVnVector3, 0 to 3 for TcVnVector4.

eComparisonOp

ETcVnComparisonOperator

Element comparison operator (LESS to sort ascending or GREATER to sort descending).

nFirstIdx

ULINT

First index of the container to sort (inclusive).

nLastIdx

ULINT

Last index of the container to sort (inclusive). Must be >= nFirstIdx. Automatically cropped to the last available index in the container, so it is valid to specify larger values to sort until the end.

hrPrev

HRESULT

HRESULT indicating the result of previous operations (If SUCCEEDED(hrPrev) equals false, no operation is executed.)

F_VN_SortContainerExp 3: Return Value

HRESULT

Required License

TC3 Vision Base

System Requirements

Development environment

Target platform

PLC libraries to include

TwinCAT V3.1.4026 or later

PC or CX (x64) with min. PL50, e.g. Intel 4-core Atom CPU

Tc3_Vision