All_Layouts_list

Short description

📋 AutoCAD layout list dialog for filtering, multi-selecting, and copying layout names from a drawing.

Image 000 25

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.

Image 000 25
Image 001 15
Image 002 11
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="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>

Share this page:

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
0
Would love your thoughts, please comment.x
()
x