(defun tt (/ ent res count)
(setq ent (vlax-ename->vla-object (car (entsel)))
count 0
) ;_ end of setq
(while (< count 91)
(vla-put-entitytransparency ent count)
(setq res (cons (cons count (cdr (assoc 440 (entget (vlax-vla-object->ename ent))))) res)
count (1+ count)
) ;_ end of setq
) ;_ end of while
(append '(("bylayer" . 0) ("byblock" . 16777216))
(mapcar (function (lambda (x) (cons (itoa (car x)) (cdr x))))
(vl-sort res '(lambda (a b) (< (car a) (car b))))
) ;_ end of mapcar
) ;_ end of append
) ;_ end of defun