SelectCreateLayerFilter

Short description

🔎 SelectCreateLayerFilter is an AutoCAD and Civil 3D AutoLISP tool that builds a layer Properties Filter from the layers found in a selected set of drawing objects.
🧰 It adds a practical DCL interface for naming the filter, choosing the parent filter, filtering layer names with wildcards, selecting layers, copying the expression, and applying the result directly through the AutoCAD LAYER filter command.

Command:

🚀 Main command: SelectCreateLayerFilter
⚡ Alias command: SCLF
🧰 Workflow: select drawing entities, review their unique layers in the dialog, filter names with * and ?, select the layers to include, then apply the generated AutoCAD layer filter expression.

Description:

🔎 SelectCreateLayerFilter is an SEO-friendly AutoCAD layer filter generator for drawings with many layers, xrefs, discipline layers, and Civil 3D production standards.
🧩 The command starts by prompting the user to select entities, extracts their layer names from DXF group code 8, removes duplicates, and uses those names as the source list for a layer Properties Filter.
🎛️ The temporary DCL dialog provides filter name, parent filter, wildcard layer filtering, multi-select layer control, horizontal scrolling for long layer names, Select All, Select None, Undo, Copy Expression, Copy Layers, Debug, Apply, and Cancel.
📋 The generated expression uses AutoCAD-style layer filter syntax such as NAME==”LayerName” OR NAME==”OtherLayer”.
🏗️ This is useful for AutoCAD and Civil 3D layer management, xref layer cleanup, project layer grouping, discipline filtering, QA review, and fast creation of custom layer filters from selected model-space objects.

Helper function: (if any)​

🧩 _pf:GetLayersFromSS reads the user selection set and returns the unique layer names used by the selected entities.
🧩 _pf:BuildLayerExpr converts selected layer names into an AutoCAD layer filter expression using NAME==”…” and OR conditions.
🧩 _pf:FilterByPattern applies wildcard filtering with wcmatch, supporting * and ? patterns for fast layer-name searches.
🧩 _pf:CopyToClipboard copies generated expressions, layer lists, and debug information to the Windows clipboard through an htmlfile COM object.
🧩 _pf:StoreSettings and _pf:LoadSettings save and restore the last filter name, parent filter, and dialog-position values under HKEY_CURRENT_USER\Software\LayerFilterPlus.
🧩 Runtime DCL generation creates the Layer Filter Builder dialog as a temporary file, loads it, unloads it, and deletes it during cleanup.
🧩 The SCLF alias calls the full SelectCreateLayerFilter command for faster command-line access.

Functionalities:

✅ 🔎 Creates an AutoCAD Properties Filter from layers extracted from selected entities.
✅ 🧱 Removes duplicate layer names before presenting the layer list.
✅ 🎛️ Provides a custom DCL dialog for filter name, parent filter, pattern search, multi-selection, and confirmation.
✅ 🔍 Supports wildcard layer filtering with * and ? characters.
✅ ↔️ Includes a horizontal scroll slider so very long layer names remain readable in the dialog.
✅ 📋 Copies the generated layer-filter expression to the clipboard for review or reuse.
✅ 📋 Copies selected layer names to the clipboard as a line-by-line list.
✅ 🧪 Provides a Debug button that copies the current filter name, parent filter, selected layers, pattern, and expression.
✅ 💾 Remembers last-used settings in the Windows registry.
✅ 🧰 Runs the AutoCAD -LAYER FILTER workflow automatically after the user clicks Apply.

Result:

🎯 The result is a faster, selection-based layer filter workflow for AutoCAD and Civil 3D drawings.
📌 Instead of manually typing long layer names into the Layer Properties Manager, the user can select representative objects and generate a clean filter expression from their layers.
🧭 This improves layer navigation, xref review, CAD standard checks, discipline-specific filtering, and project drawing cleanup in production environments.

Images, animations etc.

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="SelectCreateLayerFilter">
<src:RibbonToolTip.ExpandedContent>
<StackPanel>
<TextBlock Background="AntiqueWhite" TextAlignment="Left">
<Bold>Function Syntax: SelectCreateLayerFilter / SCLF</Bold>
<LineBreak/>
<Bold>Version: 1.1 Date: 20.06.2026 6:38:54PM</Bold>
<LineBreak/>
<Hyperlink>N/A</Hyperlink>
<LineBreak/>


