Short description
π¨ Color2Llayers is an AutoCAD AutoLISP Extended Layer Color Changer with a DCL list, wildcard filter, multi-select, pick color, apply, undo, clipboard export, and dialog position memory.
π§° It edits layer color values directly and uses a reopen-after-Apply pattern so AutoCAD can regenerate and show color changes immediately.
Command:
π Main color changer command: XCC – opens the Extended Layer Color Changer dialog
π Lowercase alias: xcc – opens the same color changer dialog
π Diagnostic command: XCCDEBUG – prints a debug report for DCL and environment troubleshooting
π Test command: XCCTEST – prints a simple test confirmation
Description:
π¨ Color2Llayers is an SEO-friendly AutoCAD layer color changer and CAD standards utility.
π The XCC dialog shows layer rows with flags, layer names, color, and linetype information, plus a wildcard filter that supports * and ?.
π― Users can multi-select layers, choose Pick Color, click Apply, and immediately see changes after the dialog safely closes and reopens using done_dialog 2 and REGENALL.
β©οΈ The routine stores an undo snapshot before writing layer color changes and supports an Undo button inside the dialog.
π A Copy to Clipboard button exports layer name, color, and linetype rows through a temporary tab-delimited file and Windows clip.exe when available.
πΎ Dialog X/Y position and filter text are saved with getcfg/setcfg for the next session.
Helper function: (if any)β
π§© xcc:all-layers builds the layer list from the drawing table.
π§© xcc:build-list and xcc:build-disp prepare filtered layer rows for the DCL list box.
π§© xcc:on-filter, xcc:on-hscroll, xcc:select-all, and xcc:select-none manage dialog interaction.
π§© xcc:pick-color calls the AutoCAD color dialog and stores the selected color.
π§© xcc:apply-snap and xcc:apply-write capture undo data and write new layer colors.
π§© xcc:undo-last restores the previous color snapshot.
π§© xcc:copy-clipboard writes selected rows to a temp file and pushes them to the clipboard.
π§© xcc:dialog-loop implements the reopen-after-Apply pattern for safe REGENALL updates.
Functionalities:
β
Display all drawing layers with name, color, and linetype information.
β
Filter layer names using * and ? wildcard patterns.
β
Select multiple layers in a DCL list box.
β
Select all or clear all layer selections.
β
Pick a new AutoCAD color through a color selection dialog.
β
Apply layer color changes and regenerate the drawing immediately.
β
Undo the last applied color change snapshot.
β
Copy selected layer/color/linetype rows to the clipboard.
β
Save dialog position and filter text between sessions.
β
Provide XCCDEBUG for troubleshooting DCL loading, temp file writing, and AutoCAD environment data.
Result:
π― The result is faster layer color editing with visual feedback, undo support, and clipboard reporting.
π This improves CAD layer standardization, plotting setup, layer QA/QC, and drawing cleanup in AutoCAD and Civil 3D workflows.
Images, animations etc.
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="Color2Llayers"> <src:RibbonToolTip.ExpandedContent> <StackPanel> <TextBlock Background="AntiqueWhite" TextAlignment="Left"> <Bold>Function Syntax: xccdebug / xcctest / xcc / XCC</Bold> <LineBreak/> <Bold>Version: 1.1 Date: 20.06.2026 6:38:52PM</Bold> <LineBreak/> <Hyperlink>https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/pick-object-change-layer-properties/td-p/1416072</Hyperlink> <LineBreak/> <TextBlock TextWrapping="Wrap" Foreground="Black"> <Run FontWeight="Bold">Function:</Run> xcc β Change the color of a selected layer using an interactive color dialog. </TextBlock> <TextBlock TextWrapping="Wrap" Foreground="Black"> <Run FontWeight="Bold">Overview:</Run> <LineBreak/> This command allows the user to select an entity and change the color of its associated layer via the AutoCAD color picker. <LineBreak/> Change Layers Color To Entity Color. </TextBlock> <TextBlock TextWrapping="Wrap" Foreground="Black"> <Run FontWeight="Bold">Workflow:</Run> <LineBreak/> β’ Prompts the user to <Run Foreground="Blue" FontWeight="Bold">select an entity</Run>. <LineBreak/> β’ Extracts the <Run Foreground="Green" FontWeight="Bold">layer name</Run> from the selected entity. <LineBreak/> β’ Retrieves the layer's definition using <Run Foreground="Purple">tblobjname</Run> and <Run Foreground="Purple">entget</Run>. <LineBreak/> β’ Opens the <Run Foreground="DarkOrange" FontWeight="Bold">acad_colordlg</Run> color dialog to let the user choose a new color. <LineBreak/> β’ If a color is chosen, updates the layer's color using <Run Foreground="Red">entmod</Run>. <LineBreak/> β’ Repeats until the user presses Enter (cancels selection). </TextBlock> <TextBlock TextWrapping="Wrap" Foreground="Black"> <Run FontWeight="Bold">Key Features:</Run> <LineBreak/> β’ Interactive layer color change through UI dialog. <LineBreak/> β’ Does not require manually finding the layer β works from entity selection. <LineBreak/> β’ Color updates are made directly to the layer table record. </TextBlock> <TextBlock TextWrapping="Wrap" Foreground="Black"> <Run FontWeight="Bold">Ideal For:</Run> <LineBreak/> β’ Quick color adjustments to layers. <LineBreak/> β’ Visual layer management via geometry selection. </TextBlock> <Bold><Run Foreground="DodgerBlue">Description</Run></Bold><LineBreak/><Run Foreground="White">π¨ Color2Llayers is an AutoCAD AutoLISP layer color management tool built around the XCC command.</Run><LineBreak/><Run Foreground="LimeGreen">π§° It provides a production-oriented DCL interface for filtering layers, selecting multiple layers, picking a new color, applying changes, undoing recent changes, and copying layer/color/linetype data to the clipboard.</Run><LineBreak/><LineBreak/> <Bold><Run Foreground="DodgerBlue">Function Syntax</Run></Bold><LineBreak/><Run Foreground="White">Main color changer command: </Run><Bold><Run Foreground="Orange">XCC</Run></Bold><Run Foreground="White">opens the Extended Layer Color Changer dialog</Run><LineBreak/><Run Foreground="White">Lowercase alias: </Run><Bold><Run Foreground="Orange">xcc</Run></Bold><Run Foreground="White">opens the same color changer dialog</Run><LineBreak/><Run Foreground="White">Diagnostic command: </Run><Bold><Run Foreground="Orange">XCCDEBUG</Run></Bold><Run Foreground="White">prints a debug report for DCL and environment troubleshooting</Run><LineBreak/><Run Foreground="White">Test command: </Run><Bold><Run Foreground="Orange">XCCTEST</Run></Bold><Run Foreground="White">prints a simple test confirmation</Run><LineBreak/><LineBreak/> <Bold><Run Foreground="DodgerBlue">SEO Optimized Overview</Run></Bold><LineBreak/><Run Foreground="White">π¨ Color2Llayers is an SEO-friendly AutoCAD layer color changer and CAD standards utility.</Run><LineBreak/><Run Foreground="White">π The XCC dialog shows layer rows with flags, layer names, color, and linetype information, plus a wildcard filter that supports * and ?.</Run><LineBreak/><Run Foreground="White">π― Users can multi-select layers, choose Pick Color, click Apply, and immediately see changes after the dialog safely closes and reopens using done_dialog 2 and REGENALL.</Run><LineBreak/><Run Foreground="White">β©οΈ The routine stores an undo snapshot before writing layer color changes and supports an Undo button inside the dialog.</Run><LineBreak/><Run Foreground="White">π A Copy to Clipboard button exports layer name, color, and linetype rows through a temporary tab-delimited file and Windows clip.exe when available.</Run><LineBreak/><Run Foreground="White">πΎ Dialog X/Y position and filter text are saved with getcfg/setcfg for the next session.</Run><LineBreak/><LineBreak/> <Bold><Run Foreground="LimeGreen">Primary Workflow</Run></Bold><LineBreak/><Run Foreground="White">1οΈβ£ Run </Run><Bold><Run Foreground="Orange">XCC</Run></Bold><Run Foreground="White"> at the AutoCAD command line.</Run><LineBreak/><Run Foreground="White">2οΈβ£ Type a wildcard filter to narrow the layer list, or keep * to show all layers.</Run><LineBreak/><Run Foreground="White">3οΈβ£ Select one or more layers, then click Pick Color to choose the target color.</Run><LineBreak/><Run Foreground="White">4οΈβ£ Click Apply to write the color changes and reopen/regenerate the dialog.</Run><LineBreak/><Run Foreground="White">5οΈβ£ Use Undo if the last color change should be reverted, or Copy to Clipboard to export layer rows.</Run><LineBreak/><LineBreak/> <Bold><Run Foreground="LimeGreen">Functionalities</Run></Bold><LineBreak/><Run Foreground="White">β Display all drawing layers with name, color, and linetype information.</Run><LineBreak/><Run Foreground="White">β Filter layer names using * and ? wildcard patterns.</Run><LineBreak/><Run Foreground="White">β Select multiple layers in a DCL list box.</Run><LineBreak/><Run Foreground="White">β Select all or clear all layer selections.</Run><LineBreak/><Run Foreground="White">β Pick a new AutoCAD color through a color selection dialog.</Run><LineBreak/><Run Foreground="White">β Apply layer color changes and regenerate the drawing immediately.</Run><LineBreak/><Run Foreground="White">β Undo the last applied color change snapshot.</Run><LineBreak/><Run Foreground="White">β Copy selected layer/color/linetype rows to the clipboard.</Run><LineBreak/><Run Foreground="White">β Save dialog position and filter text between sessions.</Run><LineBreak/><Run Foreground="White">β Provide XCCDEBUG for troubleshooting DCL loading, temp file writing, and AutoCAD environment data.</Run><LineBreak/><LineBreak/> <Bold><Run Foreground="DodgerBlue">Important Commands and Functions</Run></Bold><LineBreak/><Run Foreground="White">π§© </Run><Bold><Run Foreground="Orange">XCC</Run></Bold><Run Foreground="White"> - main command for the Extended Layer Color Changer.</Run><LineBreak/><Run Foreground="White">π§© </Run><Bold><Run Foreground="Orange">XCCDEBUG</Run></Bold><Run Foreground="White"> - diagnostic command that prints DCL and environment details.</Run><LineBreak/><Run Foreground="White">π§© </Run><Bold><Run Foreground="Orange">acad_colordlg</Run></Bold><Run Foreground="White"> - AutoCAD color picker used by the tool.</Run><LineBreak/><Run Foreground="White">π§© </Run><Bold><Run Foreground="Orange">entmod</Run></Bold><Run Foreground="White"> - writes color changes to layer table records.</Run><LineBreak/><Run Foreground="White">π§© </Run><Bold><Run Foreground="Orange">done_dialog 2</Run></Bold><Run Foreground="White"> - closes the modal DCL temporarily so REGENALL can run safely.</Run><LineBreak/><Run Foreground="White">π§© </Run><Bold><Run Foreground="Orange">clip.exe</Run></Bold><Run Foreground="White"> - Windows clipboard helper used for tab-delimited layer export.</Run><LineBreak/><LineBreak/> <Bold><Run Foreground="LimeGreen">Result</Run></Bold><LineBreak/><Run Foreground="White">π― The result is faster layer color editing with visual feedback, undo support, and clipboard reporting.</Run><LineBreak/><Run Foreground="White">π This improves CAD layer standardization, plotting setup, layer QA/QC, and drawing cleanup in AutoCAD and Civil 3D workflows.</Run><LineBreak/><LineBreak/> <Bold><Run Foreground="DarkRed">Important Notes</Run></Bold><LineBreak/><Run Foreground="White">β οΈ The tool changes layer color properties, which affects all objects displayed BYLAYER on those layers.</Run><LineBreak/><Run Foreground="White">β οΈ Use filters and multi-select carefully before applying changes in large project drawings.</Run><LineBreak/><Run Foreground="White">β οΈ Clipboard export depends on Windows clip.exe; without it, the routine saves the temporary export file path instead.</Run><LineBreak/><LineBreak/> <Bold><Run Foreground="Yellow">Tags</Run></Bold><LineBreak/><Run Foreground="Yellow">π·οΈ AutoCAD, π·οΈ AutoLISP, π·οΈ Civil 3D, π·οΈ Layer Color, π·οΈ Color2Llayers, π·οΈ XCC, π·οΈ Layer Standards, π·οΈ DCL Dialog, π·οΈ Clipboard Export, π·οΈ CAD Cleanup</Run><LineBreak/> </TextBlock> <!-- Use MediaElement for GIF (static first frame) and Image as fallback --> <Grid> <Image Source="Color2Llayers.png" Stretch="Uniform"/> </Grid> </StackPanel> </src:RibbonToolTip.ExpandedContent> </src:RibbonToolTip> </ResourceDictionary>

Leave a Reply
You must be logged in to post a comment.