Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

waveformgraphic and waveformplot

Hi,
 
I am using MS 8.0 and Visual Studio.net 2005 to do a projects in DAQ and data graphic display. When I open a form and add waveformgraphics in the form, waveformgraphics will add a new waveformplot automatically into waveformgraphics. Actually, probably, I will 5-6 graphics for different case,but they will not be visible at the same time and also each graphics includes more than one plot. As as result, when my application starts, the form will generate many plots. Whether I can use some code to remove them, which means I can add them at run time and remove them at run time? another question is whether i can share one plot in one more waveformgraphics? Thank you very much!
 
 
0 Kudos
Message 1 of 3
(3,026 Views)
Howdy Yhong,

You can certainly attach multiple plots to a single graph object.  Simply use the WaveformGraph.Plots.Add( ) to do so.  You can then plot to each WaveformPlot object seperately using the multitude of plotting methods for the WaveFormPlot class.

You cannot share one plot with multiple graph objects.  An attempt to add a plot through WaveformGraph.Plots.Add( ) method that is already owned, you will receive an error.

I've included a small example (written in C# .NET 2003, but you should be able to open it, which illustrates using multiple plot objects, and adding one programmatically at run time.

Thanks and have a great day!

Regards,
Andrew W || Applications Engineer
National Instruments
0 Kudos
Message 2 of 3
(3,007 Views)

Hi, Andrew W:

Thank you for your help and your explaination. Now I know how to use waveformplot already. However, I still have another question. For example, when we put waveformgraphic component on the form, it will automatically add XAxis, YAxis and waveformplot. Here waveformgraphic must need at least one AXis, YAxis and Waveformplot. And also, at the run-time, MS allows users to add new Axis or plot into one waveform graphics. Based on my opinion, waveformgraphic component should allow user to design application with empty axis and plot, actually, I did that because I will remove New function to create new plot or axis in windows form designer generate code. In other words, Ms allow users to remove axis and plot in waveformgraphic in the designed time. The only thing is you don't do that automatically. But I think MS should be able to do that which means to make option for users. Anyway, that is my opinion.

0 Kudos
Message 3 of 3
(2,997 Views)