/*------------------------------------------------------------------------------* * File Name: ListAllDataPlots.c * * Creation: ER, 01/17/05 * * Purpose: Programming Example * * Copyright (c) OriginLab Corp.2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 * * All Rights Reserved * * * * Modification Log: * *------------------------------------------------------------------------------*/ #include ///////////////////////////////////////////////////////////////////////////////// // This example lists the names of datasets associated with all data plots // in all graphs of the current Origin project. // void list_all_dataplots() { // Loop over all graphs in project foreach(GraphPage gpg in Project.GraphPages) { printf("Graph Page: %s\n", gpg.GetName()); // Loop over all layers foreach(GraphLayer gly in gpg.Layers) { printf(" Layer %d:\n", gly.GetIndex() + 1); // Loop over all data plots in layer and get datset name foreach(DataPlot dpl in gly.DataPlots) { printf(" %s\n", dpl.GetDatasetName()); } } } } /////////////////////////////////////////////////////////////////////////////////