I tried all manners of "count" or "length" with wkspage.layers (so wkspage.layers.count() or wkspage.layers.length() or even just wkspage.length(), but nothing works. There has to be a way to do this. (Other than stepping through all the layers with a foreach statement and literally incrementing a count.)
For example.
WorksheetPage wksPage("MyBookName");
printf("Count:" + wksPage.Layers.count());
EDIT: Ok getting the count doesn't help, can we just go with the question below? (I was trying to add a bunch of data to a datarange object, then add them to a graph in the end so that they would be grouped automatically, but it didn't work, I needed the count to say "If currentcount = count, then add datarange to graph"))
OR: How do I group existing data on a plot? I have data on a plot that is not grouped, how do I group them all using OriginC?
Origin Ver. and Service Release (Select Help-->About Origin):
Operating System: