GroupPlot::GetCount

Description

Get the number of plots in GroupPlot

Syntax

int GetCount( )

Parameters

Return

the number of plots

Examples

void GroupPlot_GetCount_Ex1()
{
        //assume the active graphlayer has at least two dataplots on it
        GraphLayer gl = Project.ActiveLayer();
        if ( !gl )
        {
                printf("Can not get active graphlayer!");
                return;
        }
        if ( !gl.Groups(0) && !gl.GroupPlots(0, gl.DataPlots.Count()) ) //if never grouped, group them
        {
                printf("Fail to group all plots on graphlayer!");
                return;
        }
        GroupPlot gPlot = gl.Groups(0); //get first groupplot object
        printf("The first GroupPlot object has %d plots", gPlot.GetCount());
        return;
}

Remark

See Also

header to Include

origin.h