GetLayerContents
get the contents of a graph layer into a tree
BOOL GetLayerContents( TreeNode & tr, DWORD dwCtrl = 0 )
EX1
//Get the contents of the graph layer into a tree. Then use the tree to draw a new graph. void GraphLayer_GetLayerContents_ex1() { GraphLayer gl = Project.ActiveLayer(); if(!gl) return; Tree tr; bool bWasGroup = gl.UngroupPlots(); //get the contents of a graph layer into a tree gl.GetLayerContents(tr, GETLC_DATAPLOTS | GETLC_NO_LIMITS); GraphPage gp; gp.Create(); GraphLayer glNew = gp.Layers(0); // add plots by the settings of tr, the plots should be ungrouped int nn = glNew.AddPlots(tr.FirstNode, ADDPLOTSFROMTREE_NEW | ADDPLOTSFROMTREE_IMPLICIT_STYLEHOLDERS); glNew.LT_execute("legend -s");// this will force the legend to update glNew.Rescale(); }
GraphLayer::AddPlots
origin.h