OriginObject::GetRangeString

Description

Get the range string to represent this object

Syntax

BOOL GetRangeString( string & strRange, DWORD dwCntrl = NTYPE_AUTO )

Parameters

strRange
[output] to return range string
dwCntrl
[input] NTYPE_AUTO, NTYPE_SHORT for the object level control, but can also add NTYPE_BOOKSHEET_XY_RANGE to get XY for DataPlot

Return

true for success

Examples

EX1

void OriginObject_GetRangeString_Ex1(BOOL bShowPlotWithBookSheetInfo = false)
{
    GraphPage gp = Project.Pages();
    int ii = 0;
    DWORD dwCntrl;

    if(bShowPlotWithBookSheetInfo)
        dwCntrl = NTYPE_BOOKSHEET_XY_RANGE | NTYPE_ADD_ROW_RANGE;
    else
        dwCntrl = NTYPE_FOR_RANGE | NTYPE_ADD_ROW_RANGE;

    foreach(GraphLayer gl in gp.Layers)
    {
        foreach(DataPlot dp in gl.DataPlots)
        {
            string strPlotRange;
            BOOL bRet = dp.GetRangeString(strPlotRange, dwCntrl);
            out_str(strPlotRange);
        }
    }
}

Remark

See Also

header to Include

origin.h