Measurement Studio for VB6

cancel
Showing results for 
Search instead for 
Did you mean: 

Can you set one CWgraph plot equal to another one, effectively copying the plot?

I'm using ComponentWorks in VB and I wanted to know if it is possible to copy one CWplot object from one graph to a CWplot object of another graph. Basically copying the plot from one graph control to another.
0 Kudos
Message 1 of 4
(3,458 Views)
This would not work how you would want. You could achieve the same thing by editing plot properties on the graph's PlotTemplate property, then call Plots.Add on the graph twice. This will add two plots to the graph's plots collection that are cloned from the settings of the PlotTemplate property.

- Elton
0 Kudos
Message 2 of 4
(3,458 Views)
Would this also "clone" the data displayed on the original plot? That is the main thing I am trying to achieve - copying the plot object with all its plotted data as well.
0 Kudos
Message 3 of 4
(3,458 Views)
No, it doesn't really make sense for the data. Obviously you have to have a buffer in your program that has the data in it to send it to the graph. Just send the same buffer to two graph function calls instead of one. If you are potentially wanting to copy the data from one plot to another, then just keep the data buffer in your program in memory or output it to a file.

Best Regards,

Chris Matthews
National Instruments
0 Kudos
Message 4 of 4
(3,458 Views)