LayersName2Clipboard

Short description

📋 LayersName2Clipboard is an AutoCAD AutoLISP utility that extracts unique layer names from selected entities and copies them to the Windows clipboard.
🔎 It is useful for quick layer reporting, documentation, filters, QA lists, and transferring selected layer names into Excel, Notepad, scripts, or CAD management tools.

Image 000 9

Command:

🚀 Main command: LayersName2Clipboard
🧩 Load the LSP in AutoCAD or Civil 3D, then type the command at the command line.

Description:

📋 This AutoCAD layer extraction command asks the user to select entities, reads each entity’s DXF layer name, and builds a unique layer list.
🔎 The routine uses DXF group code 8 from entget data, which directly represents the entity layer.
🧠 Duplicate layer names are removed so each selected layer appears only once.
📄 The final output is printed in the AutoCAD command line and copied as a newline-separated text list to the Windows clipboard.
⚙️ Clipboard transfer is handled through the Windows htmlfile ActiveX object.

Helper function: (if any)​

🧩 ClipPut sends text to the Windows clipboard through htmlfile parentWindow clipboardData.
🧩 C:LayersName2Clipboard is the main command that collects the selection, reads entity data, removes duplicates, prints the result, and copies it.

Functionalities:

✅ Select AutoCAD entities and extract their layer names.
✅ Use entget and DXF group 8 for reliable layer-name reading.
✅ Remove duplicate layer names from the selection.
✅ Preserve first-detected order by reversing the accumulated list before output.
✅ Copy the clean layer list to the Windows clipboard.
✅ Print the same layer list in the AutoCAD command line.

Result:

✅ A clean newline-separated list of unique selected layer names is copied to the clipboard.
✅ The user can paste the layer list into Excel, TXT files, filters, documentation, or support tickets.

Images, animations etc.

Image 000 9
Pixel

XAML code:

<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:src="clr-namespace:Autodesk.Windows;assembly=AdWindows">
    
<src:RibbonToolTip x:Key="LayersName2Clipboard">
<src:RibbonToolTip.ExpandedContent>
<StackPanel>
<TextBlock Background="AntiqueWhite" TextAlignment="Left">
<Bold>Function Syntax: LayersName2Clipboard</Bold>
<LineBreak/>
<Bold>Version: 1.1 Date: 20.06.2026 6:38:54PM</Bold>
<LineBreak/>
<Hyperlink>AI</Hyperlink>
<LineBreak/>
<Bold>Description</Bold><LineBreak/>
This routine <Run Foreground="DarkRed">LayersName2Clipboard</Run> allows the user to select one or more drawing entities and automatically extract their unique layer names, display them in the command line, and copy them to the clipboard for reuse.<LineBreak/>

<Bold>Workflow</Bold><LineBreak/>
The user runs the command <Run Foreground="Red">LayersName2Clipboard</Run>, selects the desired objects on screen (lines, polylines, blocks, and other entities), and then the program analyzes the selection, lists all distinct layer names in the command line, and prepares a clean text list of those layer names in the clipboard.<LineBreak/>

<Bold>Functionalities</Bold><LineBreak/>
• Prompts the user to select one or more entities from the drawing (lines, polylines, blocks, text, and other supported objects).<LineBreak/>
• Reads the <Run Foreground="DarkRed">layer</Run> property of each selected entity and collects all layer names used by the selection.<LineBreak/>
• Filters the collected list so that only <Run Foreground="Red">unique layer names</Run> are kept, automatically ignoring duplicates.<LineBreak/>
• Displays the resulting unique layer names in the AutoCAD command line, prefixed by the text <Run Foreground="DarkRed">Unique layers in selection:</Run> for quick visual feedback.<LineBreak/>
• Builds a plain text list containing only the layer names (one per line), without the header text, so that the content is clean for external use.<LineBreak/>
• Copies this plain text list of unique layer names directly to the Windows <Run Foreground="Red">clipboard</Run>, making it ready for immediate paste into text editors, spreadsheets, documentation, or external tools.<LineBreak/>
• Notifies the user when the layer names have been successfully copied to the clipboard.<LineBreak/>

<Bold>Key Aspects</Bold><LineBreak/>
• Command name: <Run Foreground="Red">LayersName2Clipboard</Run>.<LineBreak/>
• Only layer names of the selected entities are processed and exported.<LineBreak/>
• Duplicate layer names are suppressed so that the clipboard contains a concise list of distinct layers only.<LineBreak/>
• The on screen output shows both a descriptive header and the layers, while the clipboard content contains just the bare layer names for cleaner reuse.<LineBreak/>

<Bold><Run Foreground="DodgerBlue">Description</Run></Bold><LineBreak/>
<Run Foreground="White">📋 LayersName2Clipboard is an AutoCAD AutoLISP utility that extracts unique layer names from selected entities and copies them to the Windows clipboard.</Run><LineBreak/>
<Run Foreground="White">🔎 It is useful for quick layer reporting, documentation, filters, QA lists, and transferring selected layer names into Excel, Notepad, scripts, or CAD management tools.</Run><LineBreak/>
<LineBreak/>
<Bold><Run Foreground="DodgerBlue">Function Syntax</Run></Bold><LineBreak/>
<Run Foreground="White">🚀 Main command: </Run><Bold><Run Foreground="Orange">LayersName2Clipboard</Run></Bold><LineBreak/>
<Run Foreground="White">📌 Load the LSP file with APPLOAD or from your AutoCAD startup suite, then run the command from the command line.</Run><LineBreak/>
<LineBreak/>
<Bold><Run Foreground="DodgerBlue">SEO Optimized Overview</Run></Bold><LineBreak/>
<Run Foreground="White">📋 This AutoCAD layer extraction command asks the user to select entities, reads each entity's DXF layer name, and builds a unique layer list.</Run><LineBreak/>
<Run Foreground="White">🔎 The routine uses DXF group code 8 from entget data, which directly represents the entity layer.</Run><LineBreak/>
<Run Foreground="White">🧠 Duplicate layer names are removed so each selected layer appears only once.</Run><LineBreak/>
<Run Foreground="White">📄 The final output is printed in the AutoCAD command line and copied as a newline-separated text list to the Windows clipboard.</Run><LineBreak/>
<Run Foreground="White">⚙️ Clipboard transfer is handled through the Windows htmlfile ActiveX object.</Run><LineBreak/>
<LineBreak/>
<Bold><Run Foreground="LimeGreen">Primary Workflow</Run></Bold><LineBreak/>
<Run Foreground="White">1️⃣ Run LayersName2Clipboard.</Run><LineBreak/>
<Run Foreground="White">2️⃣ Select the objects whose layer names must be reported.</Run><LineBreak/>
<Run Foreground="White">3️⃣ The tool reads each entity's DXF layer name and removes duplicates.</Run><LineBreak/>
<Run Foreground="White">4️⃣ The unique layer names are printed in the command line.</Run><LineBreak/>
<Run Foreground="White">5️⃣ Paste the newline-separated layer list from the Windows clipboard into Excel, TXT, or another CAD tool.</Run><LineBreak/>
<LineBreak/>
<Bold><Run Foreground="LimeGreen">Core Functionalities</Run></Bold><LineBreak/>
<Run Foreground="White">✅ Select AutoCAD entities and extract their layer names.</Run><LineBreak/>
<Run Foreground="White">✅ Use entget and DXF group 8 for reliable layer-name reading.</Run><LineBreak/>
<Run Foreground="White">✅ Remove duplicate layer names from the selection.</Run><LineBreak/>
<Run Foreground="White">✅ Preserve first-detected order by reversing the accumulated list before output.</Run><LineBreak/>
<Run Foreground="White">✅ Copy the clean layer list to the Windows clipboard.</Run><LineBreak/>
<Run Foreground="White">✅ Print the same layer list in the AutoCAD command line.</Run><LineBreak/>
<LineBreak/>
<Bold><Run Foreground="DodgerBlue">Important Commands and Helper Functions</Run></Bold><LineBreak/>
<Run Foreground="White">🧩 ClipPut sends text to the Windows clipboard through htmlfile parentWindow clipboardData.</Run><LineBreak/>
<Run Foreground="White">🧩 C:LayersName2Clipboard is the main command that collects the selection, reads entity data, removes duplicates, prints the result, and copies it.</Run><LineBreak/>
<LineBreak/>
<Bold><Run Foreground="LimeGreen">Result</Run></Bold><LineBreak/>
<Run Foreground="White">✅ A clean newline-separated list of unique selected layer names is copied to the clipboard.</Run><LineBreak/>
<Run Foreground="White">✅ The user can paste the layer list into Excel, TXT files, filters, documentation, or support tickets.</Run><LineBreak/>
<LineBreak/>
<Bold><Run Foreground="DarkOrange">Operational Notes</Run></Bold><LineBreak/>
<Run Foreground="White">📌 The command works on selected entities, not on every drawing layer.</Run><LineBreak/>
<Run Foreground="DarkRed">⚠️ Clipboard support depends on Windows ActiveX availability through the htmlfile object.</Run><LineBreak/>
<Run Foreground="White">📌 Only layer names are copied; object counts and properties are not included.</Run><LineBreak/>
<LineBreak/>
<Bold><Run Foreground="DodgerBlue">Best Use Cases</Run></Bold><LineBreak/>
<Run Foreground="White">📋 Quick selected-object layer reports.</Run><LineBreak/>
<Run Foreground="White">🔎 Preparing filter lists from actual drawing objects.</Run><LineBreak/>
<Run Foreground="White">📊 Copying layer names to Excel or support notes.</Run><LineBreak/>
<LineBreak/>
<Bold><Run Foreground="Yellow">Tags</Run></Bold><LineBreak/>
<Run Foreground="Yellow">🏷️ AutoCAD, 🏷️ AutoLISP, 🏷️ Civil 3D, 🏷️ Layer Names, 🏷️ Clipboard, 🏷️ Layer Extractor, 🏷️ DXF Group 8, 🏷️ CAD Reporting, 🏷️ QA Workflow</Run><LineBreak/>



