NI-SCOPE .NET Class Library Help

ScopeDriverUtility.GetChannelNameFromString Method

  • Updated2023-09-06
  • 2 minute(s) read
ScopeDriverUtility.GetChannelNameFromString Method

ScopeDriverUtilityGetChannelNameFromString Method

Returns a comma-separated channel-name list given a String index list.

Namespace:  NationalInstruments.ModularInstruments.NIScope
Assembly:  NationalInstruments.ModularInstruments.NIScope.Fx45 (in NationalInstruments.ModularInstruments.NIScope.Fx45.dll) Version: 2023

Syntax

public string GetChannelNameFromString(
	string index
)
Public Function GetChannelNameFromString ( 
	index As String
) As String

Parameters

index
Type: SystemString
Index list for the channels in the session. Valid values are from 0 to the number of channels in the session minus 1. The input string can be in one of the following formats: "0,2,3,1" --> Comma-separated list "0-3" --> Range using a hyphen "0:3" --> Range using a colon - The above formats can be combined: "1, 1:2, 0-3" - Out-of-order indices are supported: "2,3,0" - Repeated indices are supported: "1, 2, 2, 3, 0" - White-space characters (space, tab, newline, vertical tab, feed, carriage return) are allowed between characters: " 1,2", "1 , 2 ", " 1 ,2 ", "1, 2", "1 , 2" are valid strings - Ranges can be incrementing (0-3) or decrementing (3-0)

Return Value

Type: String
Returns a String populated with the corresponding name for each index in the same order the indices appear in the input string.

Exceptions

ExceptionCondition
ObjectDisposedException The GetChannelNameFromString(String) method was called after the associated NIScope or ScopeDriverUtility object was disposed.
OutOfRangeException If one of the indices in the list is greater than or equal to the number of channels in the session.
SelectorNameException If the input list does not have a valid format or contains a negative index.
IviCDriverException If the input list is empty.

Remarks

See Also

Log in to get a better experience