BIM

The RE command in AutoCAD: what a regen costs

The RE command in AutoCAD regenerates everything in the viewport. Measured on AutoCAD 2027 - how long RE takes, how it differs from REDRAW, and when to skip it.

  • TS. Đỗ Quốc Hoàng
  • 8 min read
The same circle in the same drawing, with only VIEWRES changed: a polygon on the left, smooth again on the right Photo: Screenshot taken on AutoCAD 2027 at the Institute

A circle drawn as a polygon, a text style changed but the screen not following, stray marks left behind after an erase — all three are cured by two keystrokes. The RE command in AutoCAD is typed by reflex, yet few people know what it actually does or what it costs.

This article measures every figure on AutoCAD 2027 at the Institute. For the whole drafting workflow on heavy drawings, see the AutoCAD for Construction course.

What the RE command in AutoCAD does

RE is the alias of REGEN. Type it, press Enter, and the command line prints exactly one line:

REGEN Regenerating model.

Autodesk's REGEN page sums it up in a sentence: "Regenerates the drawing from within the current viewport." It then lists exactly three effects:

  1. "Recomputes the locations and visibility for all objects in the current viewport"
  2. "Reindexes the drawing database for optimum display and object selection performance"
  3. "Resets the overall area available for realtime panning and zooming in the current viewport"

Note the words current viewport. REGEN only deals with the one you are inside. For every viewport there is REGENALL.

How regen differs from redraw

There are four redraw commands, and two pairs get confused.

The four commands Photo: The four redraw commands, their scope and what each prints, copied from the real command line on the 2027 release

We typed all four and recorded exactly what AutoCAD printed. The clearest difference is on the command line itself: REGEN and REGENALL both print Regenerating model., while REDRAW and REDRAWALL print nothing at all.

That is not cosmetic. REDRAW repaints the screen from what has already been computed, so it sweeps away stray marks without touching the data. REGEN recomputes from the source data.

Timing: how much dearer is RE than REDRAW

This is a number nobody seems to publish, so we measured it with AutoCAD's own clock.

The test drawing held 4,800 objects. The results:

CommandMeasured time
REGEN, first run437 milliseconds
REGEN, second run484 milliseconds
REDRAW32 milliseconds

REGEN costs roughly fourteen times what REDRAW costs on a medium drawing. Half a second sounds trivial, but multiply it by a few dozen presses in a session, then again by a real documentation file many times heavier than 4,800 objects, and it stops being trivial.

One habit worth changing: when stray marks remain after an erase, type R first. Only reach for RE when R was not enough.

VIEWRES, and circles that look like polygons

This is the most common reason people go looking for RE in the first place.

AutoCAD does not draw a circle as a true curve but as a run of short straight segments. How many is set by the VIEWRES variable. Its prompts, copied verbatim from the 2027 release:

Do you want fast zooms? [Yes/No] <Y>:

Enter circle zoom percent (1-20000) <20000>:

That first question is now only a leftover. Autodesk's VIEWRES page says plainly: "The legacy fast zoom setting is ignored, but the prompt has been retained for script compatibility." Press Enter through it.

We drew a circle of radius 1100, dropped VIEWRES from 20000 to 8, and compared screenshots pixel by pixel. To know what counts as noise, we first took two screenshots with nothing changed: 60 pixels differed, all of them in the command line strip.

TestPixels changedWhere they changed
two screenshots, nothing changed60the command line strip
VIEWRES from 20000 down to 88,945the drawing area
RE typed straight afterwards75the command line strip

That last row is the one to remember: after changing VIEWRES you do not need to type RE. AutoCAD regenerates on its own and prints Regenerating model. as it does. We repeated the test with automatic regeneration switched off, and the result held.

The price is documented too: "Increasing the tessellation value of VIEWRES may result in an increase of the time it takes to regenerate the drawing." A high VIEWRES makes every later regeneration heavier.

REGENAUTO: when to switch it off

By default AutoCAD regenerates whenever something calls for it. That mode is toggled by the REGENAUTO command, whose prompt is short:

Enter mode [ON/OFF] <ON>:

It is also the REGENMODE variable, stored in the drawing rather than in the program. Switch it off and AutoCAD defers regeneration until you type RE.

There is one situation that justifies it: a very heavy drawing where you are about to change several things in a row and each change freezes the screen for seconds. Switch off, make the changes, type RE once. Then switch it back on, because leaving it off means you are always looking at a screen that may be out of date.

One thing worth knowing: not every variable obeys REGENAUTO. We measured PDMODE, which decides how point objects are drawn. Setting it prints Regenerating model. at once, even with REGENAUTO off. VIEWRES behaves the same way. Point display is covered in our article on point style in AutoCAD.

Type R, type RE, or type nothing

The sections above collapse into one simple habit.

When to type RE Photo: Three groups of situation, cheapest first, with the times measured on a 4,800-object drawing

Start with R. It is fourteen times cheaper and cures the most common complaint: stray marks left after an erase or a move, snap markers stuck on screen. That is what REDRAW is for.

Reach for RE only when R was not enough, when you have just switched REGENAUTO back on, or when you want the database reindexed as Autodesk's second bullet describes.

And there is a whole group that needs nothing at all. We measured two cases: changing VIEWRES and changing PDMODE. Both regenerate by themselves, even with REGENAUTO off. Typing RE afterwards costs half a second and changes not one pixel in the drawing area.

Four commands, one rule of thumb

The four names sit on two axes, and the table above splits them cleanly. Scope first: REDRAW and REGEN work on the viewport you are inside, while REDRAWALL and REGENALL sweep every viewport in the layout. Depth second: the two REDRAW commands repaint, the two REGEN commands recompute.

That gives a rule worth keeping. In model space with a single viewport, R and RA do the same thing, and so do RE and REA. It is only in a layout with several viewports that the distinction starts to matter, and there the ALL forms are what you want, because a regeneration inside one viewport leaves the others exactly as they were.

The habit costs nothing to adopt and saves real time on heavy files: reach for the cheap command first, and escalate only when the screen still looks wrong.

What RE cannot fix

This matters more than the list of what it can fix, because when RE does not help you need to know where to look next.

RE does not delete anything. If a "stray mark" survives it, that is not a mark: it is a real object, perhaps a very thin line or one on a layer you thought was off. Open the layer dialog and check — layers are covered in our article on layers in AutoCAD.

RE does not make a drawing lighter. It also reindexes the database, so it costs more work, not less. For a lighter file, use PURGE to strip out blocks, layers and text styles nobody uses.

RE does not repair a damaged file. That is what AUDIT and RECOVER are for.

And RE changes nothing that does not depend on the screen. Plotted lineweights, plot scale, plot style — those live in the plot style table, and no number of regenerations will touch them.

Three things often repeated that are not true

Often repeatedWhat the 2027 release does
You must type RE after changing VIEWRESIt regenerates by itself, even with REGENAUTO off
RE makes the drawing run lighterIt costs extra work; for a lighter file, use PURGE
Typing RE for safety costs nothing437 milliseconds on a 4,800-object drawing, fourteen times REDRAW

Frequently asked questions

Is the RE command in AutoCAD the same as REGEN?

Yes. RE is the alias, and the command line prints REGEN Regenerating model. to confirm it.

What is a regen, briefly?

Making AutoCAD recompute, from the source data, the position and visibility of every object in the current viewport, then repaint the screen from the result.

Which command should I use in a layout with several viewports?

REGENALL, aliased REA. REGEN only handles the viewport you are inside.

My circles still look faceted no matter how often I regen.

Check VIEWRES. If it is low, any number of regenerations will still draw the same number of segments.

Why does AutoCAD freeze for a moment when I type RE?

Because it recomputes the whole viewport. We measured 437 milliseconds on 4,800 objects; a real documentation file is far heavier.

Should I switch REGENAUTO off to speed things up?

Only briefly, while making a run of changes on a heavy drawing, and switch it back on straight away.

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