• Skip to main content
  • Skip to primary sidebar
  • Skip to footer
blog.draftsperson.net

blog.draftsperson.net

the art of technical drawing

blog.draftsperson.net

BLOCKPROMOTE LISP: Extract a Nested Block to Top Level

August 3, 2026

BLOCKPROMOTE pulls a nested block out to the top level. Pick a block that lives inside another block and it is extracted to become a block reference in its own right — landing in exactly the same place, at the same scale, rotation and orientation it appeared to have while nested. It is then removed from the parent definition.

What BlockPromote does

This is done for every reference of the parent block. If a detail block containing a nested north arrow is inserted forty times, all forty north arrows are promoted and each one lands correctly.

The usual reason is a block that should never have been nested: a north arrow, a scale bar, a revision cloud that now needs to be edited, moved or counted independently of the thing it was buried inside.

How to use it

  1. Load the routine with APPLOAD, or put it on your support file search path.
  2. Type BLOCKPROMOTE.
  3. Pick the nested block — the one inside another block.
  4. It is extracted at every reference of its parent, and removed from the parent definition.

How it works

This needs matrix maths, and the reason is worth seeing. A nested block’s stored position is expressed relative to the block that contains it — which may itself be nested inside another, and so on. Each level applies its own rotation, scale and displacement.

To find where the innermost block actually appears on the drawing, the transformation of every level has to be combined: walking outwards from the nested block to the space it is finally drawn in, multiplying the matrices and accumulating the displacements along the way. That combined transform is then applied to a fresh copy of the block placed at the top level.

Get any part of that wrong and the promoted block lands somewhere plausible but incorrect — which is much worse than landing somewhere obviously wrong, because nobody checks.

The limitations are reported at selection time, not hit later. All three cases below are checked up front and explained, rather than being allowed to fail part way through a run that has already modified some references.

Notes and limits

  • Blocks nested inside xrefs cannot be extracted. An xref’s contents belong to the referenced drawing, not to this one.
  • Blocks nested inside dynamic blocks cannot be extracted. A dynamic block’s geometry is generated per reference and has no stable definition to remove it from.
  • Non-uniformly scaled references are skipped rather than producing a distorted result.
  • The parent definition changes. The nested block is removed from it, so every reference of the parent loses it — which is the point, but it affects the whole drawing.

Download and details

NameBlockPromote — extract a nested block to the top level, correctly positioned
DownloadBlockPromote.lsp — 14.8 KB, plain AutoLISP source. Downloads directly; no zip to unpack.
TypeAutoCAD AutoLISP routine
CommandBLOCKPROMOTE
Requiresthe ActiveX layer (loaded automatically by the routine with vl-load-com).
Source size14.8 KB, 357 lines
Error handlingYes — a *error* handler restores every system variable it changed, on cancel as well as on error.
UndoThe whole operation is wrapped in a single undo group, so one U reverses all of it.
CompatibilityAutoCAD (any release with AutoLISP), BricsCAD, ZWCAD, GstarCAD, ProgeCAD and other IntelliCAD-based platforms. AutoCAD LT needs a LISP enabler. No .NET, no ObjectARX, no installer.
AuthorYZ, August 2026
LicenceFree to use, supplied “as is” with no warranty.

References

  • BLOCKABSORB LISP — the opposite job: add objects into a block definition
  • SMARTBURST LISP — explode blocks while keeping attribute values as text
  • FixBlock LISP — reset block entities to layer 0
  • More free AutoLISP routines on this site
  • Wisey’s Steel Shapes — free structural steel section drawing program

Filed Under: AutoLISP Routines

Primary Sidebar

Subscribe to our Youtube Channel

Post CAD drafting jobs on Freelancer.com. and get some free money to do this.

Categories

  • American Steel Industry (4)
  • AutoCAD Articles & Reference (30)
  • AutoCAD Bugs & Problems (19)
  • AutoCAD Tips (29)
  • AutoCAD Tutorials (54)
  • AutoLISP Routines (328)
  • AutoLISP Tutorials (15)
  • CAD Standards (7)
  • Civil 3D (7)
  • Civil Drafting (4)
  • Dimensions (2)
  • Drafting Funnies (71)
  • Drafting History (9)
  • Drafting Standards (84)
  • Electrical Drafting (2)
  • General IT reference (7)
  • Geometry (15)
  • GIS (2)
  • Hatch Patterns (12)
  • Office Life Hacks (3)
  • PT (1)
  • Revit Tutorials (54)
  • Steel Detailing (14)
  • Structural Drafting (26)
  • Technical Dictionary (61)
  • Useful Website Links (19)

Footer

Free downloads

  • Free AutoLISP routines
  • Free hatch patterns
  • SHX fonts & text styles
  • Numbering LISP collection
  • ISO 3098B font

Reference charts

  • AWS weld symbols chart
  • Steel detailing chart
  • Hole & slot sizes
  • Bolt edge distance
  • ANSI & ARCH paper sizes
  • How to fold an A1 drawing

Useful links

  • CAD blocks (DWG)
  • Revit families
  • structuraldrafter.com
  • cad-corner.com
  • About
  • Privacy policy

Provided for free with no warranty · Log in