Discussion:
Layer Legend Lisp ?
(too old to reply)
Walt Engle
2004-08-27 19:07:50 UTC
Permalink
What you want is an ACAD.LSP routine that sets up all layers with
colors, linetypes, etc.
If you want, I can send one to you and you can edit as you see fit.
Tom Smith
2004-08-27 20:10:00 UTC
Permalink
Don't know of a lisp to do that, but there's a tip at http://www.afralisp.com/tips.htm which shows how to generate a list of all layer names:

(defun tablelist (s / d r)
(while
(setq d (tblnext s (null d)))
(setq r (cons (cdr (assoc 2 d)) r))))

Example (setq all_layers (tablelist "LAYER"))

This might be a starting point. The 2 group is the layer name -- you could generate the other info from other group codes, then figure out how to put that in a table.

Long ago (R11 or so) in an office that refused to standardize layers or even plotting methods, I used to do something sorta similar. Kept a block in the drawings whose attributes represented responses to PLOT command prompts. Had a lisp which extracted the info and fed it to the command, so in effect the plotting configuration was stored in the drawing.
Miles
2004-08-27 20:19:09 UTC
Permalink
Thanks, however, what I am looking for is similar to Dotsofts Layer Legend
Generator. For whatever reasons, our clients insist on having a table in
AutoCAD (not OLEd from Excel) that contains all the layers, properties, etc.
What you want is an ACAD.LSP routine that sets up all layers with colors,
linetypes, etc.
If you want, I can send one to you and you can edit as you see fit.
R.K. McSwain
2004-08-27 21:30:22 UTC
Permalink
Post by Miles
Thanks, however, what I am looking for is similar to Dotsofts Layer Legend
Generator. For whatever reasons, our clients insist on having a table in
AutoCAD (not OLEd from Excel) that contains all the layers, properties, etc.
I guess you do not have Dotsoft's ToolPac?
It includes a 'Layer Legend Generator' that outputs to either your browser (HTML) or the drawing (AutoCAD Entities).
Loading...