</TextBlock>
            
<Grid>
<Image Source="Image_000.jpg" Stretch="Uniform"/>
</Grid>

</StackPanel>
</src:RibbonToolTip.ExpandedContent>
</src:RibbonToolTip>
</ResourceDictionary>

Additional info:

Share this page:

Page Tag: 🏷️ Clipboard

  • LayersName2Clipboard

    Short description📋 LayersName2Clipboard is an AutoCAD AutoLISP utility that extracts unique layer names from selected entities and copies them to the Windows clipboard. 🔎 It is useful for quick layer reporting, documentation, filters, QA lists, and transferring selected layer names into Excel, Notepad, scripts, or CAD management tools. Command:🚀 Main command: LayersName2Clipboard 🧩 Load the…

  • ChangeLayerToSelected_vs.01

    Short description🗂️ ChangeLayerToCurrent is an AutoCAD AutoLISP layer reassignment tool with a dynamic DCL layer selector, filtering, pick-from-object support, and clipboard helper. 🎯 It changes multiple selected objects to a chosen layer and optionally preserves original displayed linetype, linetype scale, and lineweight/width. Command:🚀 Layer change command: ChangeLayerToCurrent – opens a searchable layer selector and moves…

  • ChangeLayerToCurrent

    Short description🗂️ ChangeLayerToCurrent is an AutoCAD AutoLISP layer reassignment tool with a dynamic DCL layer selector, filtering, pick-from-object support, and clipboard helper. 🎯 It changes multiple selected objects to a chosen layer and optionally preserves original displayed linetype, linetype scale, and lineweight/width. Command:🚀 Layer change command: ChangeLayerToCurrent – opens a searchable layer selector and moves…

  • Zoom Extend Window

    Short description What this LISP does ZEZW opens a DCL dialog to multi-select layouts and then applies Zoom Extents or Zoom Window in Paper Space on the selected layouts. Key concept The zoom action runs after the dialog closes for stability and predictable execution. Command: Commands ZEZW Main command that launches the selection dialog and…

  • LoadRecent

    Short description🧩 LoadRecent is an AutoCAD AutoLISP DCL manager for finding reviewing loading running editing and promoting recently created LSP files from a predefined @try development folder. 🎛️ The interface separates the newest LISP file from the complete file list and displays file size creation date modification date and detected commands. 📦 Version 06 also…

  • Zoom Extend

    Short description🔎 Zoom_Extend is an AutoCAD and Civil 3D AutoLISP utility for running Zoom Extents on selected layout tabs from a DCL interface. 📑 It helps clean up paper space view display across multiple sheets without manually opening every layout. Command:🚀 Main command: LZE 🔎 Opens a DCL layout selector to run Zoom Extents on…

  • Zoom Window

    Short description🔎 ZEZW is an AutoCAD and Civil 3D AutoLISP layout zoom tool for running Zoom Extents or Zoom Window on selected paper space layouts. 📑 It includes wildcard layout filtering, multi-select, select all/none, and clipboard support. Command:🚀 Main command: ZEZW ⚡ Alias command: _ZEZW 🔎 Opens a DCL dialog for Zoom Extents or Zoom…

  • All_Layouts_list

    Short description📋 AutoCAD layout list dialog for filtering, multi-selecting, and copying layout names from a drawing. Command:All_Layouts_list, ALL_LAYOUTS_LIST Description:📋 All_Layouts_list is an AutoLISP DCL utility that lists all AutoCAD layouts in tab order and helps users copy selected layout names to the Windows clipboard. 🔍 It is built for sheet-management tasks where layout names must…

  • TitleBlocksTools

    Short description Title Blocks Tools – Unified Menu System Comprehensive dialog-based interface for exporting and updating titleblock attributes via CSV with integrated help, file management, and reload utilities. Command: Commands: TitleBlocksTools, EXPTBCSV_EXPORT, UTB2 Description: This integrated toolset combines CSV export and import functionality for titleblock attribute management: Main Menu Dialog provides radio button selection between…

  • LayersNameToClipboard

    Short description📋 LayersNameToClipboard is an AutoCAD AutoLISP clipboard utility that reads the Layer property from selected objects and copies unique cleaned layer names. 🧹 It includes a simple formatting-code stripping helper and is useful for preparing layer-name lists for documentation, filters, Excel, and CAD QA workflows. Command:🚀 Main command: LayersNameToClipboard 🧩 Load the LSP in…