When I try to run the lisp routine posted below I get the following in my command line: ; error: too many arguments.
To be clear I am very new at writing lisp routines. I have been, and am still in the process of, learning as much as I can from various websites and reference/help files published by AutoDesk. This being said when viewing the code below (yes, I am aware that it is quite possibly horrible and that even if it did run might not accomplish what I am after) my main concern is why am I getting the too many arguments error.
I am vaguely aware that it has something to do with the way I have constructed the lisp (almost like a script) but, although I am at the moment reading through the AutoCAD help files I haven't been able to quite understand where I went wrong.
And lastly, since anyone who might be willing to help will probably see the code below and wonder what in the world I am trying to accomplish... I have a large number of dxf files created from a 3d model that have to go out to the fabrication shop where I work. When the software I am using (Advance Steel) creates the dxf files it shows two views of the part and creates duplicates as well. Therefore I need to go into each drawing delete 3 views and keep one along with the mtext that shows the part number. And finally I have to mirror the part and then move on to the next drawing. I am trying to eliminate the time it takes to open each drawing and clean it up one by one. The reason I am using (entnext) is because every entity in the drawing aside from the one line of text is a polyline on the same layer, color, etc. I realize there is probably a better way to go about this and I would be delighted if someone could help but the main thing is to understand where I have gone wrong in my structuring of the code.
Thanks for any help that anyone can lend.
(defun c:DXFCleanup (/ ss1 e1 e2 e3)
(setq ss1 (ssget "X"))
(setq e1 (entnext))
(setq e2 (entnext e1))
(setq e3 (entnext e2))
(ssdel e2 e3 ss1)
(command ".erase" ss1 "")
(command "setvar" "mirrtext" "0")
(command "select" "all" "mirror" "0,0" "60,0" "y" "")
)