DuplicateLayouts_00

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.
duplicatelayouts 000

Command:

  • Command: DuplicateLayouts

Description:

  • Creates a temporary DCL file at runtime and opens a dialog listing available layouts (excluding Model).
  • Allows the user to assign a Number of copies to the currently highlighted layout using Set Count, building an internal map of LayoutName → CopyCount.
  • Shows the chosen layouts and counts in a summary list; the user can remove entries via Delete prior to execution.
  • On OK, duplicates each selected layout the requested number of times by calling ._layout _copy and naming copies with an incremented numeric suffix (e.g., Layout_01, Layout_02).

Helper function: (if any)​

  • writeDCL writes the dialog definition to a temporary .dcl file used for the session.
  • getLayoutNames enumerates document layouts via ActiveX, excluding Model, and builds the available layout list displayed in the dialog.
  • updateSummary repopulates the summary list box from the internal layoutMap so the UI reflects current selections and counts.
  • action_tile \”set\” reads the selected layout index and copy count, then inserts or replaces the layout entry inside layoutMap.
  • action_tile \”delete\” removes the highlighted summary entry from layoutMap and refreshes the summary list.
  • c:DuplicateLayouts controls the full lifecycle: DCL creation, list population, dialog execution, cleanup, and layout copy execution.

Functionalities:

  • Runtime DCL generation creates and deletes a temporary dialog file automatically.
  • Layout list shows available paper-space layouts and excludes Model from duplication choices.
  • Per-layout copy counts lets the user assign different copy quantities per selected layout using the Set Count workflow.
  • Summary management displays the configured list of layouts and counts and allows removal via Delete prior to running copies.
  • Automated naming generates new layout names by appending a two-digit sequence suffix to the source layout name.
  • Command-based duplication performs duplication using ._layout _copy for each requested copy instance.

Result:

  • If the user clicks OK, each selected layout is duplicated the specified number of times and new layouts are created with incremented suffix names.
  • If the user cancels, no layouts are duplicated and the routine exits after removing the temporary DCL file.
  • Always unloads the dialog and deletes the generated DCL file after closing the UI.
  • If the dialog fails to load, prints DCL failed. and exits without changes.

Images, animations etc.

duplicatelayouts 000
duplicatelayouts 001
duplicatelayouts 002
duplicatelayouts 003
duplicatelayouts 004
Pixel

Additional info:

Share this page:

Leave a Reply

Page Tag: 🏷️ Autocad Lisps

  • DuplicateLayouts_00

    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

    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…

  • Copy2Layouts

    Short description Opens a dialog to pick objects once, then copies them to multiple selected paper-space layouts, showing only the total selected object count. Includes a wildcard layout filter and multi-select layout targeting with Select All and Select None actions. Command: Commands: Copy2Layouts and macro-friendly alias _Copy2Layouts Description: Creates a temporary DCL file each run…

  • LayoutNum

    Short description Provides a DCL dialog to batch rename layouts using sequential numbering with optional prefix, suffix, and zero-padding, with filtering and preview. Supports in-dialog Apply and multi-level Undo without calling AutoCAD UNDO from DCL callbacks, to avoid stability issues. Command: Commands: LAYOUTNUM, _LAYOUTNUM, LayoutNum Description: Builds a unique DCL dialog definition at runtime and…

  • LockAllVp

    Short description Tags: Layouts, Paper Space, Viewports, DCL, Dialog_UI, Lisp, CAD, Clipboard Suggested tags not in list: ObjectARX, COM_Automation, Stability, Undo_Stack Command: • LOCKALLVP Open the dialog to lock or unlock viewports in selected layouts. • LockAllVp Alias command to run the same dialog workflow. • _LOCKALLVP Underscore alias for macro use. Description: This tool…

  • Zoom Extend

    Short description LZE summary LZE opens a DCL selection dialog for Layouts, then runs Zoom Extents in Paper Space on the selected layouts after the dialog closes. Key stability rule The zoom action is executed after the dialog closes to avoid UI timing issues. Command: Command LZE Runs Zoom Extents on selected layouts in Paper…

  • Zoom Window

    Short description LZW summary LZW opens a DCL selection dialog for Layouts, then prompts for a window and runs Zoom Window in Paper Space on the selected layouts after the dialog closes. Key stability rule The zoom action is executed after the dialog closes to avoid UI timing issues. Command: Command LZW Runs Zoom Window…

  • Layouts_list

    Short description Shows a DCL dialog listing all layouts with wildcard filtering and multi-select, then copies the selected layout names to the Windows clipboard (one per line). Includes optional Model tab inclusion, selection count display, and Select All or Select None shortcuts. Command: Commands: ALL_LAYOUTS_LIST, All_Layouts_list Description: Collects layout names from the active drawing using…

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

    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:

  • FreezeLayersInVP

    Short description Shows a DCL dialog to filter and multi-select layers, then freezes the selected layers in the current viewport using VPLAYER. Supports filtering by Current layers, Xref layers, or Current_and_Xref, with an optional Xref picker and a fixed-width “faux columns” layer list. Command: Commands: FreezeLayersInVP and alias FLVP Description: Builds an embedded DCL file…