In the DXF file format, blocks can be nested. The following is the logical structure of our example nested block:
Block A
Line
Attribute STREETNAME = "Broadway"
Block B
Point
Attribute ADDRESS = "200"
Block C
Polygon
Attribute BUILDING_NAME = "Hendrick Hudson Building"
This block consists of a line, an attribute, and two blocks. One of these blocks is a point with the address of a building; the other is a polygon with the name of the building. If all of these blocks were on the same layer (and they do not have to be), the database structure would be as follows:
ADDRESS
- BUILDING_NAME
- STREETNAME
Objects get the value of all attributes in their current block, and inherit attributes from their parent blocks. In this case, our database is created as follows:
Object | ADDRESS | BUILDING_NAME | STREETNAME |
line | 0 | <blank> | Broadway |
point | 200 | <blank> | Broadway |
polygon | 0 | Hendrick Building | Broadway |
As you can see, it is better to put objects of different types in different layers. The problem is figuring out which layer names correspond to which type of objects.