Function Syntax: LayoutTools Version: 1 Date: 29.12.2025 AI+ LayoutTools summary This program opens a dialog that lets the user filter and select layout tabs, then apply viewport locking, annotation visibility toggles, and paper space zoom operations across the chosen layouts. How the user interacts with it The user runs LayoutTools (or its aliases) to open a DCL dialog. The user can filter the layout list by name using wildcard patterns such as * and ?. The user selects one or more layouts in a multi select list, or switches scope to affect all currently displayed layouts. For Zoom Window, the program closes the dialog first, then prompts the user to pick two corners in the drawing. Main commands and aliases Primary command: LayoutTools Aliases: LayoutTools, _LayoutTools Core functionalities Layout filtering and targeting • Filter layouts by wildcard pattern, default * meaning all. • Option to Include Model in the list, otherwise Model is excluded from actions. • Scope switch between Selected layouts and All displayed layouts. • The list displays per layout status columns for lock, annotation, and zoom tracking. Viewport Lock and Unlock Lock sets DisplayLocked for paper space viewports in the targeted layouts. Unlock clears DisplayLocked for the same viewports. • Optional rules that modify which layouts and viewports are affected. Skip NoVP prevents actions on layouts with no usable paper space viewports. Skip OFF VP excludes viewports that are turned off, when evaluating which viewports to lock or unlock. • Lock status shown per layout as Locked, Unlocked, Mixed, NoVP, or Model. Annotation visibility control per layout tab AnnON sets ANNOALLVISIBLE to 1 for the targeted layouts. AnnOFF sets ANNOALLVISIBLE to 0 for the targeted layouts. • The tool reads and displays annotation state as AnnOn, AnnOff, or Ann? when state cannot be determined. • When applying annotation changes, it temporarily switches to each tab as needed, forces paper space, applies the setting, then restores the previous environment. Zoom operations in paper space across layouts Zoom Extents applies a paper space zoom extents in each targeted layout. Zoom Window applies a paper space zoom window using two user picked corners, then repeats that same window for each targeted layout. • Zoom is executed using ActiveX when possible, and falls back to command line zoom if ActiveX fails. • The tool tracks zoom status per layout as ZExt, Z-, or Z?. • Zoom status is persisted inside the drawing using Named Object Dictionary storage with XRECORD, so it survives reopen of the DWG. Clipboard export Copy copies a tab separated report for the current target scope. • Each line includes layout name, lock status, annotation status, zoom status. • Clipboard uses an HTMLFile clipboard interface first, with a PowerShell or clip fallback method if needed. What the dialog displays • A list of displayed layouts with fixed width formatting. • Columns per row: LockStatus, AnnStatus, Zoom. • Buttons: Select All, Select None, Copy, Lock, Unlock, AnnON, AnnOFF, Zoom Extents, Zoom Window. • A live count of selected layouts. Important behavior and safeguards • Actions avoid Model space by default and treat Model as not applicable for viewport operations. • Viewports of Number 1 in a layout are treated as the overall paper space viewport and are excluded from lock operations. • The tool wraps lock and zoom operations in an undo mark, allowing a single undo step for batch changes. • It uses a quiet mode by setting CMDECHO to 0 and attempts to set NOMUTT to reduce command noise, then restores original values. • It restores the previous TILEMODE, CTAB, and MSPACE state after annotation and zoom operations. One sentence description for quick identification This tool provides a batch layout manager to Lock or Unlock viewports, toggle ANNOALLVISIBLE via AnnON or AnnOFF, and apply Zoom Extents or Zoom Window across selected or filtered layouts, while tracking zoom status persistently inside the DWG.