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
 All Forums
 Origin Forum for Programming
 Forum for Origin C
 Rename a workbook layer

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
Rodolf Posted - 12/08/2008 : 10:10:40 AM
Origin Ver. and SR (Select Help-->About Origin): 8.0773
Operating System: Windows

Hi all,

How do you rename a workbook layer?

I know you can rename de window short name with

wkspage.Rename("Short name");

and the long name with

wkspage.Label= "Label name";

I would like to change the name of a layer i.e. what you can retrieve with

wks.GetName(_certain_string_variable_to_store_name_in_);

Thanks in advance
2   L A T E S T    R E P L I E S    (Newest First)
Rodolf Posted - 12/09/2008 : 03:45:26 AM
Thanks, worked like a charm.

I couldn't find it in the documentation, because I did not search the class tree at the OriginObject level, only to the Layer and PageBase level.

It would be nice if the people at OriginLab would also included all functions inherited from parents when you search the Help file for the contents of a class like Worksheet or WorksheetPage.
rlewis Posted - 12/08/2008 : 1:18:25 PM
Try something like ..

 void RenameWKS()
      {
      	WorksheetPage wP=Project.Pages(-1);
      	Worksheet Wks =wP.Layers(0);
      	if(Wks.IsValid()==true)
      	{
      		Wks.SetName("NewName");
      	}
      }

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000