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
 Reorder worksheet layers doesn't work?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

cjbf

UK
8 Posts

Posted - 09/20/2008 :  10:18:40 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
I'd like to reorder two worksheet layers. In LabTalk, it seems that
book1!page.reorder(1,0) should move layer 1 to 0 (not sure whether layers count from 0 or 1, but I've tried both). But nothing happens.
In Origin C, I have written a function to swap layers:
bool myswaplayers(string WinName,int from,int to)
{Page page(WinName);
return page.Reorder(to,from);
}
but calling that from the script window as myswaplayers("Book1",1,0) has no effect, though with (only) these numbers it returns true.
Am I missing somethig or is there a bug, or is it not valid to do this for anything but a graph?
Thanks, Chris.

Deanna

China
Posts

Posted - 09/22/2008 :  10:47:30 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hi Chris,

We find out that page.reorder() is capable of changing the layer index numbers.

Maybe you are looking for a method to change the positions of the worksheets? We regret to say that this method cannot do that right now. We plan to improve this method so that it has an option to switch the positions of the layers in future. Maybe in future SRs.

Thank you for posting.

Deanna
OriginLab Technical Services
Go to Top of Page

cjbf

UK
8 Posts

Posted - 09/30/2008 :  07:39:48 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Thanks. I've found that book1!page.active=2 etc is actually what I needed when trying to specify column names without layer numbers.
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