Verifies that you can create a path between channel1 and channel2.

Syntax

Namespace: NationalInstruments.ModularInstruments.NISwitch

public SwitchPathCapability CanConnect(string channel1, string channel2)

Remarks

If a path is possible in the switch module, the availability of that path is returned given the existing connections. If the path is possible but in use, an ImplicitConnectionExistsWarningCode warning is returned.

Parameters

NameTypeDescription
channel1string

Indicates one of the channel name of the desired path.

channel2string

Indicates the name of the other channel name of the desired path.

Returns

Returns a SwitchPathCapability object indicating whether a path is valid.

Exceptions

TypeDescription
System.ObjectDisposedException

The CanConnect was accessed after the associated NISwitch object was disposed.