Jump to content

Classes and Layers List


Recommended Posts

 

 

The attached scripts will put a list of all classes and all layers (both Design Layers and Sheet Layers) Into worksheets.

 

Procedure Classes_to_Worksheet;

{©2023  Pat Stanford - pat@coviana.com}
{licensed under the Boost Software License 1.0}
{https://github.com/boostorg/boost/blob/master/LICENSE_1_0.txt}
{TL/DR Use as you want, attribution for source, No warranty}

var		H1:	Handle;
		N1:	LongInt;

Begin
	H1:=CreateWS(Concat('Classes:',date(2,1)),Classnum+2,2);
	
	For N1:= 1 to Classnum do
			SetWSCellFormula(H1,N1+1,1,N1+1,1,ClassList(N1));	
		
	SetWSCellFormula(H1,1,1,1,1,'Classes in File');
	ShowWS(H1,True);

End;

Run(Classes_to_Worksheet);
	

 

 

Procedure Layers_to_Worksheet;

{©2023  Pat Stanford - pat@coviana.com}
{licensed under the Boost Software License 1.0}
{https://github.com/boostorg/boost/blob/master/LICENSE_1_0.txt}
{TL/DR Use as you want, attribution for source, No warranty}

var		H1,H2:	Handle;
		N1:		LongInt;
		S1:		String;

Begin
	H1:=CreateWS(Concat('Layers:',date(2,1)),NumLayers+2,2);
	
	H2:=FLayer;
	N1:=1;
	While H2<>Nil DO
		BEGIN
			S1:=GetLName(H2);
			SetWSCellFormula(H1,N1+1,1,N1+1,1,S1);
			N1:=N1+1;
			H2:=NextLayer(H2);
		End;
		
	SetWSCellFormula(H1,1,1,1,1,'Layers in File');
	ShowWS(H1,True);

End;

Run(Layers_to_Worksheet);
	

 

 

  • Like 1
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
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.

×
×
  • Create New...