Thanks to Lynn Allen on her recent video posting on a reminder on how to "Print a List of Your Layers" at http://www.cadalyst.com/video
Open Layer Manager, select All Layers (Ctrl-A), Copy all layers with Ctrl-C. Open Notepad or actually Excel is better and Paste.
OR
Enter -Layer at the command prompt, type ?, then *, and copy layer listing from Text Screen.
@Anonymous wrote:
How can I extract all layers in an open drawing to a notepad or txt file? TIA
If you just want the Layer names written out to a file, here's one way:
(defun C:LLTF (/ lay); = Layer List To File
(setq LLF (open "X:/Your/File/Path/And/Filename.txt" "w"))
(while (setq lay (tblnext "layer" (not lay)))
(write-line (cdr (assoc 2 lay)) LLF)
); while
(close LLF)
); defun
Mondo,
Try this lisp from my code library
Change to display properties as you need
~'J'~
Kent1Cooper wrote:
....
If you just want the Layer names written out to a file, here's one way:
....
You can have it include more information about the Layer, if you want. For example, to put the values for:
LayerName ColorNumber Linetype
on each Layer's line in the resulting text file, do this:
(defun C:LLTF (/ LLF lay); = Layer List To File
(setq LLF (open "X:/Your/File/Path/And/Filename.txt" "w"))
(while (setq lay (tblnext "layer" (not lay)))
(write-line
(strcat
(cdr (assoc 2 lay)) " " ; name
(itoa (cdr (assoc 62 lay))) " " ; color
(cdr (assoc 6 lay)); linetype
); strcat
LLF
); write-line
); while
(close LLF)
); defun