Click here to Skip to main content
11,719,973 members (87,449 online)
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("Meas").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 = "d:\...\test.exe"
            GetData.StartInfo.Arguments = TempStart & " " & TempStop & " " & RBand.Text & " " & VBand.Text & " " & SweepDelay.Text & " " & 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("Meas").Points.AddXY(CDbl(Hilf_Z(i)) * 1000000.0, Val(Hilf_Z(i + 1)))
                i = i + 2
            '<-------- 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

Sorry for my baaad programming skills, and thanks in advance!
Greeeez, Tom
Posted 13-Dec-11 0: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 Sergey Alexandrovich Kryukov 1,869
1 OriginalGriff 770
2 F-ES Sitecore 640
3 Maciej Los 609
4 Richard MacCutchan 540

Advertise | Privacy | Mobile
Web03 | 2.8.150901.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