Thursday, May 23, 2013

Degenerating and Regenerating in AutoCAD

The image of your drawing that you see displayed on the AutoCAD screen may seem like a simple thing — after all, AutoCAD just has to paint the lines and other objects on the screen as you draw them, right? Unfortunately, it's not that simple.
From the AutoCAD point of view, each drawing has two parts:
  • The important part is the DWG (drawing) file, a highly precise database of objects that is stored on disk. AutoCAD uses high-precision numbers to describe the location of each object.
  • The less important part is the part that you interact with — the on-screen display of the drawing. For displaying your drawing on-screen, AutoCAD uses less-precise integer numbers that are faster for the computer to calculate and that work well with screen displays.
You need to understand the distinction between the highly precise DWG file version of your drawing and the less-precise screen version because it's possible for the two to get out of sync. When this happens, AutoCAD usually displays the puzzling message Regen queued in the command line area. This is another reason why you need to keep an eye on the command line! No, REgen queued is not one of the wine-growing regions of France. It's AutoCAD's way of saying, "What your drawing looks like on the screen at the moment may not exactly match the real version of the drawing database that gets stored when you save the drawing. I'll update the display version at the next regeneration."
A regeneration occurs when AutoCAD goes back to the DWG file and reconverts the high-precision numbers to the less-precise integer numbers that it uses for display purposes. In the process, AutoCAD detects what objects have changed and need to be displayed with their new positions, colors, or linetypes. Normally, AutoCAD picks up on these changes automatically as you go, but in a few cases — again for performance reasons — it takes a regeneration to display them.
You sometimes will see command prompt messages like Regenerating model or Regenerating layout, which indicate that AutoCAD is regenerating the drawing automatically. In fact, if you watch the command line when you open a drawing, you'll notice that AutoCAD always regenerates the drawing as part of the file opening process. You can force a REgen — that is, tell AutoCAD to regenerate the drawing right now, whether it needs it or not — by running the REgen command. You might want to run the REgen command after AutoCAD prompts Regen queued to ensure that what you see on the screen is what you get in the DWG file when you save it.
In AutoCAD 2004, the REGENAUTO system variable is set to 1 (On) by default in new drawings. What does this mean? The REGENAUTO system variable tells AutoCAD whether to do REgens automatically as needed:
  • The default setting in new drawings, 1, tells AutoCAD to regenerate your drawing automatically if it's required to synchronize the screen display with the drawing database.
  • The other setting, 0 (Off), tells AutoCAD not to regenerate automatically, but instead to display Regen queued on the command line and let you force a regeneration with the REgen command if you want to.
If you're working in a large drawing and find performance to be slow because of automatic regenerations, you can turn automatic regeneration off. This speeds performance but requires you to watch for Regen queued messages and force a regeneration manually whenever you want to make sure the on-screen image is in full agreement with the underlying drawing database.
All of this regeneration and REGENAUTO business is for the most part a holdover from much slower computers and older versions of AutoCAD. You probably don't need to subject yourself to the mental contortion of trying to avoid REgens unless you work on huge drawings and/or use a painfully slow computer.
Don't confuse the REgen command with the Redraw command. REgen (View --> Regen) forces the synchronization process described in this section. Redraw (View --> Redraw) simply repaints the screen, without attempting to synchronize the screen with the drawing database. The Redraw command was useful in the days of very slow computers and older versions of AutoCAD, which didn't handle the display as effectively, but it's essentially a useless command now.
The REgenAll command (View --> Regen All) regenerates all viewports in a paper space layout. If you run the REgenAll command in model space, it has the same effect as the ordinary REgen command.
Custom Search
Powered By Blogger