ssget() user selects[QUOTE] then it takes that ss and divides it up into a selection set for each layer then it goes through each ss, creates the layer, assigns the layer goes to next ss does the same thing...[/QUOTE] I really don't know why anyone would do such a thing. but I offer the following advise. Create an association as each layer is first addressed. so for the first entity if (assoc layername the_list) yields nil, then this is a new layer and: set counter to 1 and (append (list (cons layername counter)) the_list) (set newlayer to (setanumber layername counter 3)) make said layer (command ".layer" "m" (setanumber layername counter 3) "c" whatevercoloryouwant "") move entity to that layer. if (assoc layername the_list)) then (setq counter (+ 1 (cdr (assoc layername the_list))) the_list (subst (cons layername counter)(assoc layername the_list) the_list);;;yada yada (typical subst thingy for association lists) (set newlayer to (setanumber layername counter 3));; 3 for 001 to 999, 4 for four digits etc ..I would set numdigits to be relevant to the nymber of layers, ie 10^5 entites, set numdigits to at least 5 for example. (set newlayer to (setanumber layername counter 3)) make said layer (command ".layer" "m" (setanumber layername counter 3) "c" whatevercoloryouwant "") move entity to that layer. now for this is one I use for all kinds of numbering schemes: (defun setanumber ( theprefix thenumber numdigits /) (if (< (strlen (itoa thenumber)) numdigits) (strcat theprefix (substr "00000000" 1 (- numdigits (strlen (itoa thenumber))))(itoa thenumber)) (strcat theprefix (itoa thenumber)) ) ) or in the code above use: (command ".layer" "m" (setanumber layername counter 3) "c" whatevercoloryouwant "") you don't need subsets or anything like that just grab the entities and go to town. Jamie Duncan