Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: VB8.0 VB
Hi guys,

I have searched for a solution for my problem for a long while now. I know it might just be a small issue but right now I can't solve it and I would be really happy getting some help bevore gettin a breakdown :P

So what I try to do is streaming data from an external .exe file redirecting the console output to my Chart.Series("Meas"). I have to split the datatransfer into several steps cause the sub program takes a looong while.

I got a little loop for the data collection steps and would like to refresh my ChartArea in the end of every loop. Unfortunately it won't work... Wahhh! :P Here is the Part of my Program (I marked the line where i want to refresh my ChartArea):

Private Sub GetData_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles GetData.Click
    Dim DataSet As String
    Dim GetData As New System.Diagnostics.Process()
    GetData.StartInfo.UseShellExecute = False
    GetData.StartInfo.RedirectStandardOutput = True
    GetData.StartInfo.CreateNoWindow = True
    Chart1.Series(&quot;Meas&quot;).ChartType = SeriesChartType.FastLine
    For j = 0 To (CDbl(FStop.Text) - CDbl(FStart.Text)) / 10
        Dim TempStart As Double
        Dim TempStop As Double
        TempStart = CDbl(FStart.Text) + j
        TempStop = CDbl(FStart.Text) + 10 + j
        GetData.StartInfo.FileName = &quot;d:\...\test.exe&quot;
        GetData.StartInfo.Arguments = TempStart &amp; &quot; &quot; &amp; TempStop &amp; &quot; &quot; &amp; RBand.Text &amp; &quot; &quot; &amp; VBand.Text &amp; &quot; &quot; &amp; SweepDelay.Text &amp; &quot; &quot; &amp; IntAmp.Text
        DataSet = GetData.StandardOutput.ReadToEnd()
        Dim Hilf_Z As Object
        Hilf_Z = Split(DataSet, vbCrLf)
        Dim i As Integer
        For i = 0 To UBound(Hilf_Z) - 2
            Chart1.Series(&quot;Meas&quot;).Points.AddXY(CDbl(Hilf_Z(i)) * 1000000.0, Val(Hilf_Z(i + 1)))
            i = i + 2
        '&lt;-------- here I want to refresh my Chart
        'something like: Chart1.ChartArea("ChartArea1").Refresh()
        'or              Chart1.Series("Meas1").Refresh()
        'can't find any methods...

End Sub</pre>

Sorry for my baaad programming skills, and thanks in advance!
Greeeez, Tom
Posted 13-Dec-11 1:00am
losmac at 19-Jan-12 4:31am
Is your chart:
1) Excel.Chart
2) System.Web.UI.DataVisualization.Charting.ChartArea

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 490
1 Sergey Alexandrovich Kryukov 395
2 Maciej Los 285
3 ProgramFOX 265
4 CHill60 200
0 OriginalGriff 490
1 Sergey Alexandrovich Kryukov 395
2 Maciej Los 285
3 ProgramFOX 265
4 CHill60 200

Advertise | Privacy | Mobile
Web03 | 2.8.150331.1 | Last Updated 13 Dec 2011
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100