ok, first off, in the block turn the annotative tag off, make the leader style annotative instead, you can not use annotative blocks inside of mleaders, the annotative option on the leader style will take care of that.
(DEFUN C:mech () ; Mleader with Loop
(setq OldAttreq (getvar "attreq")); This will allow you to restore attreq when you are done.
(command "._insert" "K:/settings/AnnoDims.dwg" "0,0" "" "" "")
(setq BNAME "EquiptagA"); Setting the block name here will allow you to greater flexibility with this routine, for example I created a similar object as a funcion that I can pass all sorts of variables to.
(setvar "attreq" 0); Makes sure that if there is any attributes that you do not need to fill them in.
(vl-cmdf "._layer" "M" BNAME "C" "2" BNAME ""); Modified this to create a layer based off of the Block Name
(vl-cmdf "._insert" (strcat "K:\\menu\\annoblocks\\" BNAME) "0,0" "" "" "" ""); I generally have better luck with the \\ than the / for some reason, I have also modified this to use the BNAME variable as set earlier.
(vl-cmdf "._erase" (entlast) ""); Erases the last entity inserted, as it is no longer needed.
(vl-cmdf "._layer" "M" (strcat "Leader " BNAME) "C" "White" (strcat "Leader " BNAME) ""); Again by using the bname variable that was set earlier you will be able to customize this routine very quickly in the future.
(vl-cmdf "._cmleaderstyle" "Anno Leader" ); Sets the leader style
(setvar "attreq" 1); Ensures that Mleader will prompt you for all of the needed attributes
(vl-cmdf "._mleader" "O" "C" "Block" BNAME "X" "L" "h"); Calls the mleader command
(setvar "attreq" OldAttReq); Restores attreq back to what it was when you started the command.
)
I have recently been made aware that the vl-cmdf is preffered over command.
Pasting this into the visual lisp editor should make the comments stand out nicely for you, hopefully you can learn a bit more about LISP at the same time, so that the next time you need to write LISP it will be a bit easier for you, I am always learning something new.