Function Syntax: Delete2Layouts / _Delete2Layouts Version: 1.1 Date: 20.06.2026 6:38:55PM https://www.cadtutor.net/forum/topic/10119-delete-all-layouts-except-current/ https://www.lee-mac.com/deletefromlayouts.html Description 🗑️ Delete2Layouts is an AutoCAD AutoLISP tool for deleting a picked block or xref reference from selected Paper Space layouts. 🗂️ It is optimized for large layout sets where the same title block, viewport marker, legend, xref, or sheet object must be removed from multiple tabs. Function Syntax 🚀 Main command: Delete2Layouts 🔁 Alias command: _Delete2Layouts SEO Optimized Overview 🔎 This AutoCAD delete block from layouts tool helps clean paper-space sheets by removing repeated block or xref INSERT references from selected layouts only. 📋 The dialog allows the user to pick one block/xref reference, filter target layout names with wildcard patterns, and select exactly where deletion should happen. 🧱 The deletion engine scans each selected layout block, finds matching INSERT objects by name, and deletes them through ActiveX. 🧹 After deleting matching layout references, the routine attempts to purge the selected block name. Dialog Features 📌 Button to pick a block or xref reference from the drawing. 🔍 Layout filter field supporting * and ? wildcards. ✅ Select All and Select None controls for layout selection. 🗑️ Delete from Selected Layouts action button for the final cleanup operation. Important Functions and Calls 🧩 ld:do-pick captures the selected INSERT entity name. 🧩 ld:apply-layout-filter filters layout names through wcmatch. 🧩 ld:delete-from-layouts scans target layouts and deletes matching references. 🧩 vlax-invoke-method Delete performs the actual object deletion. 🧩 PURGE is attempted for the selected block name after deletion. Typical Workflow 1️⃣ Run Delete2Layouts. 2️⃣ Click Pick reference from drawing and select the block or xref to remove. 3️⃣ Filter layout names if needed, then select the target layouts. 4️⃣ Press Delete from Selected Layouts and review the final count. Important Notes ⚠️ This routine deletes content from selected layouts. Confirm the layout selection before running the delete action. 📌 The routine targets paper-space layouts and does not scan Model Space. Tags 🏷️ AutoCAD, 🏷️ AutoLISP, 🏷️ Civil 3D, 🏷️ Delete Xref, 🏷️ Delete Block, 🏷️ Layouts, 🏷️ Paper Space, 🏷️ Layout Filter, 🏷️ DCL Dialog, 🏷️ Drawing Cleanup, 🏷️ CAD Automation