Function Syntax: GoToLayout Version: 2 Date: 24.12.2025 AI+https://forums.augi.com/showthread.php?69541-A-way-to-select-a-layout-tab-with-a-lisp Summary This program provides an interactive way to find and switch to drawing layouts using wildcard filters, through a temporary DCL dialog generated at runtime. How the user runs it Type GOTOLAYOUT at the AutoCAD command line to open the dialog. What the user does in the dialog • Enter a layout name filter using wildcards and ? (example: A, SHEET??). • Review matching layouts in a list (the list includes Model). • Optionally enable Preview switch while browsing to switch tabs as you move through the list. • Use Next and Prev to cycle through matches (wrap-around navigation). • Click OK to commit the selected layout, or Cancel to revert to the original tab. Functionalities • Filters layouts using wildcard matching via wcmatch with * and ? patterns. • Preserves original layout name casing for display and for switching tabs (no forced uppercase for the actual layout names). • Sorts matching results alphabetically in a case-insensitive manner for predictable browsing. • Disables OK and disables navigation when there are zero matches, preventing invalid layout switches. • Remembers the last used filter pattern (it reappears the next time you run the command). • Supports optional live switching using Preview, so users can visually confirm they are on the intended sheet before committing. Important behaviors to recognize • The active tab is changed by setting CTAB to the selected layout name. • If the user cancels, the program restores the original CTAB (even if preview switching was used). • If the filter is empty, it is treated as * (meaning all layouts match). Temporary files and cleanup • The dialog is created by writing a temporary .dcl file with a unique name each run (generated with vl-filename-mktemp). • The temporary .dcl file is deleted after the dialog closes, whether the user clicks OK or Cancel.