The easiest way to do this would be to create a CNiReal64Vector in-place in your call to PlotY. Since you are passing an array of doubles, you want to call the CNiReal64Vector constructor that has the number of elements and double * as parameters. The code would look something like the following.
int numPoints = 1000;
double dataArray[1000];
GetData(dataArray);
m_graph.PlotY(CNiReal64Vector(numPoints, dataArray));
You should be able to use the approach you originally tried. What errors were you getting when trying to populate the CNiReal64Vector in your loop? Did you set the size of the CNiReal64Vector to the size of your data array?
David Rohacek
National Instruments