BIM

The EXTEND command in AutoCAD: two modes and a forgotten variable

The EXTEND command in AutoCAD has had two working modes since the 2021 release. We measured both, plus the variable that extends to an implied edge.

  • TS. Đỗ Quốc Hoàng
  • 8 min read
Two horizontal lines short of the boundary; after EXTEND the upper one reaches it exactly Photo: Screenshot taken on AutoCAD 2027 at the Institute

The extend command in AutoCAD stretches a line until it meets another. Simple enough, and most drafters use it for a decade without noticing that since the 2021 release it has two quite different working modes.

This article measures both, along with a variable that extends to an implied edge, on AutoCAD 2027 at the Institute. For the full set of editing commands, see the AutoCAD for Construction course.

One command, one job

The alias is EX, and the extend command in AutoCAD has carried that alias for as long as anyone can remember. Autodesk's EXTEND page describes it in one line: "Extends objects to meet the edges of other objects."

We measured with coordinates rather than trusting the eye. A horizontal line 2000 long, a vertical boundary 3000 from its start point. Start the command, pick the boundary, pick the line:

StageLine lengthSecond endpoint
Before extending2000.0004839.69
After extending3000.0005839.69

The line stops exactly at the boundary, not a thousandth over or short.

Before and after extending Photo: The vertical line on the right is the boundary. Left: two horizontal lines, both 2000 long, short of it. Right: the upper line is now 3000 and touches the boundary exactly, the lower one is untouched

Quick and Standard mode change how object selection works

This is the biggest change to the command in years, and plenty of people still assume something is broken when it stops asking for boundaries.

The first line the command prints, copied verbatim from the 2027 release.

Current settings: Projection=UCS, Edge=None, Mode=Standard

The next prompt carries the option that switches modes.

Select objects or [mOde] <select all>:

Enter an extend mode option [Quick/Standard] <Standard>:

The two modes work in opposite ways because they change when object selection happens, and Autodesk describes each in its own paragraph.

On Quick: "All objects automatically act as boundary edges." Every line in the drawing counts as a boundary, so there is nothing to ask.

On Standard: "first select the boundaries and press Enter. Then select the objects to be extended." This is the older workflow that experienced drafters have in their fingers.

ModeHow it worksSuits
Quickno boundary prompt; hover over the line to extendquick fixes on a few lines
Standardpick boundaries first, then the linesdense drawings where the boundary matters

We measured which variable stores the choice. Pick Quick, read TRIMEXTENDMODE, then pick Standard and read it again:

Mode chosenTRIMEXTENDMODE
Quick1
Standard0

Knowing that pair lets you set the default for the whole machine without entering the command. Set TRIMEXTENDMODE to 0 if the older way suits you.

When the boundary edge is too short to reach

This is the case that makes people give up: the line and the boundary can never meet because the boundary is too short.

The fix is not to lengthen the boundary but to change EDGEMODE. Our machine measured 0, the default.

EDGEMODEHow the boundary is read
0the boundary is the real line; the extended line must actually reach it
1the boundary counts as infinitely long; the line reaches the implied edge

Autodesk describes these two states in the command's Edge option. Extend is "Extends the boundary object along its natural path to intersect another object or its implied edge", while No Extend is "Specifies that the object is to extend only to a boundary object that actually intersects it".

Those two words implied edge are the ones to remember: a boundary that is not drawn but that the command still reckons with.

Setting it to 1 solves nearly every case that looks impossible. A sloping roof line and a vertical wall line do not touch, but the extensions of both do cross, and EDGEMODE at 1 reaches that point.

Remember to set it back to 0 afterwards. Left at 1, a line you extend will sometimes shoot a very long way to an intersection you never considered.

Three habits that save time on the implied edge and beyond

First, Enter at the boundary prompt selects everything. The prompt says <select all> in the angle brackets. Press Enter and every line becomes a boundary, close to Quick mode.

