Connects two channels by specifying an explicit path in the pathList parameter, which is an array of System.String with the source channel as the first element and the destination channel as the next element.

Syntax

Namespace: NationalInstruments.ModularInstruments.NISwitch

public void SetPath(string[] pathList)

Remarks

A string composed of comma-separated paths will be built from the channels in the array. For example, for the array {"ch0", "com0", "ab0"}, the built string is "ch0->com0, com0->ab0".

Parameters

NameTypeDescription
pathListstring[]

Represents an array of System.String indicating paths between source channel (channel 1) and destination channel (channel 2). The first and last names in the path are the endpoints of the path. Every other channel in the path are configuration channels.

Exceptions

TypeDescription
Ivi.Swtch.ExplicitConnectionExistsException

This exception is used when an attempt is made to connect two channels that are already explicitly connected.

Ivi.Swtch.IsConfigurationChannelException

This exception is used when the driver detects an attempt to explicitly connect to a configuration channel.

Ivi.Swtch.AttemptToConnectSourcesException

This exception is used when an attempt is made to connect two channels that are both sources.

Ivi.Swtch.CannotConnectDirectlyException

This exception is used when an attempt is made to connect two channels which cannot be directly connected.

Ivi.Swtch.ResourceInUseException

This exception is used when the driver finds that one of the channels in the path is a configuration channel that is in use.

Ivi.Swtch.PathNotFoundException

This exception is used when the driver expects to find a path between two channels, but the path is not found.

Ivi.Swtch.ChannelDuplicatedInPathException

This exception is used when the driver detects that a channel name is duplicated in the path.

Ivi.Driver.IviCDriverException

When an underlying IVI-C driver was called to perform an action, the IVI-C driver action did not succeed.

System.ArgumentNullException

See the MSDN documentation for System.ArgumentNullException.

System.ObjectDisposedException

The SetPath method was accessed after the associated NISwitch object was disposed.