(self, lines, line_grouping, name_to_assign_to_lines='')
return DIChannel(self._handle, name)
Creates and returns a DIChannel object.

        Args:
            lines (str): Specifies the names of the lines to use to 
                create virtual channels.
            line_grouping (Optional[nidaqmx.constants.LineGrouping]):
                Specifies how to group digital lines into one or more
                virtual channels.
            name_to_assign_to_lines (Optional[str]): Specifies a name to 
                assign to the virtual channel this method creates.
        Returns:
            nidaqmx._task_modules.channels.di_channel.DIChannel: 
            
            Specifies the newly created DIChannel object.
Creates and returns a DIChannel object.
Creates and returns a DIChannel object .
def _create_chan(self, lines, line_grouping, name_to_assign_to_lines=''):
        """
        Creates and returns a DIChannel object.

        Args:
            lines (str): Specifies the names of the lines to use to 
                create virtual channels.
            line_grouping (Optional[nidaqmx.constants.LineGrouping]):
                Specifies how to group digital lines into one or more
                virtual channels.
            name_to_assign_to_lines (Optional[str]): Specifies a name to 
                assign to the virtual channel this method creates.
        Returns:
            nidaqmx._task_modules.channels.di_channel.DIChannel: 
            
            Specifies the newly created DIChannel object.
        """
        unflattened_lines = unflatten_channel_string(lines)
        num_lines = len(unflattened_lines)
        
        if line_grouping == LineGrouping.CHAN_FOR_ALL_LINES:
            if name_to_assign_to_lines or num_lines == 1:
                name = lines
            else:
                name = unflattened_lines[0] + '...'
        else:
            if name_to_assign_to_lines:
                if num_lines > 1:
                    name = '{0}0:{1}'.format(
                        name_to_assign_to_lines, num_lines-1)
                else:
                    name = name_to_assign_to_lines
            else:
                name = lines

        return DIChannel(self._handle, name)
def _create_chan ( self , lines , line_grouping , name_to_assign_to_lines = '' ) : unflattened_lines = unflatten_channel_string ( lines ) num_lines = len ( unflattened_lines ) if line_grouping == LineGrouping . CHAN_FOR_ALL_LINES : if name_to_assign_to_lines or num_lines == 1 : name = lines else : name = unflattened_lines [ 0 ] + '...' else : if name_to_assign_to_lines : if num_lines > 1 : name = '{0}0:{1}' . format ( name_to_assign_to_lines , num_lines - 1 ) else : name = name_to_assign_to_lines else : name = lines return DIChannel ( self . _handle , name )