CanConnect Method
- Updated2023-02-21
- 2 minute(s) read
Verifies that you can create a path between channel1 and channel2.
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 Function CanConnect ( _ channel1 As String, _ channel2 As String _ ) As SwitchPathCapability |
C# |
---|
public SwitchPathCapability CanConnect( string channel1, string channel2 ) |
Parameters
- channel1
- Type: System..::.StringIndicates one of the channel name of the desired path.
- channel2
- Type: System..::.StringIndicates the name of the other channel name of the desired path.
Return Value
Type: NationalInstruments.ModularInstruments.NISwitch..::.SwitchPathCapability Returns a SwitchPathCapability object indicating whether a path is valid.
Exceptions
Exception | Condition |
---|---|
ObjectDisposedException | The CanConnect was accessed after the associated NISwitch.NISwitch object was disposed. |
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.