See the top rated post in this thread. Click here

Results 1 to 5 of 5

Thread: Export the contents of the Layer Manager

  1. #1
    Member
    Join Date
    2003-12
    Posts
    3
    Login to Give a bone
    0

    Default Export the contents of the Layer Manager

    Certain municipalities require a layer list when submitting digital files. With AutoCAD having a description column in the layer properties manager, I'm looking for a way to export this table to either excel, word or any other file format that can be printed and submitted. I used to use a routine from DotSoft.com called layerhtm, but it doesn't include the description column.
    Any suggestions??
    Thanks in advance to anybody that can help.

  2. #2
    Mod / Salary / SM Wanderer's Avatar
    Join Date
    2001-12
    Location
    St. Louis
    Posts
    5,406
    Login to Give a bone
    0

    Talking Re: Export the contents of the Layer Manager

    Quote Originally Posted by jeffl.63037
    Certain municipalities require a layer list when submitting digital files. With AutoCAD having a description column in the layer properties manager, I'm looking for a way to export this table to either excel, word or any other file format that can be printed and submitted. I used to use a routine from DotSoft.com called layerhtm, but it doesn't include the description column.
    Any suggestions??
    Thanks in advance to anybody that can help.
    I'm going to move this from the tips & tricks forum to this one, as I believe it will be better served here, thanks.
    Melanie Stone
    @MistresDorkness

    Archibus, FMS/FMInteract and AutoCAD Expert (I use BricsCAD, Revit, Tandem, and Planon, too)
    Technical Editor
    not all those who wander are lost

  3. #3
    The Silent Type Mike.Perry's Avatar
    Join Date
    2000-11
    Posts
    13,656
    Login to Give a bone
    0

    Default Re: Export the contents of the Layer Manager

    Hi

    Take a look at the following thread...

    Exporting layer info to excel or text file

    Please note, routines found in the above referenced thread will more than likely require a little bit of editing from yourself - thus achieving the results you are after.

    Have a good one, Mike

  4. #4
    Administrator rkmcswain's Avatar
    Join Date
    2004-09
    Location
    Earth
    Posts
    9,803
    Login to Give a bone
    0

    Default Re: Export the contents of the Layer Manager

    Quote Originally Posted by jeffl.63037
    or any other file format that can be printed and submitted. I used to use a routine from DotSoft.com called layerhtm, but it doesn't include the description column.
    Try this. It will output to a CSV file.

    Code:
    Sub Layerlist()
    Dim fn As String
    Dim ff As Integer
    Dim item As IAcadLayer2
    Dim color As AcadAcCmColor
    Dim myLayer As AcadLayer
    Dim xStr As String
    
    fn = "c:\layerlist.csv"
    
    Open fn For Output As #1
    
    Print #1, "Name,On,Freeze,Lock,Color,Linetype,Lineweight,Plot,Description"
    
    For Each myLayer In ThisDrawing.Layers
        
      xStr = myLayer.name & Chr(44)
      
      If myLayer.LayerOn = True Then
        xStr = xStr & "ON" & Chr(44)
      Else
        xStr = xStr & "OFF" & Chr(44)
      End If
        
      If myLayer.Freeze = True Then
        xStr = xStr & "FROZEN" & Chr(44)
      Else
        xStr = xStr & "THAWED" & Chr(44)
      End If
      
      If myLayer.Lock = True Then
        xStr = xStr & "LOCKED" & Chr(44)
      Else
        xStr = xStr & "UNLOCKED" & Chr(44)
      End If
          
      Dim tmp As String
      Dim colidx As String
      Dim R As Integer, g As Integer, b As Integer
      Set col = myLayer.TrueColor
      If col.ColorMethod = acColorMethodByACI Then
        colidx = col.ColorIndex
      Else
        colidx = col.red & "/" & col.green & "/" & col.blue
      End If
    
      xStr = xStr & colidx & Chr(44)
      xStr = xStr & myLayer.Linetype & Chr(44)
      xStr = xStr & Format((myLayer.Lineweight * 0.001), "0.000") & Chr(44)
        
      If myLayer.Plottable = True Then
        xStr = xStr & "PLOT" & Chr(44)
      Else
        xStr = xStr & "NOPLOT" & Chr(44)
      End If
        
      xStr = xStr & myLayer.Description
        
      Print #1, xStr
        
      Next myLayer
    
    Close #1
    End Sub
    R.K. McSwain | CAD Panacea |

  5. #5
    Member
    Join Date
    2003-12
    Posts
    3
    Login to Give a bone
    1

    Default Re: Export the contents of the Layer Manager

    Thanks to all who responded. I didn't get around to trying any of the suggestions, as I found a simple one by just highlighting all items in the layer properties manager, entering CTRL C and pasting into excel. It was that easy. A little formatting and I've got a presentable list to submit with digital files.

Similar Threads

  1. Export a "report" of the Civil 3D Toolspace contents
    By Wish List System in forum Civil 3D Wish List
    Replies: 1
    Last Post: 2014-08-07, 09:50 PM
  2. Revit : Export Template Contents
    By rstilleson in forum Revit - API
    Replies: 0
    Last Post: 2009-06-18, 04:04 AM
  3. Replies: 2
    Last Post: 2007-03-21, 05:13 PM
  4. Export of Print contents of CTB files
    By caphillips in forum AutoCAD General
    Replies: 4
    Last Post: 2006-09-12, 12:48 PM
  5. Export / Print the contents of a Plot Style Table (CTB or STB)
    By Mike.Perry in forum AutoCAD FAQ (Read only)
    Replies: 0
    Last Post: 2005-04-02, 05:28 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •