NI-DCPower .NET fx40 API Reference

Table of Contents

DCPowerDriverUtility.GetChannelNameFromString Method

  • Updated2024-01-04
  • 2 minute(s) read
DCPowerDriverUtility.GetChannelNameFromString Method

DCPowerDriverUtilityGetChannelNameFromString Method

Returns a comma-separated list of channel names from a string index list.

Namespace:  NationalInstruments.ModularInstruments.NIDCPower
Assembly:  NationalInstruments.ModularInstruments.NIDCPower.Fx40 (in NationalInstruments.ModularInstruments.NIDCPower.Fx40.dll) Version: 2023

Syntax

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

Parameters

index
Type: SystemString
Specifies an index list for the channels in the session. Valid values are from zero to the total number of channels in the session minus one. The index string can be one of the following formats: a comma-separated list ("0,2,3,1"); a range using a hyphen ("0-3"); or a range using a colon ("0:3"). You can combine comma-separated lists and ranges that use a hyphen or colon. Both out-of-order and repeated indicies are supported ("2,3,0", "1,2,2,3"). Whitespace characters, including spaces, tabs, feeds, and carriage returns, are allowed between characters. Ranges can be incrementing or decrementing.

Return Value

Type: String
Returns a String of the channel name(s) in the same order the indices appear in the input string.

Exceptions

ExceptionCondition
ObjectDisposedException The GetChannelNameFromString(String) method was called after the associated NIDCPower 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.

See Also

Log in to get a better experience