An AutoCAD drawing is a collection of objects stored in a database. Some of the basic database objects are entities, symbol tables, and dictionaries. Entities are a special kind of database object that have a graphical representation within an AutoCAD drawing. Lines, circles, arcs, text, solids, regions, splines, and ellipses are examples of entities. A user can see an entity on the screen and can manipulate it.
Symbol tables and dictionaries are containers used to store database objects. Both container objects map a symbol name (a text string) to a database object. An AutoCAD database includes a fixed set of symbol tables, each of which contains instances of a particular class of symbol table record. You cannot add a new symbol table to the database. Examples of symbol tables are the layer table (AcDbLayerTable), which contains layer table records, and the block table (AcDbBlockTable), which contains block table records. All AutoCAD entities are owned by block table records.
Dictionaries provide a more generic container for storing objects than symbol tables. A dictionary can contain any object of the type AcDbObject or subclass thereof. The AutoCAD database creates a dictionary called the named object dictionary when it creates a new drawing. The named object dictionary can be viewed as the master “table of contents” for all of the dictionaries associated with the database. You can create new dictionaries within the named object dictionary and add new database objects to them.
The following figure shows the key components of the AutoCAD database.
During AutoCAD edit sessions, you can obtain the database for the current drawing by calling the following global function:
acdbHostApplicationServices()->workingDatabase()