CollectionsThe Collection class provides a template for holding multiple objects of the same type. In Origin C, an instance of a Collection is read-only. You cannot add items to, or delete items from, a collection.
There are a number of Origin C classes that contain data members which are instances of a Collection. For example, the Project class contains a data member named WorksheetPages. The WorksheetPages data member is a collection of all the existing WorksheetPage objects in the project.
The table below lists each of the Origin C Collections, along with the class that contains the collection and the item types in the collection.
Project, List all Graph PagesList all graph pages in the current project.
foreach(GraphPage gp in Project.GraphPages)
Project, List all WorkbooksList all worksheet pages in the current project.
foreach(WorksheetPage wksPage in Project.WorksheetPages)
Project, List all MatrixbooksList all matrix pages in the current project.
foreach(MatrixPage matPage in Project.MatrixPages)
Graph Layer, List all Data PlotsList all data plots.
GraphLayer gl = Project.ActiveLayer();
foreach(DataPlot dp in gl.DataPlots)
printf("%d, %s", dp.GetIndex()+1, strRange);