Function Syntax: Command Version: 1.0 Date: N/A Description 🚀 Copy, rename, and relayer a selected AutoCAD block reference by creating a new independent block definition, preserving dynamic block behavior, and optionally updating all entities inside the copied block to ByLayer display properties. Function SyntaxCopyBlockChangeLayerRB SEO Friendly Description 🧩 CopyRenameBlockChangeLayer is an AutoCAD AutoLISP block utility based on the copy and rename block-reference workflow, extended with a DCL dialog for selecting a new block name and target layer. 🔄 The command can create a renamed copy of a selected block reference or rename the selected reference to a duplicated block definition, avoiding a global rename of every original block reference. 🧠 ObjectDBX cloning is used to duplicate the block definition safely, rename it, then copy it back into the active drawing under the new block name. 📌 Dynamic block properties are preserved by reading the dynamic property values before the rename and restoring them after the new block definition is assigned. 🎨 After the new block is created, the selected/new block reference can be placed on the chosen layer and the internal block entities can be forced to the same layer with color, linetype, and lineweight set to ByLayer. Functionalities • 🧱 Selects one AutoCAD block reference and validates that the picked object is an INSERT. • 🔒 Rejects blocks located on locked layers to prevent unsafe modifications. • 📝 Suggests a unique default block name using the original effective block name plus an incremental suffix. • 📋 Opens a DCL dialog with New Block Name, Filter Layers, and Choose Layer controls. • 🔍 Filters available non-xref layers with wildcard logic while the user types. • 📦 Duplicates the original block definition through ObjectDBX before assigning the new name. • 🧬 Supports dynamic blocks by preserving dynamic property values during the block-reference rename. • 🧭 Handles anonymous block names and xref-reload behavior where applicable. • 🎯 Selects the copied reference after the operation when copy mode is active. • 🎨 Applies the target layer to the block reference and internal block entities. • 🟨 Sets internal entity color to ByLayer, linetype to ByLayer, and lineweight to ByLayer for clean layer-driven display. Helper Functions and Internal LogicLM:RenameBlockReference — main copy/rename engine for the selected INSERT entity. LM:GetNewBlockNameAndLayer — writes and opens the temporary DCL dialog used to capture the new block name and layer choice. update-layer-list — filters the layer popup list using wildcard matching while the user types. FixBlockEntitiesLayer_Internal — updates block-definition entities to the chosen layer and normalizes Color, Linetype, and Lineweight to ByLayer. Result ✅ The result is an independent renamed block copy or renamed block reference with controlled layer assignment, cleaner ByLayer graphics, and preserved dynamic-block behavior. Important Notes⚠️ This tool modifies or creates block definitions in the active drawing. Use a saved drawing or backup when editing production block libraries.⚠️ The CopyBlockChangeLayer command uses copy mode, while RB uses rename mode without creating an extra copied reference.⚠️ The uploaded code header mentions historical CB/RB command names, but the implemented copy command in this file is CopyBlockChangeLayer. Tags 🏷️ AutoCAD, 🏷️ AutoLISP, 🏷️ Civil 3D, 🏷️ Block Tools, 🏷️ Block Rename, 🏷️ Copy Block, 🏷️ Dynamic Blocks, 🏷️ ObjectDBX, 🏷️ DCL Dialog, 🏷️ Layer Management, 🏷️ ByLayer, 🏷️ CAD Productivity