Second, hold Shift to trim. The prompt reads, verbatim, Select object to extend or shift-select to trim or. When you meet a line that needs cutting instead, hold Shift and click, without leaving the command.

Third, the end you click is the end that moves. A line has two ends and the command extends the one nearest your pick. Click the wrong half and it goes the other way.

The second habit is the most valuable because it works both ways round: hold Shift inside the trim command and you are extending. The pair is really one tool.

The system variable behind a command that refuses to act

Three causes, in the order worth checking.

First, the line cannot reach the boundary. Extended along its own direction it never crosses the boundary, so the command does nothing. This is when EDGEMODE at 1 earns its keep.

Second, you clicked the wrong end. The line moves toward the end you picked, and that end may be facing away from the boundary.

Third, the boundary sits at a different elevation. Where a drawing contains geometry at a Z other than zero, PROJMODE decides how AutoCAD projects before it calculates. Our machine measured PROJMODE at 1, projection onto the XY plane of the current coordinate system.

Autodesk describes the three values of the Project option. None is "Only objects that intersect with the boundary edge in 3D space are extended". UCS is "projection onto the XY plane of the current user coordinate system". And View is "projection along the current view direction".

Stray geometry at another elevation is common in files received from elsewhere. Tracking it down is covered in our article on hiding objects.

What Quick mode changes about object selection

Quick mode is not simply Standard mode with the first prompt removed. It changes how you pick.

In Standard mode you build a selection set: click lines, window them, press Enter. In Quick mode the cursor works live. Autodesk's own wording lists three ways: "select the objects to be extended individually, press and drag to start a freehand selection path, or pick two empty locations to specify a crossing Fence."

That middle option is the one worth trying. Press and drag draws a freehand path across the screen, and every line the path crosses is extended. On a façade with twenty vertical lines to take up to a roof line, one drag does the lot.

The fence option is the same idea with two clicks instead of a drag, which is steadier on a trackpad.

Neither is available in Standard mode, which is the real argument for leaving the default alone even if the missing boundary prompt feels strange at first.

EXTEND and TRIM are one tool with two faces

The two commands share prompts, system variables and a way of thinking. Learning them separately means learning the same thing twice.

SharedDetail
Mode variableboth use TRIMEXTENDMODE
Boundary variableboth use EDGEMODE
Projection variableboth use PROJMODE
Role swaphold Shift in one and you get the other

The last row saves the most time in a working day. Tidying a junction where some lines are long and some are short, you stay in one command and swap roles with Shift.

Sharing variables has one consequence worth watching. Set EDGEMODE to 1 to reach an implied edge, forget to set it back, and the next trim cuts to an implied edge too. A line loses a length for no visible reason. Cleaning up junctions with fillets is covered in our article on the fillet command.

Three things often repeated that are not true

Often repeatedWhat we measured on the 2027 release
EXTEND always asks for boundaries firstQuick mode does not; TRIMEXTENDMODE at 1 means you are in it
The boundary must be long enough to reachEDGEMODE at 1 extends to the intersection of the extended boundary
To trim you must leave and run TRIMHold Shift inside the command; the prompt says so explicitly

Frequently asked questions

What is the alias for the extend command?

EX. Two letters and Enter.

Why does the new release not ask for boundaries?

Because the default mode is now Quick. To go back, enter the command, choose mOde, choose Standard, or set TRIMEXTENDMODE to 0.

The line will not extend. What is wrong?

Check three things in order: whether the line can actually reach the boundary, whether you clicked the end you meant, and whether the boundary is at the same elevation.

How do I extend to a point where two lines do not meet?

Set EDGEMODE to 1. The command then treats the boundary as infinitely long and reaches the implied intersection.

Can I trim without leaving the command?

Yes. Hold Shift and click the part to cut. The prompt says shift-select to trim.

About the author

TS. Đỗ Quốc Hoàng — Vice Director of the Institute of Information Technology in Civil Engineering, Hanoi University of Civil Engineering, and a specialist in software development for construction