GetChannelNameFromString(string)
- Updated2026-01-12
- 1 minute(s) read
Returns a comma-separated channel name list given a System.String index list.
Syntax
Namespace: NationalInstruments.ModularInstruments.NIDigital
public string GetChannelNameFromString(string index)
Parameters
| Name | Type | Description |
|---|---|---|
| index | string | Index list for the desired channels in the session. Valid values are from zero to one less than the number of channels in the session. The input string can be in one of the following formats: A comma-separated list—for example, "0,1,2,3"; a range using a hyphen—for example, "0-3"; or a range using a colon—for example, "0:3." You can combine comma-separated lists and ranges that use a hyphen or colon. Both out-of-order and repeated values are supported ("2,3,0","1,2,2,3"). White space characters, including spaces, tabs, feeds, and carriage returns, are allowed between characters. Ranges can be incrementing or decrementing. |
Returns
Returns a System.String populated with the corresponding name for each index in the same order the indexes appear in the input string.
Exceptions
| Type | Description |
|---|---|
| System.ObjectDisposedException | The GetChannelNameFromString method was called after the associated NIDigital or DigitalDriverUtility object was disposed. |
| ArgumentException | If one of the indexes in the list is out of range (less than zero or greater than number of channels minus one) |
| Ivi.Driver.SelectorNameException | If the input list does not have a valid format |
| Ivi.Driver.IviCDriverException | If the input list is empty or null |