• Skip to main content
  • Skip to primary sidebar
  • Skip to footer
blog.draftsperson.net

blog.draftsperson.net

the art of technical drawing

blog.draftsperson.net

DWGPUSH LISP: Copy Objects Into Drawings Without Opening

August 3, 2026

Select objects, tick a list of drawing files, and DWGPUSH copies those objects into every one of them and saves them — all without opening a single drawing in the editor.

What DwgPush does

This is the job that otherwise means opening thirty drawings one at a time, pasting to the same coordinates in each, saving and closing. On a revision that adds a new north arrow, a revised legend or an updated general note to a whole drawing set, an afternoon becomes a few seconds.

Objects land in the same layout name they were copied from. Copy from the Model tab and they arrive in Model space; copy from a layout called A-101 and they arrive in the target’s A-101 layout, which is created if it does not exist.

Coordinates are preserved exactly, so anything positioned relative to a title block stays where it belongs.

How to use it

  1. Test on copies first. See the warning below.
  2. Load the routine with APPLOAD, or put it on your support file search path.
  3. Type DWGPUSH.
  4. Select the source objects. Viewports are excluded — they cannot be meaningfully copied between drawings.
  5. Tick the target files in the multi-file browser.
  6. Read the count at the end. It tells you how many did not take.

How it works

The heavy lifting is done by ObjectDBX, a database-only interface that opens a DWG file’s contents in memory with no editor window, no regeneration, no view and no plot settings to reconcile. It is dramatically faster than scripting the real editor, and it cannot disturb the drawing you are working in.

The source objects are packed into a safearray variant, which is the only form vla-CopyObjects accepts. Then for each target: get a document object, find or create the matching layout, copy the objects into that layout’s block, and save.

That last step has an important subtlety. If a target drawing is already open in this AutoCAD session, ObjectDBX must not be used on it — two independent handles on one file will overwrite each other’s changes. The routine builds an index of every open document up front and routes those files through the live document object instead.

The currently active drawing is skipped altogether. Copying objects into the drawing you are copying them from would duplicate them, and the save that follows would commit that duplication without asking.

Notes and limits

  • Saving is unconditional and there is no undo across files. Run it on a test copy first if the target set matters.
  • Targets open in another AutoCAD session, or held read-only, are reported as failures and skipped. The count at the end tells you how many did not take — read it.
  • Viewports cannot be pushed. They are excluded at selection.
  • The active drawing is never a target, deliberately.

Download and details

NameDwgPush — copy objects into other drawings without opening them
DownloadDwgPush.lsp — 43.3 KB, plain AutoLISP source. Downloads directly; no zip to unpack.
TypeAutoCAD AutoLISP routine
CommandDWGPUSH
Requiresthe ActiveX layer (loaded automatically by the routine with vl-load-com); nothing extra — the dialog is written to a temporary file at run time and deleted again, so there is no .dcl to install.
Source size43.3 KB, 1,039 lines
Error handlingYes — a *error* handler restores every system variable it changed, on cancel as well as on error.
UndoThe whole operation is wrapped in a single undo group, so one U reverses all of it.
CompatibilityAutoCAD (any release with AutoLISP), BricsCAD, ZWCAD, GstarCAD, ProgeCAD and other IntelliCAD-based platforms. AutoCAD LT needs a LISP enabler. No .NET, no ObjectARX, no installer.
AuthorYZ, August 2026
LicenceFree to use, supplied “as is” with no warranty.

References

  • BATCHSCRIPT LISP — run any command across a folder instead of copying objects
  • BORROW LISP — pull definitions the other way, from a drawing into yours
  • ATTPUSH LISP — write attribute values across a folder
  • More free AutoLISP routines on this site
  • Wisey’s Steel Shapes — free structural steel section drawing program

Filed Under: AutoLISP Routines

Primary Sidebar

Subscribe to our Youtube Channel

Post CAD drafting jobs on Freelancer.com. and get some free money to do this.

Categories

  • American Steel Industry (4)
  • AutoCAD Articles & Reference (30)
  • AutoCAD Bugs & Problems (19)
  • AutoCAD Tips (29)
  • AutoCAD Tutorials (54)
  • AutoLISP Routines (328)
  • AutoLISP Tutorials (15)
  • CAD Standards (7)
  • Civil 3D (7)
  • Civil Drafting (4)
  • Dimensions (2)
  • Drafting Funnies (71)
  • Drafting History (9)
  • Drafting Standards (84)
  • Electrical Drafting (2)
  • General IT reference (7)
  • Geometry (15)
  • GIS (2)
  • Hatch Patterns (12)
  • Office Life Hacks (3)
  • PT (1)
  • Revit Tutorials (54)
  • Steel Detailing (14)
  • Structural Drafting (26)
  • Technical Dictionary (61)
  • Useful Website Links (19)

Footer

Free downloads

  • Free AutoLISP routines
  • Free hatch patterns
  • SHX fonts & text styles
  • Numbering LISP collection
  • ISO 3098B font

Reference charts

  • AWS weld symbols chart
  • Steel detailing chart
  • Hole & slot sizes
  • Bolt edge distance
  • ANSI & ARCH paper sizes
  • How to fold an A1 drawing

Useful links

  • CAD blocks (DWG)
  • Revit families
  • structuraldrafter.com
  • cad-corner.com
  • About
  • Privacy policy

Provided for free with no warranty · Log in