Jump to content
Jim Smith

Is there an easy way to create a Sheet Layer List?

Recommended Posts

The Report "Create a Sheet Layer List" only seems to work if one uses a Title block.

Is there another way to generate a List of Sheet Layers?

Share this post


Link to post

So this may not be the most elegant way, but by taking a screen grab of the Navigation Pallet, pretty quick & don't look too bad neither.

 

9_9 

Share this post


Link to post

Not that I know of.  It is one of the reasons we want to move to sheet borders - because they provide the ability to create sheet lists.   VW needs better set management tools.

Share this post


Link to post

One quick&nasty way is to place a tag object - eg a 'Locus' in a tag class eg 'Sheet-Included on List' on each Sheet.

Then run a Worksheet to List the Layer where these objects appear.

 

 

Edited by bcd

Share this post


Link to post

Try this script. Copy everything in the code block below.  Go to the Resource Manager and Create a New Resource of type Script. You will probably need to name both the Script Palette and Script. Paste the script code into the Script Editor window. Make sure it is set to be Vectorscript and click OK.

 

Double click on the script in the Script Palette to run it.

 

 

Procedure SheetLayers_to_Worksheet;
{Make a worksheet listing all of the sheet layers in a VW file}
{Lists both used and unused layers}
{The worksheet is named "Layers:"with and appended date}
{Sorts layers in alphabetical order prior to storing in worksheet}
{November 17, 2017}
{Based on a script originally written}
{March 19, 2015}

{ copyright 2017,2015,2010, 2008, Pat Stanford pat@coviana.com}
{Licensed under the GNU Lesser General Public License}

var	H1, H2:	Handle;
N1, N2:	LongInt;
LayerSort : Array[1..1024] of string;

Begin
	H2:=FLayer;
	N2:=1;

	While H2 <> nil do
		Begin
			If GetObjectVariableInt(H2,154)= 2 then
				Begin
					LayerSort[N2]:=GetLName(H2);
					N2:= N2 + 1;
				End;
			H2:=NextLayer(H2);
		End;

{Add Curly Braces (comment out) the next line to not sort the layers by name}
	SortArray(LayerSort,N2-1,0);  

	H1:=CreateWS(Concat('Layers:',date(2,1)),N2,2);
	For N1:= 1 to  N2-1 do SetWSCellFormula(H1,N1+1,1,N1+1,1,LayerSort[N1]);	

	SetWSCellFormula(H1,1,1,1,1,'Layers in File');
	
	ShowWS(H1,True);

End;

Run(SheetLayers_to_Worksheet);

 

Share this post


Link to post

Hi All,

 

Do you think it's possible to add another column to this script so that it lists the sheet title as well as the sheet number?

 

Thanks,
A

Share this post


Link to post

Try this.  You got lucky I didn't want to do real work on a Friday afternoon.  ;-)

 

Procedure SheetLayers_to_Worksheet;
{Make a worksheet listing all of the sheet layers in a VW file}
{Lists both used and unused layers}
{The worksheet is named "Layers:"with and appended date}
{Sorts layers in alphabetical order prior to storing in worksheet}
{November 17, 2017}
{Based on a script originally written}
{March 19, 2015}

{November 6, 2020  - Modified to include Sheet Name as well as Sheet Number}

{ copyright 2020, 2017,2015,2010, 2008, Pat Stanford pat@coviana.com}
{Licensed under the GNU Lesser General Public License}
Type
	PTS = Structure
	  LayerNum, LayerName :String;
	End;
	  
var	H1, H2:	Handle;
N1, N2:	LongInt;
LayerSort : Array[1..1024] of PTS;


Begin
	H2:=FLayer;
	N2:=1;

	While H2 <> nil do
		Begin
			If GetObjectVariableInt(H2,154)= 2 then
				Begin
					LayerSort[N2].LayerNum:=GetLName(H2);
					LayerSort[N2].LayerName:=GetObjectVariableString(H2,162);
					N2:= N2 + 1;
				End;
			H2:=NextLayer(H2);
		End;

{Add Curly Braces (comment out) the next line to not sort the layers by name}
	SortArray(LayerSort,N2-1,1);  

	H1:=CreateWS(Concat('Layers:',date(2,1)),N2,2);
	For N1:= 1 to  N2-1 do 
		Begin
			SetWSCellFormula(H1,N1+1,1,N1+1,1,LayerSort[N1].LayerNum);
			SetWSCellFormula(H1,N1+1,2,N1+1,2,LayerSort[N1].Layername);	
		End;

	SetWSCellFormula(H1,1,1,1,1,'Layers in File');
	
	ShowWS(H1,True);

End;

Run(SheetLayers_to_Worksheet);

 

  • Like 2

Share this post


Link to post

Awesome! Thank You, that saves so much work when browsing through older file sets. 

Any way to include the File name?

Share this post


Link to post

Untested, but try this, change this line near the bottom:  SetWSCellFormula(H1,1,1,1,1,'Layers in File');

 

to:

 

SetWSCellFormula(H1,1,1,1,1,Concat('Layers in File: ',GetFPathName);

 

HTH.

Share this post


Link to post

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
Reply to this topic...

×   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.


 

7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114

 

© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

×
×
  • Create New...