I have got a code in the forum and modified it for the active graph layer. It seems to work for now:
#include <Origin.h>
void ChangeColorofGrapgLines()
{
// Create and attach a graph layer from current Graph:
GraphLayer gl = Project.ActiveLayer();
if(gl)
{
DataPlot dp1 = gl.DataPlots(0); // Get the first data plot in the layer
DataPlot dp2 = gl.DataPlots(1); // Get the 2nd data plot in the layer (error bar probably in my case)
DataPlot dp3 = gl.DataPlots(2); // Get the 3rd data plot in the layer
DataPlot dp4 = gl.DataPlots(3); // Get the 4th data plot in the layer
DataPlot dp5 = gl.DataPlots(4); // Get the 5th data plot in the layer
//dp1.SetColorRGB(0x00, 0xFF, 0x00, TRUE);// Set the color to green and repaint
//dp2.SetColorRGB(0x00, 0xFF, 0x00, TRUE);// Set the color to green and repaint
dp3.SetColorRGB(0x00, 0xFF, 0x00, TRUE);// Set the color to green and repaint
dp4.SetColorRGB(0x00, 0x00, 0xFF, TRUE);// Set the color to blue and repaint
dp5.SetColorRGB(0xFF, 0x00, 0x00, TRUE);// Set the color to red and repaint
}
}
............
Question is : What will be the foreach statement for below :
"foreach graph (or graphlayer, am not sure) in the folder (call by given name from user)/active folder" ?
AB