Message 1 of 4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi All,
I have a lisp I wrote which lets me use a selection window to list all the layers in a selected area of my drawing. A quick way for me to see if all the layers in a particular area are correct. One modification I would like is to add a counter behind each layer stating how many objects on each layer (e.g. "defpoints (10)") if there are 10 objects on the defpoints layer.
Not sure how complicated it would be to modify my code, or if I would need to rewrite the code to allow this functionality. Any help would be much appreciated.
(defun C:lli (/ ss n1 loop laylist isolayers layer n2 numlist stringlist listex) (princ "\nSelect objects to list used layers...") (if (setq ss (ssget)) (progn (setq n1 (sslength ss)) (setq loop 0) (setq laylist ()) (setq isolayers ()) (textscr) (progn (repeat n1 (setq layer (cdr (assoc 8 (entget (ssname ss loop))))) (if (not (member layer laylist)) (setq laylist (cons layer laylist))) (setq loop (1+ loop)) ) (setq laylist (acad_strlsort laylist)) ) (setq mylist laylist) (setq n2 (length laylist)) (setq numlist 0) (setq stringlist "\nSelected Layers...\n") (progn (repeat n2 (setq listext (nth numlist laylist)) (setq stringlist (strcat stringlist "\n " listext)) (setq numlist (1+ numlist)) ) ) (princ stringlist) ); END PROGN (princ "\nNo Entities Selected..") ); END IF (princ) )
Thanks,
Matt
Solved! Go to Solution.