Why won't this simple script run?

When I run this script across multiple files,
it stops when it encounters a drawing that
already has the block named "arrw-1"
which it then redefines:
(if
(/= (tblsearch "block" "arrw-1") nil)
(command ".-insert" "arrw-1=" "y" "0,0" "" "" "" "" "erase" (entlast) "" "qsave")
()
)
;;;;I have also tried this:
(if
(/= (tblsearch "block" "arrw-1") nil)
(command ".-insert" "arrw-1=" "y" (command) "qsave")
()
)
...and many other variations. No matter what,
if it redefines the block, the script stops and does not
process the next drawing.
Aaron
Reply to
Phych
Loading thread data ...
I found my solution. I don't kn ow why it works, but, this did it (where "?" is the name of the block I'm redefining and _Path is the path):
(if (/= (tblsearch "block" "?") nil) (Progn(command ".-insert" "?=c:/_Path"/?.dwg" "y" "1" "0,0" "" ^C) (entdel(entlast)) (command "qsave")) () )
Reply to
Phych

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.