DatasetObject::GetLabel

Description

Get the label from the DatasetObject.

Syntax

BOOL GetLabel(string& strLabel, int nType, BOOL bX)

Parameters

strLabel
[output] the value
nType
[input] the type, available value : RCLT_LONG_NAME, RCLT_UNIT, RCLT_COMMENT
bX
[input] TRUE for corresponding sampling interval labels

Return

TRUE on success and FALSE on failure.

Examples

EX1

void DatasetObject_GetLabel_Ex1()
{
    Worksheet wks = Project.ActiveLayer();
    if( !wks )
        return;

    Column col = wks.Columns(0);
    DatasetObject obj(col);

    string strLabel;
    if( obj && obj.GetLabel(strLabel, RCLT_LONG_NAME, false) )
        out_str(strLabel);
    else
        out_str("fail to get long name.");
}

Remark

See Also

DatasetObject::SetLabel

header to Include

origin.h