Access-Embedded-Graphs
List all embedded/floating graph pages in the project, along with embedding information(Worksheet, Row, Column).
doc -e P { string wkb$, name$; if(page.IsEmbedded==1) // list all embedded graphs { wkb$ = page.isEmbedded$; name$ = %(page.label$); if(name.Getlength()==0 ) name$ = %H; type "The embedded graph is %(name$)"; type "It is in %(wkb$)"; } if(page.IsEmbedded==2) // list all floating graphs { wkb$ = page.isEmbedded$; name$ = %(page.label$); if(name.Getlength()==0 ) name$ = %H; type "The floating graph is %(name$)"; type "It is in %(wkb$)"; } }
The example below lists all graphs embedded in cells in the active worksheet.
range rA = !; //define range of the active worksheet doc -e P //loop over all graph window in project { if(page.IsEmbedded==1) //if the graph is embedded in a worksheet cell { range rB = page.isEmbedded$; //define a range where the embedded graph locates if (rB.GetLayer() == rA.GetLayer()) { type %H; } }; }
The example below re-scale each layer of a embedded graph to show all plots
//Suppose Graph2 is an embedded graph in workbook. win -o Graph2 { doc -e LW //loop over all layers in the graph window { Rescale; } }