Version 3.
I need some help I know its a mapcar task but that's something I am not real good at. I have in past just used a get next and does not match, I am sure its been answered before but could not find.
So I have a list ((layer entityname)(layer entityname)(layer entityname) ..)
What I want is ((entityname entityname….)(entityname ….)(entityname ….)) so for this task have 3 layers and 14 entities the new list is 3 items entities by layer name
(("0" <Entity name: 2279faf91f0>) ("0" <Entity name: 2279faf91e0>) ("0" <Entity name: 2279faf91d0>)………...
(defun c:fbl2 ( / fr ent lyr rad ss a lst)
(setq lst '())
(setq fr (getvar 'filletrad))
(initget 6)
(setq rad (cond ( (getreal (strcat "\nEnter Fillet Radius <" (rtos fr) "> : "))) (fr)))
(if (/= rad fr) (setvar 'filletrad rad))
(setq ss (ssget '((0 . "LINE"))))
(setq lst '())
(repeat (setq x (sslength ss))
(setq ent (ssname ss (setq x (- x 1))))
(setq lay (cdr (assoc 8 (entget ent))))
(setq lst (cons (list lay ent) lst))
)
(setq lst (vl-sort lst '(lambda (x y) (< (car x)(car y)))))
; need new list here
; (foreach newlist make plines and fillet
)