The main problem is that you cannot copy a curve like
crv[j]=crvCopy
Actually, I don't think you really need a curve array. You may just need two string arrays to save the names of Dn and HdA.
I suggest that you can do it in the following way:
//define string arrays
string DnString[2];
string HdAString[2];
int j = 0;
foreach (PageBase pb in Project.Pages)
{
.....
//copy dataset names
DnString[j] = Dn.GetName();
HdAString[j] = HdA.GetName();
.....
j++;
}
//plotting part
for (int k=0; k<10; k++)
{
Curve tmpC(DnString[k], HdAString[k]);
int kk = gly.AddPlot( tmpC, IDM_PLOT_SCATTER );
DataPlot dpLine = gly.DataPlots(kk);
gly.Rescale();
}
Deanna
OriginLab Technical Services