DuplicateLayouts_01

Short description

DuplicateLayouts provides a DCL Dialog_UI to queue layout tabs with copy counts, then batch duplicate them using -LAYOUT Copy with safe fallbacks and unique naming.
duplicatelayouts 000

Command:

Commands
  • DuplicateLayouts opens the dialog and runs the full tool workflow.

Description:

What the user does
  • Run DuplicateLayouts to open the DCL dialog.
  • Select a layout in Available Layouts and enter Number of copies.
  • Press Set Count to add or update that layout in Selected Layouts and Copies summary.
  • Press Apply to duplicate and keep the dialog open, or press OK to duplicate and exit.
  • Press Undo to undo the last session operation, then continue working in the dialog.
  • Press Delete to remove an item from the summary when a summary row is selected, otherwise delete the selected available layout tab from the drawing.

Helper function: (if any)​

Key helper behavior
  • Builds the available layout list by iterating the Layouts collection and excluding Model.
  • Maintains stable session state using globals for selected layouts, delete target, and undo availability.
  • Generates unique destination names using BaseName_### with zero padded numbering and an existence check before each creation.
  • Copies layouts using -LAYOUT Copy with multiple fallback variants to handle command localization or option differences.
  • Wraps duplication and deletion in StartUndoMark and EndUndoMark so each operation can be reverted cleanly.
  • Implements session undo by issuing UNDO 1 and tracking a session counter to enable or disable the Undo button.
  • Writes a temporary DCL file, loads it, runs the dialog loop, then unloads the dialog and deletes the temp file on exit.

Functionalities:

Functionalities
  • Queue layouts for duplication
    • Select an available layout and set Number of copies.
    • Press Set Count to add or update the queued entry in the summary list.
    • Displays queued items as layout : count for review before applying.
  • Batch duplicate layouts
    • Apply duplicates all queued layouts and keeps the dialog open for additional changes.
    • OK duplicates all queued layouts then exits, and exits silently if nothing is queued.
    • Each duplicate is created with a unique name BaseName_### to prevent naming conflicts.
  • Delete behavior
    • If a summary row is selected, Delete removes that queued entry only and does not change the drawing.
    • If no summary row is selected and an available layout is selected, Delete deletes that layout tab from the drawing and switches CTAB to Model first if the tab was active.
    • Deletion blocks invalid targets such as Model and missing layouts with clear alerts.
  • Undo within the session
    • Undo runs a single step undo using UNDO 1 for the last duplication batch or delete operation executed in this dialog session.
    • The tool enables the Undo button only after at least one operation was performed during the session.
  • UI rules
    • Apply is disabled until at least one layout is queued with Set Count.
    • OK remains enabled always, and will only duplicate when there are queued items.

Result:

Tags
  • Layouts, DCL, Dialog_UI, General_AutoCAD, Extra_AutoCAD, Lisp
Suggested relevant tags not in the provided list
  • Undo or UndoMark grouping
  • Naming or UniqueName generation
  • Batch duplication workflow

Images, animations etc.

duplicatelayouts 000
Pixel

Additional info:

Share this page:

Leave a Reply

Page Tag: 🏷️ Layouts_menu

  • DuplicateLayouts_01

    β€”

    by

    Short description DuplicateLayouts provides a DCL Dialog_UI to queue layout tabs with copy counts, then batch duplicate them using -LAYOUT Copy with safe fallbacks and unique naming. Command: Commands DuplicateLayouts opens the dialog and runs the full tool workflow. Description: What the user does Run DuplicateLayouts to open the DCL dialog. Select a layout in…

  • Zoom Extend Window

    β€”

    by

    Short description What this LISP does ZEZW opens a DCL dialog to multi-select layouts and then applies Zoom Extents or Zoom Window in Paper Space on the selected layouts. Key concept The zoom action runs after the dialog closes for stability and predictable execution. Command: Commands ZEZW Main command that launches the selection dialog and…

  • AnnoAllOnOff

    Short descriptionπŸ”‡ AnnoAllOff is an AutoCAD and Civil 3D AutoLISP utility that sets ANNOALLVISIBLE to 0 for selected Model/Layout tabs through a DCL picker. πŸŽ›οΈ It helps users turn off global annotative visibility per tab while keeping control over which layouts are updated. Command:πŸš€ Main command: AAOFF πŸŽ›οΈ Dialog title: ANNOALLVISIBLE -> 0 (Choose Tabs)…

  • DuplicateLayouts_00

    β€”

    by

    Short description Shows a DCL dialog to choose paper-space layouts and specify how many copies to create for each, then duplicates the selected layouts using the LAYOUT command. Provides a summary list where selected layouts and their copy counts can be reviewed and removed before running the duplication. Command: Command: DuplicateLayouts Description: Creates a temporary…

  • AnnoAllOn

    β€”

    by

    Short description Opens a DCL picker to choose Model and Layout tabs, then sets ANNOALLVISIBLE to 1 on the selected tabs. Includes quick selection controls for All and None before applying changes. Command: Command: AAON Description: Generates a temporary DCL dialog at runtime listing all tabs, including Model, with multi-select enabled. On confirmation, switches to…

  • Page setups all layouts – to be updated / new page

    β€”

    by

    Short description Comming soon … Command: Comming soon … Description: Comming soon … Helper function: (if any)​ Comming soon … Functionalities: Comming soon … Result: Comming soon … Images, animations etc. Lisp code: Expand Code ⬇ Select Code Copy Code Comming soon … Additional info: Based on / Source code: Open Website Share this page:

  • TitleBlocksTools

    β€”

    by

    Short description Title Blocks Tools – Unified Menu System Comprehensive dialog-based interface for exporting and updating titleblock attributes via CSV with integrated help, file management, and reload utilities. Command: Commands: TitleBlocksTools, EXPTBCSV_EXPORT, UTB2 Description: This integrated toolset combines CSV export and import functionality for titleblock attribute management: Main Menu Dialog provides radio button selection between…