eplisp

AutoCAD OVERKILL Command: Delete Duplicate Objects

Deletes duplicate overlapping objects and combines overlapping lines.

Command
OVERKILL
English name
Delete Duplicate Objects

The AutoCAD OVERKILL command deletes copies that sit exactly on top of each other within the objects you select. It cleans up drawings that were pasted twice by mistake, files from other programs and duplicates left behind after exploding blocks.

It does more than remove exact copies: it can also merge collinear lines that partially overlap. In the Delete Duplicate Objects dialog you set the tolerance, which properties to ignore when comparing, and how polylines are handled.

On the ribbon it is under Home tab > Modify panel (expanded) > Delete Duplicate Objects. The command-line version without the dialog is -OVERKILL.

How to use it

  1. Type OVERKILL and press Enter.
  2. Select the objects to clean up, or type ALL for the whole drawing, and press Enter.
  3. Check the Tolerance value in the Delete Duplicate Objects dialog.
  4. Check any properties to ignore when comparing objects, such as Color or Layer.
  5. Click OK; the number of objects removed is reported on the command line.

Options

Tolerance
The precision used to decide that two objects are identical; a larger value matches more objects.
Ignore object property
Objects count as duplicates even if the checked properties (color, layer, linetype and so on) differ.
Optimize segments within polylines
Also cleans up overlapping segments inside polylines.
Combine co-linear objects that partially overlap
Merges collinear lines that overlap into a single line.
Combine co-linear objects when aligned end to end
Merges collinear lines that meet end to end.
Maintain associative objects
Prevents associative objects, such as geometry tied to associative dimensions, from being deleted or changed.

Notes and tips

  • Save before running it; use U to undo if the result is not what you expected.
  • If Layer is ignored, one of two overlapping lines on different layers is deleted, so check which one remains.
  • OVERKILL does not look inside blocks; open a block with BEDIT to clean duplicates in it.