<Bold><Run Foreground="DodgerBlue">Description</Run></Bold><LineBreak/>
<Run Foreground="White">🧩 SelectCreateLayerFilter is an AutoCAD and Civil 3D AutoLISP utility designed for faster, cleaner CAD layer and drawing-management workflows.</Run><LineBreak/>
<Run Foreground="LimeGreen">📌 It turns the layers of selected AutoCAD objects into a reusable layer Properties Filter with wildcard search, multi-select control, clipboard export, and dialog-based review.</Run><LineBreak/>
<LineBreak/>

<Bold><Run Foreground="DodgerBlue">Function Syntax</Run></Bold><LineBreak/>
<Run Foreground="White">🚀 Main command: </Run><Bold><Run Foreground="Orange">SelectCreateLayerFilter</Run></Bold><LineBreak/>
<Run Foreground="White">⚡ Alias command: </Run><Bold><Run Foreground="Orange">SCLF</Run></Bold><LineBreak/>
<LineBreak/>

<Bold><Run Foreground="DodgerBlue">SEO Optimized Overview</Run></Bold><LineBreak/>
<Run Foreground="White">🔎 This AutoCAD layer filter builder extracts unique layer names from selected entities and converts them into a layer Properties Filter expression.</Run><LineBreak/>
<Run Foreground="White">🧱 The routine reads the entity layer from </Run><Bold><Run Foreground="Orange">DXF group code 8</Run></Bold><Run Foreground="White"> and removes duplicate layer names before opening the dialog.</Run><LineBreak/>
<Run Foreground="White">🎛️ The dialog supports filter name, parent filter, wildcard pattern search, multi-select layer selection, horizontal scrolling, Select All, Select None, Undo, Copy Expression, Copy Layers, and Debug.</Run><LineBreak/>
<Run Foreground="White">📋 The generated expression uses syntax like </Run><Bold><Run Foreground="Orange">NAME==&quot;LayerName&quot; OR NAME==&quot;OtherLayer&quot;</Run></Bold><Run Foreground="White"> for AutoCAD layer filter creation.</Run><LineBreak/>
<LineBreak/>

<Bold><Run Foreground="LimeGreen">Primary Workflow</Run></Bold><LineBreak/>
<Run Foreground="White">1️⃣ Run </Run><Bold><Run Foreground="Orange">SCLF</Run></Bold><Run Foreground="White"> or </Run><Bold><Run Foreground="Orange">SelectCreateLayerFilter</Run></Bold><Run Foreground="White">.</Run><LineBreak/>
<Run Foreground="White">2️⃣ Select drawing entities whose layers should become part of the filter.</Run><LineBreak/>
<Run Foreground="White">3️⃣ Enter the filter name and parent filter in the Layer Filter Builder dialog.</Run><LineBreak/>
<Run Foreground="White">4️⃣ Use the </Run><Bold><Run Foreground="DarkRed">Pattern (*,?)</Run></Bold><Run Foreground="White"> field to narrow the visible layer list.</Run><LineBreak/>
<Run Foreground="White">5️⃣ Select the required layers, copy/debug the expression if needed, then click </Run><Bold><Run Foreground="Orange">Apply</Run></Bold><Run Foreground="White">.</Run><LineBreak/>
<LineBreak/>

