Hi PonuryGrzybiarz
try this...
(defun c:test( / lc)
(princ "\nSelect one object in the LAYER to be current ")
(setq lf (cdr (assoc 8 (entget ( car (entsel))))));;<-- dxf 8 is the layer, In your exemple it was (8 . dim)
(princ "\n")
(command "Layer" "s" lf"")
(PRINC)
)
Cheers
Henrique