2.2.4.11.11 DatasetObject::SetLabel

Description

Set the label (RCLT_LONG_NAME, RCLT_UNIT, RCLT_COMMENT, .. ) from the DatasetObject.

Syntax

BOOL SetLabel(LPCSTR lpcszLabel, int nType, BOOL bX)

Parameters

lpcszLabel
[input] 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_SetLabel_Ex1()
{
    Worksheet wks = Project.ActiveLayer();
    if( !wks )
    	return;

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

    if( obj && obj.SetLabel("test ok", RCLT_LONG_NAME, false) )
        out_str("set long name done.");
    else
        out_str("fail to set long name.");
}

Remark

See Also

DatasetObject::GetLabel

Header to Include

origin.h