[Search tip detail and code files using keywords, tip number, author name, etc ]
 
Export Layer Properties to a Spreadsheet
Tip# 3882 By Danny Korem On 07-May-2012
0
Rated By 0 users
Categories : Layer Properties
Software type : AutoCAD 2013
Rename File To : No Files to download.
Create an Excel spreadsheet out of your Layer Properties Manager.

Frequent tipster Danny Korem explains how to export AutoCAD layer properties to a spreadsheet.

"With this method, you can create an Excel spreadsheet out of your Layer Properties Manager to distribute to the design team. With CAD standards, prototyping plays a very significant role, and establishing layers according to the project standard might be the most important part. Whenever layer names are not totally explicit, the description column becomes your hero. You might opt to look for external project documentation as well; here's how to extract it and edit it later.

"While in the DWG file, open the Layer Properties Manager. Right-click on a line and choose the Select All option (if you do so from a file that has attachments, don't opt for Select All; instead, make your selection by holding down the Shift/Ctrl buttons and picking each layer you need). Once the selection has been made, press Ctrl+C — you won't be able to copy otherwise, because this is not an option offered out of the box. Open Excel and paste the data into a spreadsheet. Here are some notes to remember:

  1. Create the header by inserting a line above the matrix.
  2. You may remove irrelevant columns (or fold the spreadsheet and hide them), add columns, and manipulate as you need to.
  3. Usually it's best to make the description column the first one, so you can find the layer and its usage. 
  4. You may want to divide the list to short subdivisions divided by context in the case of a large number of layers.
  5. I'll add a column stating the objects that would be accepted in a specific layer (e.g., polyline, block, mtext, etc.).
  6. This might be the best part: You can select the spreadsheet and use Paste Special to insert it back into the CAD environment, then add an object in the specific layer to the left of each row in the table. If the object is 'right,' all one has to do is click on it, right-click to opt for Add Selected, and get best (standard) results."

Notes from Cadalyst Tip Reviewer Brian Benton: In AutoCAD, layers are king: They rule the way your drawing will be displayed, and they control the content. Establishing a standard layering system is vital for producing consistent drawings throughout your company. It also makes it easier to work with your coworkers' files. Exporting your layering system to a spreadsheet is a great way to describe it to your CAD users. New hires will find it invaluable when learning your system. It also helps when reviewing your CAD standards.

 

 

Average Rating:
0


User comments
Comment by Tulis,Ralph
Posted on 2012-05-07 15:21:19
Now if there was an easy way to make this bi-directional ...
Comment by Ameen,Mohammed
Posted on 2012-05-08 02:56:07
This plugin from Autocad Labs can be used to generate a report of the layers used within an AutoCAD drawing (Autocad 2007 & later). The report formatting can be customized to the needs of the user and these settings will be applied when the tool is used on other drawings, reducing the effort required to generate other such reports. Click on the link & follow instructions to download http://labs.autodesk.com/utilities/layer_reporter/
Comment by Glynn,Shaun
Posted on 2012-05-08 07:27:20
I can recommend this tip to anyone as I have been using this method to record the settings since 2006. So much so that I created a template file. The top line of the Excel sheet carries a reminder of what to do:- “From Layer Properties Manager in AutoCAD, copy the required layers and their settings information (CTRL+A for all and CTRL+C) then paste (CTRL+V) the copied list at cell A3. Replace TRUE with Yes & FALSE with No” The second line contains the headings:- Blank-Layer Name-On-Freeze-Locked-Colour-Line Type-Line Weight-Plot Style-Plot-Current VP Freeze-New VP Freeze The headings (apart from “Blank”), along with a number of lines beneath, have grid lines. Once the formatting is complete I “Save as” to leave the original ready for next time.
Comment by nemirovsky,len
Posted on 2012-05-08 11:01:21
For the same purpose I did write a simple lisp routine ALIST.LSP back in 2001 (see attached, or search Hot Tip Harry for it). Load it (or make it load automatically), tuype ALIST at command prompt and Excel file is created on c: of your computer.
Comment by nemirovsky,len
Posted on 2012-05-08 11:04:18
(defun c:alist (/ nm lnm llnm nam name opf ln lname color ltype lna lnamea colora ltypea) (setq nm (getvar "dwgname")) (setq lnm (strlen nm)) (setq llnm (- lnm 3)) (setq nam (substr nm 1 llnm)) (setq name (strcat nam "csv")) (setq opf (open name "w")) (setq ln (tblnext "layer" T)) (setq lname (cdr (assoc 2 ln))) (setq color (cdr (assoc 62 ln))) (setq ltype (cdr (assoc 6 ln))) (setq stat (cdr (assoc 70 ln))) (cond ((= stat 1)(setq state "FROZEN")) ((= stat 2)(setq state "FROZEN IN NEW VPORT")) ((= stat 4)(setq state "LOCKED")) ((< color 0)(setq state "OFF")) ((>= color 0)(setq state "ON")) ) (write-line "Layer Name,Color,Linetype,Condition" opf) (write-line (strcat lname "," (rtos (abs color) 2 0) "," ltype "," state) opf) (while (setq lna (tblnext "layer")) (setq lnamea (cdr (assoc 2 lna))) (setq colora (cdr (assoc 62 lna))) (setq ltypea (cdr (assoc 6 lna))) (setq stata (cdr (assoc 70 lna))) (cond ((= stata 1)(setq statea "FROZEN")) ((= stata 2)(setq statea "FROZEN IN NEW VPORT")) ((= stata 4)(setq statea "LOCKED")) ((< colora 0)(setq statea "OFF")) ((>= colora 0)(setq statea "ON")) ) (write-line (strcat lnamea "," (rtos (abs colora) 2 0) "," ltypea "," statea) opf) ) (close opf) (alert (strcat "File " name " created in current folder")) (princ) )