Work with Demand Loading in Large Drawings

With demand loading, only the data from the referenced drawing that is necessary to regenerate the current drawing is loaded into memory.

To realize the maximum benefits of demand loading, you need to save the referenced drawings with layer and spatial indexes. The performance benefits of demand loading are most noticeable when you do one of the following:

  • Clip the xref with the program to display a small fraction of it. A spatial index is saved in the externally referenced drawing.
  • Freeze several layers of the xref. The externally referenced drawing is saved with a layer index.

If demand loading is turned on, and you have clipped xrefs that were saved with spatial indexes, objects in the referenced drawing database that are contained within the clip volume comprise the majority of the objects read into the drawing. If the clip volume is modified, more objects are loaded as required from the reference drawing. Similarly, if you have xrefs with many layers frozen that were saved with layer indexes, only the objects on those thawed layers are read into the current drawing. If those xref-dependent layers are thawed, the program reads in that geometry from the reference drawing as required.

When demand loading is turned on, the program places a lock on all reference drawings so that it can read in any geometry it needs to on demand. Other users can open those reference drawings, but they cannot save changes to them. If you want other users to be able to modify an xref that is being demand loaded into another drawing, use demand loading with the Copy option.

If you turn on demand loading with the Enable with Copy option, the program makes a temporary copy of the referenced drawing and demand loads the temporary file. You can then demand load the xref while allowing the original reference drawing to be available for modification. When you turn off demand loading, the program reads in the entire reference drawing regardless of layer visibility or clip instances.

Layer and spatial indexes were added in AutoCAD Release 14 and AutoCAD LT 97. If you externally reference a drawing saved in a release previous to this, you do not see the same performance benefit as drawings saved with the indexes. For maximum performance, use demand loading with referenced drawings saved with layer and spatial indexes turned on in AutoCAD Release 14, AutoCAD LT 97, or more recent versions.

Procedures
To turn on demand loading
  1. Click Tools menu  Options.At the Command prompt, enter options.
  2. In the Options dialog box, Open and Save tab, under External References, select Disabled, Enabled, or Enabled with Copy.
  3. Click OK.
Commands
EXTERNALREFERENCES

Opens the External References palette.

System Variables
INDEXCTL

Controls whether layer and spatial indexes are created and saved in drawing files.

XLOADCTL

Turns xref demand-loading on and off, and controls whether it opens the referenced drawing or a copy.