The command OVERKILL in AutoCAD is useful in removing overlapping objects but some times you just want it to do its thing and move on without worrying about its settings.
The Script today could be a starting point for you to automate this task.
For example, you might want to have the OVERKILL command run and clean up everything that is overlapping no matter their layer or color settings and maybe another time you would like to run the OVERKILL command and have it only “optimize polylines” where it removes extra vertices… Well, with a script, you can easily set these settings and have these various scripts on hand and run the specific script as needed.
Click here to download these OVERKILL script that uses the default values: https://docs.google.com/file/d/0B_y9I236zHwON01aR2kxRjYtZ3c/edit?usp=sharing
~enjoy
flag set, it returns the number of lines. This allows you to chain a number of commands together.