NI-SWITCH 19.0 .NET Framework 4.0 API Reference

Table of Contents

SetPath Method

  • Updated2023-02-21
  • 3 minute(s) read
SetPath Method
Connects two channels by specifying an explicit path in the pathList parameter, which is an array of String with the source channel as the first element and the destination channel as the next element.

Namespace:  NationalInstruments.ModularInstruments.NISwitch
Assembly:  NationalInstruments.ModularInstruments.NISwitch.Fx40 (in NationalInstruments.ModularInstruments.NISwitch.Fx40.dll) Version: 19.0.0.49152 (19.0.0.49152)
Visual Basic (Declaration)
Public Sub SetPath ( _
	pathList As String() _
)
C#
public void SetPath(
	string[] pathList
)

Parameters

pathList
Type: array< System..::.String >[]()[]
Represents an array of 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

ExceptionCondition
Ivi.Driver.IviCDriverException When an underlying IVI-C driver was called to perform an action, the IVI-C driver action did not succeed.
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.ChannelDuplicatedInPathException This exception is used when the driver detects that a channel name is duplicated in the path.
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.PathNotFoundException This exception is used when the driver expects to find a path between two channels, but the path is not found.
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.
ArgumentNullException See the MSDN documentation for System.ArgumentNullException.
ObjectDisposedException The SetPath method was accessed after the associated NISwitch.NISwitch object was disposed.

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".

See Also

Log in to get a better experience