06-19-2009 05:18 AM
I am using the ComponentWorks 3D Graph 8.0 object in some C# code, implementing the Plot3DCurve() function to create the graph. Is it possible to 'read back' the data from my graph? i.e. return the 3 arrays of data used to create the graph? I want the equivalent of the XYPlot.GetXData() and XYPlot.GetYData() functions I use for 2D graphs.
I could get round my problem by just storing the arrays when I produce the graph so I can access the data later but this does seem like a waste of memory when the graph object must be storing that data too.
Thanks for any help.
CAS
07-08-2009 04:49 AM
Hi CAS
I hope this finds you well. I do not think there is any need to use a function to read back the arrays from the graph in this situation, since there is not going to be any extra memory used up by the graph. The reason being that in ComponentWorks, things are done by reference, rather than using up more memory. Therefore, the graph is merely referencing the location of the data that has been stored already, rather than storing new data and using more memory.
I hope this helps!
Kind Regards
07-08-2009 05:42 AM
Hi Jeremy
Thanks for your reply but the structure of my code is such that I don't retain the original data array after plotting the graph and so cannot access it. For a bit of background, the user can load data from file, process it and plot the graph. They can then load different data and/or apply different processing which populates the arrays with the new data. However, the first graph can still be visible and I want the user to be able to save the graph data to file despite the fact that I have loaded new data in to the arrays.
I have got round the problem by just storing the plot data to local arrays whenever I produce a plot but this must mean that I'm using twice as much memory - whch could pose a problem with the amounts of data I am handling.
CAS
07-14-2009 05:46 AM