Try ... int GetPlotColor(void) { /* Returns a code for the color of the Active Plot (OriginC indexing) in the ActiveLayer Returns -1 if active dataplot is invalid */ GraphPage gP=Project.Pages(); GraphLayer gL=gP.Layers(-1); DataPlot dP=gL.DataPlots(-1); if (dP) { return(dP.Curve.Line.Color.nVal); } return (-1); }