The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 Forum for Origin C
 How to get number of worksheets in a workbook?OR..
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

reepingk

Canada
18 Posts

Posted - 03/19/2018 :  6:52:32 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
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:

Edited by - reepingk on 03/19/2018 7:02:55 PM

Castiel

343 Posts

Posted - 03/19/2018 :  7:03:46 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:

	WorksheetPage wksPage("MyBookName");
	printf("Count:" + wksPage.Layers.count());



Capital C: Count instead of count.

quote:

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?



https://www.originlab.com/doc/OriginC/ref/GraphLayer-GroupPlots


     #####
    #### _\_  ________
    ##=-[.].]| \      
    #(    _\ |  |------|
     #   __| |  ||||||||
      \  _/  |  ||||||||
   .--'--'-. |  | ____ |
  / __      `|__|[o__o]|
_(____nm_______ /____\____ 
Go to Top of Page

reepingk

Canada
18 Posts

Posted - 03/20/2018 :  12:49:26 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
Originally posted by Castiel

quote:

	WorksheetPage wksPage("MyBookName");
	printf("Count:" + wksPage.Layers.count());



Capital C: Count instead of count.

quote:

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?



https://www.originlab.com/doc/OriginC/ref/GraphLayer-GroupPlots


     #####
    #### _\_  ________
    ##=-[.].]| \      
    #(    _\ |  |------|
     #   __| |  ||||||||
      \  _/  |  ||||||||
   .--'--'-. |  | ____ |
  / __      `|__|[o__o]|
_(____nm_______ /____\____ 




I searched the manual for hours. Not even kidding. Why does that not show up when literally searching for "group"? I searched for group in the manual, programming reference, everything.
Go to Top of Page

Castiel

343 Posts

Posted - 03/20/2018 :  5:58:27 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:

I searched the manual for hours. Not even kidding. Why does that not show up when literally searching for "group"? I searched for group in the manual, programming reference, everything.



http://bing.com/search?q=group+site%3Aoriginlab.com%2Fdoc%2Foriginc


     #####
    #### _\_  ________
    ##=-[.].]| \      
    #(    _\ |  |------|
     #   __| |  ||||||||
      \  _/  |  ||||||||
   .--'--'-. |  | ____ |
  / __      `|__|[o__o]|
_(____nm_______ /____\____ 
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000