DataPlot::AddDataMarkers

Contents

Description

Add data markers onto the data plot and specify the begin and end indices

Syntax

int         AddDataMarkers(const vector<int>& vnBegin, const vector<int>& vnEnd, BOOL bInvalidate = TRUE, BOOL bUndo = FALSE);

Parameters

vnBegin
[input] Specify the indices of data markers begin marker
vnEnd
[input] Specify the indices of data markers end marker
bInvalidate
[input] Whether invalidate the data markers
bUndo
[input] Whether the action should be undoable

Return

Return 0 if no error, else return -1

Examples

EX1

//Add two data markers to the active graph layer.
void DataPlot_AddDataMarkers_ex1()
{
    GraphLayer gl = Project.ActiveLayer();
    if( gl )
    {
        DataPlot dp = gl.DataPlots();
        if( dp )
        {
            vector<int> vnBegin = {5,10};
            vector<int> vnEnd = {20,25};
            BOOL bInvalidate = TRUE;
            BOOL bUndo = TRUE;
            int nRet = dp.AddDataMarkers(vnBegin, vnEnd, bInvalidate, bUndo);
            if( nRet==0)
                out_str("success!");
        }
    }
}

Remark

See Also

DataPlot::GetDataMarkers, DataPlot::SetDataMarkers

header to Include

origin.h