Layer definition export to spreadsheet
Hello,
I 'm having issues trying to export layer text contents to a spreaddsheet. I select all the layer but the program refuses to copy / cut the text content of the layers.
Is there a way I can solve this without having to insert text by hand on excell?
Thanks,
Samuel
Comments
-
Here is some Lisp code to export all layer names to a text file. Copy-pasting from this file to Excel should be no problem.
(defun KGA_Data_FileWrite (fnm lst / ptr) (if (setq ptr (open fnm "w")) (progn (write-line (KGA_String_Join lst "\n") ptr) (close ptr) T ) ) ) (defun KGA_String_Join (strLst delim) (if strLst (apply 'strcat (cons (car strLst) (mapcar '(lambda (str) (strcat delim str)) (cdr strLst)) ) ) "" ) ) (defun c:ExportLayerNames ( / fnm) (if (setq fnm (getfiled "Text file" "" "txt" 5)) (KGA_Data_FileWrite fnm (mapcar 'vla-get-name (vle-collection->list (vla-get-layers (vla-get-activedocument (vlax-get-acad-object))) ) ) ) ) (princ) )
0 -
Hi,
thank you so much Mr. Roy.Is there a way to export all layer definition, like: line type / line weight / plot style / etc?
Thank you once again for your kind assistence.
Samuel
0 -
You can get a chart of layer names, states, linetypes, colors, and lineweights to appear on the text screen by using the -Layer command and the "?" option. Then you can copy and paste from the text screen to a text or spreadsheet file. But that chart won't include plot style.
0 -
@Anthony Apostolaros:
I didn't know about that feature. Thanks for the tip.0 -
Oh my lord... that's amazing! Thank you both so much for your help.
My most appreciated regards.
Thank you.
Samuel0