Hi
"range layer1 = [Graph1]1!;" only works for Origin 8.
For 7.5, would you please consider making layer 1 active before plotting? Just like in the following script:
%N=Graph1; // graph with layer 1 and layer 2;
%k=n167; // the worksheet from which the column "nh" is to be plotted
%N!Page.active = 1; //Make layer 1 active
%N!layer.include(%k_nh);
Deanna
OriginLab Technical Services