CopyPaste2BasePoint

Short description

📋 CopyPaste2BasePoint is an AutoCAD AutoLISP productivity tool for copying selected drawing objects with a fixed base point at 0,0,0 and pasting clipboard content back at the same origin-based coordinate.

Command:

🚀 Main commands:
– Copy2BasePoint: selects drawing entities and runs AutoCAD COPYBASE using 0,0,0 as the base point.
– PasteBasePoint: runs AutoCAD PASTECLIP using 0,0,0 as the insertion point.
🧩 Header reference:
– CB: documented as copy with base point 0,0,0 in the original header.
– PB: documented as paste with base point 0,0,0 in the original header.

Description:

📐 CopyPaste2BasePoint streamlines a common CAD coordination workflow: copying geometry from one drawing and pasting it into another drawing while preserving the same origin reference.
🧭 Instead of manually choosing a base point each time, the routine uses the fixed coordinate 0,0,0 for both COPYBASE and PASTECLIP operations.
🔄 This is useful for AutoCAD, Civil 3D, and infrastructure drafting workflows where xrefs, base drawings, layouts, design references, or copied model geometry must stay aligned by drawing origin.
đŸ›Ąī¸ Before running the copy or paste command, the program temporarily disables object snaps and command echo settings to reduce accidental snap interference.
🔁 After the operation, it restores OSMODE, CMDECHO, optional 3DOSMODE, and optional AECBOSMODE values so the user’s drafting environment is returned to its previous state.

Helper function: (if any)​

🧰 CB_PB_COMMON_SETVAR: starts an undo mark, stores current drafting variables, disables OSMODE, disables 3DOSMODE when available, suppresses CMDECHO, and optionally sets AECBOSMODE to zero.
🔁 CB_PB_COMMON_RESTORE: restores OSMODE, AECBOSMODE, 3DOSMODE, and CMDECHO, then closes the undo mark and clears temporary global values.
🧠 GET_AECBOSMODE: checks whether AECBOSMODE exists and extracts its current value from the AutoCAD command prompt so the previous setting can be restored safely.
🔌 vl-load-com handling: ensures Visual LISP COM access is available before ActiveDocument and undo mark operations are used.

Functionalities:

📋 Copy selected objects using AutoCAD COPYBASE with base point 0,0,0.
📌 Paste clipboard geometry using AutoCAD PASTECLIP at insertion point 0,0,0.
🧭 Supports origin-based CAD transfer workflows between drawings.
🔒 Temporarily disables OSMODE to prevent object snap interference during copy and paste operations.
🧊 Temporarily disables 3DOSMODE when the variable exists, improving reliability in 3D snap environments.
đŸ—ī¸ Handles AECBOSMODE when available, making the routine more compatible with AutoCAD MEP and AEC-based installations.
🔇 Temporarily suppresses CMDECHO for a cleaner command-line workflow.
â†Šī¸ Wraps operations in AutoCAD undo marks using ActiveX document methods.
✅ Restores previous drafting settings after the command completes.

Result:

✅ The result is a faster and safer AutoCAD copy-paste workflow for moving geometry between drawings while keeping objects aligned to the same 0,0,0 base point.
📐 The tool reduces manual base point mistakes, supports coordinated model-space transfers, and helps maintain drawing origin consistency in production CAD environments.

Images, animations etc.

Pixel

XAML code:

Comming soon ...

Additional info:

Share this page:

Leave a Reply

Page Tag: đŸˇī¸ OSMODE

  • CopyPaste2BasePoint

    —

    by

    Short description Command: Description: Helper function: (if any)​ Functionalities: Result: Images, animations etc. XAML code: Expand Code ↓ Select Code Copy Code Expand Code âŦ‡ Select Code Copy Code Additional info: Based on / Source code: Share this page: