quote:
Originally posted by hschausb
I am trying to find out how OriginLab sorts the used WorksheetPages.
I am programming Origin C and need a steady WksPages which do not change their count/sort number on every reboot of OriginLab.
I am initializing my WksPages like this “WorksheetPage book1 = Project.WorksheetPages(x);”. x is the WksPage count in the project. And these counts change around every second reboot of OriginLab which means I have to check if the WksPage objects are included to the right name every time.
Can anybody tell me “HOW” this count is done by OriginLab. I tried playing with the name of the WksPages (alphabetically, creation date) but I cannot find the pattern of the count/sort in the project.
It seems to be sorted so that the active WorksheetPage (from project saved latest) is returened from Project.WorksheetPages(x) with the x as large as possible.
The following code should give you the WorksheetPage's in a stable order:
foreach(WorksheetPage wp in Project.WorksheetPages){ /* your code */}
------------------------------------------
Be The Change
You Want To See
In The World
------------------------------------------