What is wrong in the code? I am trying to set the Z position value to zero for all the blocks in the drawing;
(defun c:B0()
(setq myFilter(list (cons 0 "INSERT")))
(setq ss (ssget "_X" myFilter))
(setq l (sslength ss))
(setq i 0)
(Repeat l
(setq blk (ssname ss i))
(setq DXF (entget (car blk)))
(setq IP (cadr (assoc 0 dxf)))
(setq NewIP (subst "0" (caddr IP) IP))
(setq NewDXF (subst NewIP IP DXF))
(entmod NewDXF)
)
)