The index and filter classes and functions provide a scheme for applications to define custom indexes and custom filtering of block data. An application can define its custom implementations of AcDbFilter, AcDbIndex, and AcDbFilteredBlockIterator. It will register the AcDbFilter with a block reference through AcIndexFilterManager::addFilter(), and an AcDbIndex with the corresponding block table record through AcIndexFilterManager::addIndex(). After that, regens of xrefs and blocks will respect the query defined by the AcDbFilter, and use the AcDbFilteredBlockIterator to decide what object IDs will be processed during regen. The indexes will be kept up to date through either the application explicitly calling AcIndexFilterManager::updateIndexes(), or the application can rely on the AutoCAD save operation calling AcIndexFilterManager::updateIndexes() on the AcDbDatabase being saved.
The AcDbIndex::rebuildFull() or the AcDbIndex::rebuildModified() gets invoked during the AcIndexFilterManager::updateIndexes() call.
A current use of the indexing scheme in AutoCAD is fast demand loading of clipped xrefs. A spatial index (an AcDbSpatialIndex object) is stored in the xrefed drawing. An AcDbSpatialFilter object defines the clip volume of the block reference to the xref in the host drawing. When demand loading is turned on for the xref, the spatial filter volume is used to traverse the xref data through the spatial index, in order to page in from the DWG file only those entities whose graphics intersect the clip volume.
These classes and functions provide an interface for: