(defun c:chbk ()
   (graphscr)
   (prompt "\nEntities to be changed:")
   (setq
     e1 (ssget)
     e2 (entsel "\nTarget block")
   )
   (if (and e1 e2)
     (progn
       (setq e2 (assoc 2 (entget (car e2))))
       (setq i 0)
       (repeat (sslength e1)
         (setq e4 (entget (ssname e1 i)))
         (setq e5 (assoc 2 e4))
         (setq e4 (subst e2 e5 e4))
         (entmod e4)
         (setq i (1+ i))
       );repeat
       (princ "\nAll selected enities change to block: ")
       (princ (cdr e2))
     );progn
   );if
   (princ)
)
