2.2.4.7.3 DataObjectBase::GetIndex

Description

Get the index of object in layer, 0 based.

Syntax

int GetIndex( )

Parameters

Return

Index of object in layer or -1 if invalid.

Examples

EX1

void DataObjectBase_GetIt_ex1()
{
    Worksheet wks;
    wks.Create("origin");
    
    if(wks)
    {
        int nCol = wks.Columns("B").GetIndex();
        string strNewColName;
        if(nCol >=0) 
            wks.InsertCol(nCol+1, "Result", strNewColName);
    }
}

Remark

See Also

Header to Include

origin.h