Swap Method

Measurement Studio User Interface

Swap Method

Syntax

CWValuePairs.Swap element1, element2

Purpose

Swaps two CWValuePair elements, altering their indices.

Remarks

This method is useful on CWSlide and CWKnob controls in ValuePairs Only mode.

Parameters

element1 As Variant

Specifies the index of a value pair to be swapped.

element2 As Variant

Specifies the index of a second value pair to be swapped.

Example

'Swap value pairs 1 and 2
CWSlide1.Axis.ValuePairs.Swap 1, 2