My 5 cent
(defun c:LLD () (c:LayerLegend))
(defun c:LayerLegend ( / df i l ln p1 pt sp DSC ENT NM ) ;; Lee Mac 2011
(vl-load-com)
(if
(and
(setq pt (getpoint "\nSpecify Point for Legend: "))
(setq ln (* 100 (getvar 'TEXTSIZE))) ;(getdist "\nSpecify Length of Lines: " pt))
(setq pt (trans pt 1 0))
(setq i -1)
(setq sp (* 2.5 (getvar 'TEXTSIZE)))
)
(while (setq df (tblnext "LAYER" (null df)))
(if (/= 16 (logand 16 (cdr (assoc 70 df))))
(setq l (cons (cdr (assoc 2 df)) l))
)
(setq l (acad_strlsort l))
))
(foreach n l
(setq ent (vlax-ename->vla-object (tblobjname "LAYER" n)))
(setq dsc (vlax-get-property ent 'Description))
(setq nm (vlax-get-property ent 'name))
(setq lc (itoa (vla-get-color ent )))
(entmakex (list
(cons 0 "LINE")
(cons 8 n)
(cons 6 "ByLayer")
(cons 62 256)
(cons 10
(setq p1 (polar pt (* 1.5 pi) (* (setq i (1+ i)) sp)))
)
(cons 11 (polar p1 0. ln))
(cons 370 -1)
)
)
(entmakex (list (cons 0 "TEXT") ;***
(cons 1 (strcat n " : " lc " : " dsc)) ;* (the string itself)
(cons 6 "BYLAYER") ; Linetype name
(cons 7 (getvar 'TEXTSTYLE)) ;* Text style name, defaults to STANDARD, not current
(cons 8 n) ; layer
(cons 10 p1) ;* First alignment point (in OCS)
(cons 11 p1) ;* Second alignment point (in OCS)
(cons 39 0.0) ; Thickness (optional; default = 0)
(cons 40 (getvar 'TEXTSIZE)) ;* Text height
(cons 41 1.0) ; Relative X scale factor, Width Factor, defaults to 1.0
(cons 62 256) ; color
(cons 71 0) ; Text generation flags
(cons 72 0) ; Horizontal text justification type
(cons 73 1) ; Vertical text justification type
(cons 210 (list 0.0 0.0 1.0))
(cons 370 -1)
)))
(princ)
)