2.1.5.4 curve_get_wks_col_names


Description

Find Worksheet and Column names from a Curve.

This function should not be used anymore, please use DataRange::GetBookSheet method.

Syntax

string curve_get_wks_col_names( const curvebase & cuv, string & strX, string & strY )

Parameters

cuv
[input] Curve to find info about
strX
[output] X column name, can be empty if Curve has no X column
strY
[output] Y column name.

Return

name of the Worksheet, will be empty if input Curve is invalid

Examples

EX1

//This example get the dataset name of the curve from current Graph.
//For this sample to work, graph must exist in the project.
void curve_get_wks_col_names_ex1()
{

    GraphLayer gl = Project.ActiveLayer();                 //Get the active GraphLayer of current project
    if(gl)
    {
        DataPlot dp = gl.DataPlots(0);      // Get first data plot in graph layer
        if(dp)                              // If valid DataPlot...
        {
            Curve crv(dp);                   // Get Curve from DataPlot
            string strX, strY, strWks;        
            strWks = curve_get_wks_col_names(crv, strX, strY); 
            out_str("The first DataPlot in Current Graph: ");
            out_str("X: "+ strWks + "_" + strX);
            out_str("Y: "+ strWks + "_" + strY);
        }
    }
}

Remark

See Also

Header to Include

origin.h

Reference