F_VN_CopyContainerElementsConditional_ITcVnForwardIterator

F_VN_CopyContainerElementsConditional_ITcVnForwardIterator 1:

Copys container elements to a new container, depending on a custom condition.

Syntax

Definition:

FUNCTION F_VN_CopyContainerElementsConditional_ITcVnForwardIterator : HRESULT
VAR_INPUT
    ipSrcContainer  : ITcVnContainer;
    ipDestContainer : Reference To ITcVnContainer;
    ipConditionFB   : ITcVnCustomElementCondition_ITcVnForwardIterator;
    hrPrev          : HRESULT;
END_VAR

F_VN_CopyContainerElementsConditional_ITcVnForwardIterator 2: Inputs

Name

Type

Description

ipSrcContainer

ITcVnContainer

Source container

ipDestContainer

Reference To ITcVnContainer

Returns a container with elements, that match the condition

ipConditionFB

ITcVnCustomElementCondition_ITcVnForwardIterator

Custom condition

hrPrev

HRESULT

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

F_VN_CopyContainerElementsConditional_ITcVnForwardIterator 3: Return value

HRESULT

Further information

The function F_VN_CopyContainerElementsConditional_ITcVnForwardIterator filters elements of multi-dimensional containers. The filter condition is to be specified by a function block with the interface ITcVnCustomElementCondition_ITcVnForwardIterator.

Unlike F_VN_CopyContainerElementsConditional_ITcVnContainer, sub-containers are not transferred to the conditional method Condition, but iterators, which each point to the first element of the sub-container.

Parameter

Input container

The input container ipSrcContainer must be a multi-dimensional container; i.e. the container must contain sub-containers as elements. Thus all containers of the type ContainerType_Vector_Vector_<…> can be used.

Result container

The result container ipDestContainer contains all sub-containers that satisfy the condition in ipConditionFB.

Filter condition

The filter condition must be defined as the method Condition of a function block. So that this function block can be transferred to the function as the parameter ipConditionFB, it must implement the interface ITcVnCustomElementCondition_ITcVnForwardIterator.

Samples

Related functions

Required License

TC3 Vision Base

System Requirements

Development environment

Target platform

PLC libraries to include

TwinCAT V3.1.4024.59 or later

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

Tc3_Vision