Jump to content
  • 0

Batch Rename Looks at Sheet Layer Numbers - Not Names


Tom Klaber

Question

I wanted to capatalize all my sheet layer names, and was happy to remember the Batch Rename tool - that would save me a bunch of time.  But when I went to use it, it seems the only thing I can do with sheet layers is batch rename the sheet layer Numbers.  While this could be useful for adding prefixes, it would be great if we could also batch rename sheet layer titles as well. 

Link to comment

2 answers to this question

Recommended Posts

  • 0

I think this script will do what you want. Not as nice as having it in Batch Rename, but still possibly useful.

 

Procedure UppercaseSheetLayers;
{April 21, 2020}
{©2020 Patrick Stanford pat@coviana.com}
{Licensed under the GNU Lesser General Public License}

{Changes the name of all Sheet Layers in a file to UPPERCASE}
{Can be undone immediately after running script}
{No warranty expressed or implied. Use at your own risk.}
{Consult your doctor if use of this script lasts for more}
{than 4 hours.}

	
Function WalkList(H1:Handle) :Boolean;
Begin
	If GetObjectVariableInt(H1, 154)=2 then 
		Begin
			S1:=GetObjectVariableString(H1, 159);
			UprString(S1);
			SetObjectVariableString(H1,159, S1);
		End;
End;

Begin
	ForEachObjectInList(WalkList,0,0, FLayer);
	SetPaletteVisibility('Navigation', False);
	SetPaletteVisibility('Navigation', True);
End;

Run(UppercaseSheetLayers);

 

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...