Hi Andrea,how about this
;| ;;
Replace word in a layer ;;
By: Andrea Andreetti |;
(defun c:MCR (/ layer_list lfound ltell ls1 lr)
;(setq layer_list (ai_table "layer" 4))
(setq layer_list (table "layer"))
(setq lfound (getstring "Mot du calque à changer : "))
(setq ltell (getstring "Par le mot : "))
(foreach n layer_list
(setq ls1 (vl-string-search lfound n))
(if ls1
(progn
(setq lr (vl-string-subst ltell lfound n))
(vl-cmdf "_.-rename" "_LA" n lr)
)
)
)
)
(defun table (s / d r)
(while (setq d (tblnext s (null d)))
(setq r (cons (cdr (assoc 2 d)) r))
)
)