Through a combination of demand loading and saving drawings with indexes, you can increase the performance of drawings with external references. Demand loading works in conjunction with the XLOADCTL and INDEXCTL system variables. When you turn on demand loading, if indexes have been saved in the referenced drawings, AutoCAD loads into memory only the data from the reference drawing that is necessary to regenerate the current drawing. In other words, referenced material is read in “on demand.”
To turn on demand loading, set the XLOADCTL system variable using the SetSystemVariable method. The following settings apply to the XLOADCTL system variable:
By default, XLOADCTL is set to 2 and stored with the AutoCAD user profile.
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 clip the xref to display a small fraction of it, and a spatial index is saved in the externally referenced drawing.
Freeze several layers of the xref, and the externally referenced drawing is saved with a layer index.
To turn on layer and spatial indexes, set the INDEXCTL system variable using the SetSystemVariable method. The following settings apply to the INDEXCTL system variable:
By default, INDEXCTL is set to 0 when you create a new AutoCAD drawing.
For more information on demand loading and xrefs, see “About Improving Performance When Using Xrefs” in the product Help system.