| 2.2.4.17.11 GraphLayer::DataplotsGroupingDataplotsGrouping
 DescriptionSet/Get dataplots grouping status.
 Syntaxint DataplotsGrouping( vector<int> &vn, BOOL bSet = TRUE ) Parameters vn[Modify]The array of grouping status for data plots, values can be
 enum
{
	DPGP_NOT_GROUPED			= 0,
	DPGP_HEAD_OF_GROUP,
	DPGP_NOT_HEAD_IN_GROUP
}; bSet[Input]TRUE to set data plots grouping status, FALSE to get.
 ReturnError code enumerate as
 enum
{
	GPGPERR_INVALID_DATAPLOT								= -100,
	GPGPERR_MISMATCH_PLOT_TYPE_AND_GROUP_TYPE,
	GPGPERR_GROUP_MUST_HAVE_AT_LEAST_TWO_MEMBERS,
	GPGPERR_GROUP_MUST_HAVE_ONE_HEAD,
	GPGPERR_ALL_PLOTS_IN_ONE_GROUP_MUST_HAVE_SAME_PLOT_TYPE,
	GPGPERR_NO_ERROR			= 0,
};Only GPGPERR_NO_ERROR will be returned for Get.
 Examples//Get the number of groups in the active graph layer.
void GraphLayer_DataplotsGrouping_Ex1()
{
    GraphLayer  gl = Project.ActiveLayer();
    vector<int> vn;
    gl.DataplotsGrouping(vn, FALSE);
    //TRUE to set data plots grouping status, FALSE to get. 
    vector<uint>    vnGroupHeads;
    vn.Find(vnGroupHeads, DPGP_HEAD_OF_GROUP);
    
    printf("There are %d Group(s) in current GraphLayer\n", vnGroupHeads.GetSize());
}RemarkSee AlsoUngroupPlots, GroupPlots, Groups
 Header to Includeorigin.h
 |