eplisp

Explode All Blocks and Bind Xrefs (EXPLODETOTAL)

eplisp, the free multilingual LISP library

Explode All Blocks and Bind Xrefs (EXPLODETOTAL)
Openly licensed; the original file is hosted here together with its license.
…
Rate this tool:
CommandsEXPLODETOTALEXPLODETOTALSAFE
CategoryCleanup and Files
AuthorFauzan Alfi
Sourcefauzanalfi/cad-lsp-library
LicenseMIT
RequirementsAutoCAD (full version; not LT). Uses ActiveX methods to bind and explode; may also work in BricsCAD.
Prompt languageIndonesian
FilesEXPLODETOTAL.lsp (10 KB)
Added2026-10-26
Download the original fileSource repository

Binds all xrefs, unlocks every layer and explodes all blocks in the drawing, nested ones included, then purges; a safe mode keeps some blocks.

EXPLODETOTAL by Fauzan Alfi flattens a drawing completely. It is meant for cases where a recipient or another program needs plain geometry without any block or xref structure, for example before exporting to software that cannot handle blocks.

Overview

The command first binds every top-level xref (with name prefixes) and unlocks all layers. It then explodes every block reference in model space and all layouts, repeating the pass up to 50 times so that blocks nested inside blocks are also broken up, and finally runs PURGE All. Progress messages are printed in Indonesian.

EXPLODETOTALSAFE does the same binding and unlocking but does not explode block references that are in paper space, have attributes or are annotative, and it purges only unused block definitions. At the end it prints how many references it skipped for each reason.

How to use it

  1. Save the drawing and work on a copy.
  2. Load EXPLODETOTAL.lsp with APPLOAD.
  3. Type EXPLODETOTAL for full flattening, or EXPLODETOTALSAFE to keep attributed, annotative and paper space blocks.
  4. Wait until the passes finish, read the summary and check the drawing before saving.

Notes and limitations

  • Destructive by design: xrefs are bound, blocks are exploded and unused named objects are purged, with no confirmation. The command sets an undo mark, so U reverts it before saving.
  • All layers are left unlocked afterwards.
  • In full mode, exploding blocks that have attributes leaves the attribute definitions behind, which show their tag names instead of the values.
  • In safe mode, blocks nested inside a skipped block stay intact, and the skip counts add up over the repeated passes, so they can exceed the number of blocks.
  • Binding can fail for unloaded or unresolved xrefs; those are reported and skipped.
  • Prompts and messages are in Indonesian.
  • The repository was published in 2026; test on a copy of the drawing first.

Source and license

This tool is not made by eplisp. The file is published unchanged under its author's license; copyright stays with the author.

References

  1. Source repository: fauzanalfi/cad-lsp-library – https://github.com/fauzanalfi/cad-lsp-library/tree/385e7664b02bea6b5adaff7091689cc85fc16a52
  2. Author: Fauzan Alfi – https://github.com/fauzanalfi
  3. License: MIT – https://github.com/fauzanalfi/cad-lsp-library/blob/385e7664b02bea6b5adaff7091689cc85fc16a52/LICENSE

Found a mistake, or are you the author of this tool? Request a correction or removal