<Bold><Run Foreground="LimeGreen">Functionalities</Run></Bold><LineBreak/>
<Run Foreground="White">✅ </Run><Bold><Run Foreground="LimeGreen">Selection-based layer discovery</Run></Bold><Run Foreground="White"> - collects unique layer names from the objects chosen by the user.</Run><LineBreak/>
<Run Foreground="White">✅ </Run><Bold><Run Foreground="LimeGreen">Layer filter expression creation</Run></Bold><Run Foreground="White"> - builds NAME-based OR expressions for AutoCAD layer filters.</Run><LineBreak/>
<Run Foreground="White">✅ </Run><Bold><Run Foreground="LimeGreen">Wildcard filtering</Run></Bold><Run Foreground="White"> - supports </Run><Bold><Run Foreground="Orange">*</Run></Bold><Run Foreground="White"> and </Run><Bold><Run Foreground="Orange">?</Run></Bold><Run Foreground="White"> searches in the DCL layer list.</Run><LineBreak/>
<Run Foreground="White">✅ </Run><Bold><Run Foreground="LimeGreen">Clipboard export</Run></Bold><Run Foreground="White"> - copies either the generated expression or selected layer names for documentation and troubleshooting.</Run><LineBreak/>
<Run Foreground="White">✅ </Run><Bold><Run Foreground="LimeGreen">Registry persistence</Run></Bold><Run Foreground="White"> - remembers the last filter name and parent filter under </Run><Bold><Run Foreground="Orange">LayerFilterPlus</Run></Bold><Run Foreground="White">.</Run><LineBreak/>
<LineBreak/>

<Bold><Run Foreground="DodgerBlue">Important Commands and Functions</Run></Bold><LineBreak/>
<Run Foreground="White">🧩 </Run><Bold><Run Foreground="Orange">ssget</Run></Bold><Run Foreground="White"> selects the source entities.</Run><LineBreak/>
<Run Foreground="White">🧩 </Run><Bold><Run Foreground="Orange">entget</Run></Bold><Run Foreground="White"> reads object data and layer names.</Run><LineBreak/>
<Run Foreground="White">🧩 </Run><Bold><Run Foreground="Orange">wcmatch</Run></Bold><Run Foreground="White"> performs wildcard matching.</Run><LineBreak/>
<Run Foreground="White">🧩 </Run><Bold><Run Foreground="Orange">-LAYER FILTER</Run></Bold><Run Foreground="White"> creates or updates the AutoCAD layer filter.</Run><LineBreak/>
<Run Foreground="White">🧩 </Run><Bold><Run Foreground="Orange">load_dialog</Run></Bold><Run Foreground="White">, </Run><Bold><Run Foreground="Orange">new_dialog</Run></Bold><Run Foreground="White">, and </Run><Bold><Run Foreground="Orange">action_tile</Run></Bold><Run Foreground="White"> control the DCL interface.</Run><LineBreak/>
<LineBreak/>

<Bold><Run Foreground="DarkRed">Important Notes</Run></Bold><LineBreak/>
<Run Foreground="White">⚠️ The command creates layer filters; it does not move, freeze, delete, or rename entities.</Run><LineBreak/>
<Run Foreground="White">⚠️ Clipboard and registry features depend on Windows and Visual LISP ActiveX support.</Run><LineBreak/>
<Run Foreground="White">⚠️ The temporary DCL file must be writable in the AutoCAD temporary folder.</Run><LineBreak/>
<LineBreak/>

<Bold><Run Foreground="Yellow">Tags</Run></Bold><LineBreak/>
<Run Foreground="Yellow">🏷️ AutoCAD, 🏷️ Civil 3D, 🏷️ AutoLISP, 🏷️ Visual LISP, 🏷️ DCL dialog, 🏷️ Layer filter, 🏷️ Layer properties filter, 🏷️ Layer manager, 🏷️ Layer automation, 🏷️ Wildcard filter, 🏷️ Layer selection, 🏷️ CAD cleanup, 🏷️ CAD standards, 🏷️ Layer naming, 🏷️ Clipboard export, 🏷️ AutoCAD productivity</Run><LineBreak/>



</TextBlock>
            
<Grid>
<Image Source="PNG" Stretch="Uniform"/>
</Grid>
<Grid>
<MediaElement
 Source="GIF"
 Stretch="Uniform"
 Visibility="Visible"/>
 </Grid>
</StackPanel>
</src:RibbonToolTip.ExpandedContent>
</src:RibbonToolTip>
</ResourceDictionary>

Additional info:

Share this page:

