curvebase::GetName

Contents

Description

Get the name of an internal Origin curve object.

Syntax

BOOL GetName( string & strName )

string GetName( )

Parameters

strName
[output] Returned name of an internal Origin curve object.

Return

Returns TRUE on successful exit and FALSE on failure. Also returns the name of an internal Origin curve object.


Returns the name of an internal Origin curve object.

Examples

EX1

//With default Book1, and the short name of the first column is "A" 
int curvebase_GetName_ex1()
{
    Worksheet wks(Project.ActiveLayer());
    if(wks)
    {
        Curve crv( wks, 0);
        if(crv.IsValid())
        {
            string strName;
            crv.GetName(strName);
            out_str("Curve name is " + strName);//returns "Curve name is Book1_A"
            return 0;
        }
        else
        {
            out_str("Curve is invalid!");
            return 1;
        }
    }
}


EX2

//With default Book1, and the short name of the first column is "A"
int curvebase_GetName_ex2()
{
    Worksheet wks(Project.ActiveLayer());
    if(wks)
    {
        Curve crv( wks, 0);
        if(crv.IsValid())
        {
            string strName;
            strName = crv.GetName();
            out_str("Curve name is " + strName); //returns "Curve name is Book1_A"
            return 0;
        }
        else
        {
            out_str("Curve is invalid!");
            return 1;
        }
    }
}

Remark

Get the name of an internal Origin curve object.

See Also

header to Include

origin.h