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 be reviewed, filtered, exported, or pasted into reports, publishing tools, Excel, or QA checklists.
π§ The dialog supports wildcard filtering, optional Model tab inclusion, multi-selection, Select All, Select None, selected count feedback, and clipboard export.
Helper function: (if any)β
ALLLAY:Run builds the temporary DCL dialog and collects layouts from the active document.
ALLLAY:rebuild applies wildcard filtering and refreshes the visible list.
ALLLAY:get-selected-names returns selected layout names from the dialog list.
ALLLAY:copy-selected copies the selected layout names one per line.
ALLLAY:copy-clipboard uses MSHTML clipboardData first, then PowerShell Set-Clipboard and clip.exe fallback.
Functionalities:
π Filter layout names using wildcard patterns with * and ?.
π List layouts in AutoCAD tab order.
βοΈ Multi-select layout names from the dialog.
β
Select All and Select None for fast batch selection.
π’ Live selected-count field.
π Copy selected layout names to the clipboard, one layout per line.
π§© Optional Include Model toggle for including the Model tab in the list.
Result:
β
Fast layout name extraction from DWG files.
β
Useful for sheet index creation, layout QA, publishing preparation, and external documentation.
β
Reduces manual copy/paste work when drawings contain many layout tabs.
β
Produces clean clipboard text ready for Excel, Notepad, email, or project logs.
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="Layouts_list">
<src:RibbonToolTip.ExpandedContent>
<StackPanel>
<TextBlock Background="AntiqueWhite" TextAlignment="Left">
<Bold>Function Syntax: All_Layouts_list / ALL_LAYOUTS_LIST</Bold>
<LineBreak/>
<Bold>Version: 1.1 Date: 20.06.2026 6:38:55PM</Bold>
<LineBreak/>
<Hyperlink>AI+https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/retrieve-layout-names-by-order-of-which-they-sit-to-populate-in/td-p/10117384</Hyperlink>
<LineBreak/>
<Bold><Run Foreground="DodgerBlue">π Command name</Run></Bold><LineBreak/>
<Run>All_Layouts_list / ALL_LAYOUTS_LIST</Run><LineBreak/>
<LineBreak/>
<Bold><Run Foreground="DodgerBlue">π Description</Run></Bold><LineBreak/>
<Run>All_Layouts_list creates a clean AutoCAD DCL dialog for viewing, filtering, selecting, and copying drawing layout names.</Run><LineBreak/>
<LineBreak/>
<Bold><Run Foreground="DodgerBlue">π Layout filtering</Run></Bold><LineBreak/>
<Run>Use wildcard patterns with * and ? to narrow the visible layout list. The routine can also include the Model tab when required.</Run><LineBreak/>
<LineBreak/>
<Bold><Run Foreground="DodgerBlue">βοΈ Selection tools</Run></Bold><LineBreak/>
<Run>The dialog supports multi-selection, Select All, Select None, and a live selected-count field.</Run><LineBreak/>
<LineBreak/>
<Bold><Run Foreground="DodgerBlue">π Clipboard export</Run></Bold><LineBreak/>
<Run>Selected layout names are copied one per line, making the result easy to paste into Excel, sheet lists, emails, reports, or QA logs.</Run><LineBreak/>
<LineBreak/>
<Bold><Run Foreground="DodgerBlue">β
Result</Run></Bold><LineBreak/>
<Run>A faster layout audit and sheet-management workflow for AutoCAD and Civil 3D drawings with many layout tabs.</Run><LineBreak/>
<LineBreak/>
<Bold><Run Foreground="DodgerBlue">βΉοΈ Notes</Run></Bold><LineBreak/>
<Run>This tool reads and copies layout names only. It does not rename or modify layout tabs.</Run><LineBreak/>
<LineBreak/>
<Bold><Run Foreground="Orange">π SEO keywords</Run></Bold><LineBreak/>
<Run>AutoCAD AutoLISP tool for Civil 3D productivity, drawing management, layout automation, viewport control, layer workflows, DCL dialogs, and CAD production QA: All_Layouts_list.</Run><LineBreak/>
<LineBreak/>
<Bold><Run Foreground="Yellow">π·οΈ Tags</Run></Bold><LineBreak/>
<Run Foreground="Yellow">π·οΈ AutoCAD, π·οΈ AutoLISP, π·οΈ Visual LISP, π·οΈ Civil 3D, π·οΈ Layouts, π·οΈ Layout List, π·οΈ Clipboard, π·οΈ DCL Dialog, π·οΈ Sheet Management, π·οΈ QA Workflow, π·οΈ CAD Automation</Run><LineBreak/>
<Bold>All_Layouts_List (AutoLISP)</Bold><LineBreak/>
<Bold>Description</Bold><LineBreak/>
This program opens a dialog that lists all drawing layouts in tab order, lets the user filter and multi-select them, and copies the selected layout names to the Windows clipboard (one name per line).<LineBreak/>
<Bold>How the user runs it</Bold><LineBreak/>
β’ Run either command: <Bold><Run Foreground="DarkRed">ALL_LAYOUTS_LIST</Run></Bold> or <Bold><Run Foreground="DarkRed">All_Layouts_list</Run></Bold>.<LineBreak/>
β’ A dialog titled <Bold>All Layouts List</Bold> appears.<LineBreak/>
<Bold>What the user does in the dialog</Bold><LineBreak/>
β’ Optionally type a wildcard pattern in <Bold>Filter</Bold> (supports <Bold><Run Foreground="DarkRed">*</Run></Bold> and <Bold><Run Foreground="DarkRed">?</Run></Bold>).<LineBreak/>
β’ Click <Bold><Run Foreground="DarkRed">Apply</Run></Bold> to rebuild the visible list using the filter.<LineBreak/>
β’ Toggle <Bold><Run Foreground="DarkRed">Include Model</Run></Bold> to decide whether the <Bold>MODEL</Bold> layout is included in the list.<LineBreak/>
β’ Multi-select layouts in the list box (the <Bold>Selected</Bold> counter updates).<LineBreak/>
β’ Use <Bold><Run Foreground="DarkRed">Select All</Run></Bold> or <Bold><Run Foreground="DarkRed">Select None</Run></Bold> to quickly change selection.<LineBreak/>
β’ Click <Bold><Run Foreground="DarkRed">Copy to Clipboard</Run></Bold> to copy selected layout names (one per line).<LineBreak/>
β’ Press <Bold>OK</Bold> to close, or <Bold>Cancel</Bold> to close without any special return value.<LineBreak/>
<Bold>Functionalities</Bold><LineBreak/>
β’ <Bold>Layout collection</Bold>: Reads all layouts from the active drawing and sorts them by <Bold>TabOrder</Bold> so the dialog list matches the layout tab sequence.<LineBreak/>
β’ <Bold>Filtering</Bold>: Applies wildcard matching to layout names using the user filter (default is <Bold>*</Bold> which shows everything).<LineBreak/>
β’ <Bold>Model inclusion control</Bold>: When <Bold><Run Foreground="DarkRed">Include Model</Run></Bold> is off, the layout named <Bold>MODEL</Bold> is excluded from the list.<LineBreak/>
β’ <Bold>Multi-selection</Bold>: The list supports multi-select, and a live <Bold>Selected count</Bold> is displayed.<LineBreak/>
β’ <Bold>Selection utilities</Bold>: <Bold><Run Foreground="DarkRed">Select All</Run></Bold> selects every displayed item; <Bold><Run Foreground="DarkRed">Select None</Run></Bold> clears selection.<LineBreak/>
β’ <Bold>Copy output</Bold>: <Bold><Run Foreground="DarkRed">Copy to Clipboard</Run></Bold> sends the selected layout names to the Windows clipboard, separated by line breaks (one per line).<LineBreak/>
β’ <Bold>Selection preservation on rebuild</Bold>: When the list is rebuilt (Apply or Include Model change), the program tries to reselect previously selected items by name, as long as they still exist in the filtered list.<LineBreak/>
<Bold>Important program behaviors</Bold><LineBreak/>
β’ The dialog definition (DCL) is <Bold>embedded</Bold> and written to a temporary file each run, with a <Bold><Run Foreground="DarkRed">unique dialog name</Run></Bold> generated from the drawing date variable so repeated runs do not collide.<LineBreak/>
β’ Clipboard copy uses two strategies:<LineBreak/>
β’ First attempt: <Bold>MSHTML</Bold> clipboardData setdata.<LineBreak/>
β’ Fallback: write text to a temp file then call <Bold><Run Foreground="DarkRed">PowerShell Set-Clipboard</Run></Bold> and also attempt <Bold><Run Foreground="DarkRed">clip.exe</Run></Bold> as an additional fallback path.<LineBreak/>
β’ If the user clicks copy with no selection, the dialog message shows <Bold>Nothing selected</Bold> and an alert prompts the user to select one or more layouts.<LineBreak/>
<Bold>Key internal functions</Bold><LineBreak/>
β’ <Bold><Run Foreground="DarkRed">ALLLAY:Run</Run></Bold>: Main routine that builds the layout list, writes and loads the DCL, wires UI actions, and shows the dialog.<LineBreak/>
β’ <Bold><Run Foreground="DarkRed">ALLLAY:rebuild</Run></Bold>: Recomputes the displayed list based on filter and Include Model, then repopulates the list box.<LineBreak/>
β’ <Bold><Run Foreground="DarkRed">ALLLAY:get-selected-names</Run></Bold>: Converts selected list indexes into layout name strings.<LineBreak/>
β’ <Bold><Run Foreground="DarkRed">ALLLAY:copy-selected</Run></Bold>: Builds the clipboard payload (names separated by CRLF) and calls the clipboard function.<LineBreak/>
β’ <Bold><Run Foreground="DarkRed">ALLLAY:copy-clipboard</Run></Bold>: Performs the clipboard write using MSHTML first, then PowerShell and clip.exe fallback.<LineBreak/>
β’ <Bold><Run Foreground="DarkRed">ALLLAY:cleanup</Run></Bold>: Unloads the dialog and deletes the temporary DCL file.<LineBreak/>
β’ <Bold><Run Foreground="DarkRed">error</Run></Bold>: Ensures cleanup on unexpected errors, suppressing normal cancel and break messages.<LineBreak/>
<Bold>Outputs</Bold><LineBreak/>
β’ Primary output: layout names copied into the Windows clipboard, one per line, suitable for pasting into text, spreadsheets, or CAD documentation.<LineBreak/>
β’ On-screen feedback: message field shows count copied (for example <Bold>3 copied</Bold>) after a successful copy.<LineBreak/>
</TextBlock>
<Grid>
<Image Source="Image_000.jpg" Stretch="Uniform"/>
</Grid>
<Grid>
<Image Source="Image_001.jpg" Stretch="Uniform"/>
</Grid>
<Grid>
<Image Source="Image_002.jpg" Stretch="Uniform"/>
</Grid>
</StackPanel>
</src:RibbonToolTip.ExpandedContent>
</src:RibbonToolTip>
</ResourceDictionary>

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