MattG Posted April 5, 2021 Share Posted April 5, 2021 I know I've seen this before and cannot find it for the life of me. I'm trying to make a report of all my sheet layer numbers and titles. What database record/fields would I use for that? This is not the drawing border option. Thanks, Matt Quote Link to comment
ScottLebsack Posted April 5, 2021 Share Posted April 5, 2021 Assume you're making something like a sheet index, if you are using title blocks, there will be a record associated. My indexes use Record: Sheet Data:Sheet Title (='Title Block Sheet Data'.'Sheet Title' ) and Record:Sheet Data, Sheet Number (='Title Block Sheet Data'.'Sheet Number') 1 Quote Link to comment
MattG Posted April 5, 2021 Author Share Posted April 5, 2021 Yes on a index, no on the title block for this particular thing. That is where I am stumbling. I have done the above before but without too much explanation I'm not doing that here. Hoping to just get the actual Sheet Layer fields out. Matt Quote Link to comment
ScottLebsack Posted April 5, 2021 Share Posted April 5, 2021 (edited) Were I tackling the same issue, I would copy my title block and alter the layout to eliminate most of the linework - you could then place it outside the printable area? Edited April 5, 2021 by ScottLebsack Quote Link to comment
Pat Stanford Posted April 5, 2021 Share Posted April 5, 2021 I am pretty certain I have scripted this before. I can't find it just now. I will look closer tonight. Quote Link to comment
MattG Posted April 5, 2021 Author Share Posted April 5, 2021 @ScottLebsack Yep totally doable just more curious now to what that actually is because I'm sure that info is accessible somehow. Thanks @Pat Stanford Matt Quote Link to comment
Pat Stanford Posted April 6, 2021 Share Posted April 6, 2021 Try this script. I don't think there is an "automatic" way to get this to update. You will have to run the script again. It is a slight modification of the one found in this thread: 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} {April 5, 2021 - Modified to not duplicate the sheet number by using Substring} { copyright 2021, 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,Substring(LayerSort[N1].Layername,'[]',2)); End; SetWSCellFormula(H1,1,1,1,1,'Layers in File'); ShowWS(H1,True); End; Run(SheetLayers_to_Worksheet); Quote Link to comment
Recommended Posts
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.