Page Tag: 🏷️ CAD Standards

  • SelectCreateLayerFilter

    Short description🔎 SelectCreateLayerFilter is an AutoCAD and Civil 3D AutoLISP tool that builds a layer Properties Filter from the layers found in a selected set of drawing objects. 🧰 It adds a practical DCL interface for naming the filter, choosing the parent filter, filtering layer names with wildcards, selecting layers, copying the expression, and applying…

  • Reconcill_All_Layers

    Short description🧹 Reconcill_All_Layers is an AutoCAD and Civil 3D AutoLISP utility for clearing unreconciled-layer data from the active DWG. 🔕 It removes AutoCAD layer reconciliation markers and disables new-layer evaluation warnings by setting LAYEREVAL and LAYERNOTIFY to 0. Command:🚀 Main command: Reconcill_All_Layers 🧰 Run the command in the active drawing to clear unreconciled-layer information for…

  • Make_layers_linetypes_draw

    Short description🧾 Make_layers_linetypes_draw is an AutoCAD AutoLISP linetype catalog generator that draws sample polylines and MTEXT labels for loaded linetypes. 🎛️ It uses DCL dialogs for start point, length, row spacing, linetype scale, label content, wildcard filtering, paging, and linetype selection. Command:🚀 Main command: DRAW_LTYPE_LAYERS 🧩 Load the LSP in AutoCAD or Civil 3D, then…

  • SetupOverriteDimStyles

    Short description🧰 SetupOverriteDimStyles is an AutoCAD and Civil 3D AutoLISP workspace manager that matches current Layer, Text Style, Dimension Style, MLeader Style, and Text Size from a selected object. 📊 It displays a 4-column DCL comparison matrix with current settings, current drawing quantities, selected-object settings, and selected-setting quantities. Command:🚀 Main command: SetupOverriteDimStyles 🖱️ The user…

  • Lin_Shx_Loader

    Short descriptionDCL-based AutoCAD utility for loading LIN linetype definitions and SHX shape files from selected folders, including subfolders and multiple search paths. Command:Lin_Shx_Loader Description:Lin_Shx_Loader opens an embedded DCL dialog for browsing, filtering, validating and loading AutoCAD linetype resources. The tool can work in LIN file mode, where complete .lin files are loaded, or in individual…

  • LayerLeaderPlugin

    Short description🏷️ LayerLeaderPlugin is an AutoCAD and Civil 3D .NET WinForms plugin for placing DB-standard MLeader labels from layer names, dynamic block visibility states, and managed JSON label databases. Command:🧰 Main commands: LLP, SHOWPANEL, PLACELEADER, ADDLAYER, REMOVELAYER, LISTLAYERS, ADDBLOCK, REMOVEBLOCK, LISTBLOCKS, LLUPDATEFIELDS, SETUPDIMSTYLES, LOADSETUPDIMSTYLES. Run NETLOAD, load LayerLeaderPlugin.dll, then use LLP or SHOWPANEL to open…

  • Export_Import_MS_UCS

    Short description🧭 Export_Import_MS_UCS is an AutoCAD AutoLISP utility for exporting and importing named UCS definitions through portable .ucs files. 📤 It helps CAD users transfer model-space UCS setups between drawings, preserve project coordinate systems, and reuse named UCS standards in AutoCAD and Civil 3D production workflows. Command:🚀 Main export dialog command: EXPUCS_DIALOG 🚀 Main import…

  • AnnoAllOff

    Short description🔇 AnnoAllOff is an AutoCAD and Civil 3D AutoLISP utility that sets ANNOALLVISIBLE to 0 for selected Model/Layout tabs through a DCL picker. 🎛️ It helps users turn off global annotative visibility per tab while keeping control over which layouts are updated. Command:🚀 Main command: AAOFF 🎛️ Dialog title: ANNOALLVISIBLE -> 0 (Choose Tabs)…

  • RenameLayer

    Short description🧱 RenameLayer is an SEO-friendly AutoCAD and Civil 3D AutoLISP utility for batch renaming local drawing layers through a custom DCL dialog. 🔎 It combines layer filtering, multi-select layer processing, prefix and suffix insertion, string removal, find-and-replace logic, optional ALL CAPS conversion, and Auto Merge handling in one production-ready layer management workflow. 🛠️ The…

  • FreezeLayersInMS

    Short description❄️ FreezeLayersInMS is an AutoCAD and Civil 3D DCL layer manager for filtering current and xref layers, then freezing, thawing, locking, plotting, or switching them on and off. 🔍 It displays matching layer status in a fixed-width table and hides xref prefixes for readability while preserving the true layer names for operations. Command:🚀 Main…