Last updated July 28, 2026
DOF offsets a line to both sides at once and deletes the original. One pick and one distance turns a single centreline into a pair of parallel lines — which is how you draw a wall, a road, a duct, a channel or anything else where the line you drew is the middle of the thing rather than its edge.
Doing it with AutoCAD’s OFFSET command means running it twice, picking a side each time, and then erasing the original. That is three operations and an easy one to forget the third of, leaving a stray centreline in the drawing. DOF is the same job as one command.
It is version 1.0, dated 28 March 1996, by Paul Standing.
What it does in practice
It asks for the offset distance, remembering the last one you used and offering it as the default, so drawing a run of walls at the same thickness means pressing Enter each time rather than retyping the figure. The remembered value survives for the whole drawing session.
Then you pick the line, and then you pick a point on one side of it. That second pick is doing more work than it looks: from where you clicked, the routine works out which side of the line you are on, and then calculates the mirror-image point on the other side. It offsets to your point and to that mirrored one, giving you both lines from a single indication. Finally it deletes the original.
Note that the distance you give is the offset from the centreline, so the finished pair sits twice that far apart. For a 200 wide wall drawn off its centreline, enter 100.
It also shrinks the pick box while you select the line and puts it back afterwards, which makes picking the right line in a crowded area easier.
The original is deleted, not erased
A detail worth knowing, because it changes how you recover from a mistake. The routine removes the original line using a low-level delete rather than AutoCAD’s ERASE command. The practical difference is that the entity is unlinked from the drawing rather than put in the erase queue, so a plain U may not bring it back the way you expect.
In practice you rarely want it back — the whole point is to be rid of it — but if you offset the wrong line, be ready to redraw it rather than assuming undo will restore it. There is no undo grouping around the operation either, so backing out a run of these takes several presses.
The routine also leaves a handful of its working variables in the session, including the remembered offset distance, which is deliberate — that is how the default persists between runs.
Command reference
The file defines a single command, DOF, for double offset. It reminds you of the name when it loads: “Type DOF to envoke the command”.
How to load it
Unzip Dof.zip and load DOF.LSP with APPLOAD, or add it to the Startup Suite — it is short, it has no support files, and it is the kind of command that only saves you time if it is already loaded. Our AutoLISP guide covers loading.
Step-by-step usage
- Draw the centreline of whatever you are making.
- Type DOF. It shows the current offset distance and waits.
- Press Enter to keep that distance, or type a new one. Remember it is half the finished width.
- At “Pick the line:” select the centreline.
- At “Pick an offset side:” click anywhere on either side of it. Both offsets are drawn and the original is removed.
Compatibility notes
Dated 1996, so written-for rather than tested-on. It drives AutoCAD’s own OFFSET command and does its own geometry with standard functions, none of which has changed, so it is a reasonable bet on a current release.
It is plain AutoLISP with no dialog boxes and no Express Tools calls, so nothing in it requires the full product; LT users on LT 2024 or later, the release that brought AutoLISP to LT, should be able to run it. See what runs on AutoCAD LT. Since it deletes the object you pick, try it on a copy the first time.
Download
| Name: | DOF |
| Description: | Function creates an offset to either side of the selected entity and erases the original. |
| Type: | AutoCAD AutoLISP Routine |
| Author: | Paul Standing |
| File Size: | 1 Kb |
| Cost: | Free |
| Worked on: | AutoCAD |
| Download File: | Dof.zip |
Related routines
- WALLS — a full wall drafting package if double offsets are most of what you need.
- DTWALL — wall layer management from the same era.
- BreakPoint — another one-keystroke shortcut for a common editing job.