Walter Straub - 2011-12-21

Thanks to
toddmac Simple Code To Retrieve Point Pairs:
I solved my problem - here it is:

' ###########################################################
Private Sub btn_Read_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_Read.Click
    Dim flt_Dummy_Value As Double
    Dim i_X_Variable As Integer
    Dim i_Channel As Integer

    txt_Result.Text = String.Empty
    i_X_Variable = Val(txt_XAxis.Text)
    i_Channel = Val(txt_Channel.Text)

    flt_Dummy_Value = fctnReadPlot1Data(i_Channel, i_X_Variable)

    txt_Result.Text = flt_Dummy_Value.ToString

End Sub
' ###########################################################
Function fctnReadPlot1Data(ByVal iChannelIndex, ByVal iXAxis)

    Dim i_X_Coordinate As Integer
    Dim i_X0 As Integer
    Dim curve0 As CurveItem = Plot1.GraphPane.CurveList.Item(0)

    Try
        Dim PP_XandY As PointPair = curve0(i_X_Coordinate)
        'MsgBox("Curve0  i_X_Coordinate = " & i_X_Coordinate.ToString & "  X = " & PP_XandY.X.ToString & " Y = " & PP_XandY.Y.ToString)
        i_X0 = PP_XandY.X
        fctnReadPlot1Data = PP_XandY.Y
    Catch ex As Exception
        MessageBox.Show(ex.Message, My.Application.Info.Title, _
            MessageBoxButtons.OK, MessageBoxIcon.Error)
    End Try

    Dim curve1 As CurveItem = Plot1.GraphPane.CurveList.Item(0)
    Dim curve2 As CurveItem = Plot1.GraphPane.CurveList.Item(1)
    Dim curve3 As CurveItem = Plot1.GraphPane.CurveList.Item(2)
    Dim curve4 As CurveItem = Plot1.GraphPane.CurveList.Item(3)
    Dim curve5 As CurveItem = Plot1.GraphPane.CurveList.Item(4)
    Dim curve6 As CurveItem = Plot1.GraphPane.CurveList.Item(5)

    i_X_Coordinate = iXAxis - i_X0

    fctnReadPlot1Data = 1111.1  'Default Condition

    If (i_X_Coordinate < 0 Or i_X_Coordinate > (24 * 60)) Then
        fctnReadPlot1Data = 2222.2  'Error Condition
    Else

        Select Case iChannelIndex
            Case 1
                Try
                    Dim PP_XandY As PointPair = curve1(i_X_Coordinate)
                    'MsgBox("Curve1  i_X_Coordinate = " & i_X_Coordinate.ToString & "  X = " & PP_XandY.X.ToString & " Y = " & PP_XandY.Y.ToString)
                    fctnReadPlot1Data = PP_XandY.Y
                Catch ex As Exception
                    MessageBox.Show(ex.Message, My.Application.Info.Title, _
                        MessageBoxButtons.OK, MessageBoxIcon.Error)
                End Try

            Case 2
                Try
                    Dim PP_XandY As PointPair = curve2(i_X_Coordinate)
                    'MsgBox("Curve2  i_X_Coordinate = " & i_X_Coordinate.ToString & "  X = " & PP_XandY.X.ToString & " Y = " & PP_XandY.Y.ToString)
                    fctnReadPlot1Data = PP_XandY.Y
                Catch ex As Exception
                    MessageBox.Show(ex.Message, My.Application.Info.Title, _
                        MessageBoxButtons.OK, MessageBoxIcon.Error)
                End Try

            Case 3
                Try
                    Dim PP_XandY As PointPair = curve3(i_X_Coordinate)
                    'MsgBox("Curve3  i_X_Coordinate = " & i_X_Coordinate.ToString & "  X = " & PP_XandY.X.ToString & " Y = " & PP_XandY.Y.ToString)
                    fctnReadPlot1Data = PP_XandY.Y
                Catch ex As Exception
                    MessageBox.Show(ex.Message, My.Application.Info.Title, _
                        MessageBoxButtons.OK, MessageBoxIcon.Error)
                End Try

            Case 4
                Try
                    Dim PP_XandY As PointPair = curve4(i_X_Coordinate)
                    'MsgBox("Curve4  i_X_Coordinate = " & i_X_Coordinate.ToString & "  X = " & PP_XandY.X.ToString & " Y = " & PP_XandY.Y.ToString)
                    fctnReadPlot1Data = PP_XandY.Y
                Catch ex As Exception
                    MessageBox.Show(ex.Message, My.Application.Info.Title, _
                        MessageBoxButtons.OK, MessageBoxIcon.Error)
                End Try

            Case 5
                Try
                    Dim PP_XandY As PointPair = curve5(i_X_Coordinate)
                    'MsgBox("Curve5  i_X_Coordinate = " & i_X_Coordinate.ToString & "  X = " & PP_XandY.X.ToString & " Y = " & PP_XandY.Y.ToString)
                    fctnReadPlot1Data = PP_XandY.Y
                Catch ex As Exception
                    MessageBox.Show(ex.Message, My.Application.Info.Title, _
                        MessageBoxButtons.OK, MessageBoxIcon.Error)
                End Try

            Case 6
                Try
                    Dim PP_XandY As PointPair = curve6(i_X_Coordinate)
                    'MsgBox("Curve6  i_X_Coordinate = " & i_X_Coordinate.ToString & "  X = " & PP_XandY.X.ToString & " Y = " & PP_XandY.Y.ToString)
                    fctnReadPlot1Data = PP_XandY.Y
                Catch ex As Exception
                    MessageBox.Show(ex.Message, My.Application.Info.Title, _
                        MessageBoxButtons.OK, MessageBoxIcon.Error)
                End Try

            Case Else
                fctnReadPlot1Data = 999.9  'Error Condition

        End Select

    End If   ' end of If(i_X_Coordinate < 0 Or i_X_Coordinate > (24 * 60)) Then

End Function

'***************************************

For what ever it is worth - take care
Walter