Function Syntax: LayoutNum Version: 2 Date: 24.12.2025 AI+https://www.cadtutor.net/forum/topic/14298-tabsortlsp/ LayoutNum — Layout Numbering and Renaming Utility This program will prompt the user with a dialog to filter, select, preview, and rename drawing layouts (paper space tabs), using a controlled numbering scheme. How to Run Commands: LAYOUTNUM, _LAYOUTNUM, LayoutNum Running any of these commands opens the Layout Numbering dialog. What the User Must DoOptionally enter a wildcard filter using * and ? to narrow the layout list.Select one or more layouts from the list (multi-select).Enter rename parameters: Starting Number, Width, Prefix, Suffix.Review the Preview (Old to New) before committing changes. Primary FunctionalitiesFilter layouts by wildcard pattern: Apply Filter rebuilds the visible list using patterns such as A* or Sheet??.Multi-select layout targeting: The list supports selecting multiple layouts for batch renaming.Select All and Select None: Quickly select every visible layout or clear the selection.Preview before rename: Shows a calculated mapping of each selected layout name to the proposed new name.Batch rename with numbering: Renames selected layouts to Prefix plus a sequential number plus Suffix.Zero padding control: Width controls numeric padding, such as 01 or 001.Ordering control: Numbering can follow Tab Order or Alphabetical order.Automatic conflict resolution: Optionally appends -1, -2, and so on, if a generated name already exists.Include Model option: Model can be shown in the list, but it is flagged as cannot rename and will block applying changes if selected. Dialog Buttons and ActionsApply Filter: Applies the wildcard filter and refreshes the visible layout list without renaming.Refresh Preview: Recomputes the Old to New mapping from the current selection and rename settings.Apply: Performs the renaming immediately and keeps the dialog open.Undo: Reverts the most recent Apply or OK rename operation using a safe internal rename history.OK: Performs the renaming and closes the dialog.Cancel: Closes the dialog without performing a new rename action. Important Behaviors and ConstraintsModel layout cannot be renamed: If Model is included and selected, renaming is blocked to prevent invalid operations.Undo is manual and safe: Undo does not rely on AutoCAD UNDO command calls during the dialog, avoiding ARX exceptions.No forced exit: The dialog remains open after Apply so the user can apply multiple rename passes.User settings persist between runs (filter, numbering, width, prefix, suffix, options). Typical Use Case ExampleFilter: * to show all layouts.Select layouts: Layout1 and Layout2.Set: Starting Number 1, Width 2, Prefix aaa_, Suffix blank.Preview shows: Layout1 => aaa_01 and Layout2 => aaa_02.Press Apply to rename without closing, or OK to rename and close.