Skip to main content
A Relation is a typed edge in the Drawing Index knowledge graph. It connects two entities — blocks or features — with a specific relationship type. Relations are what make the Drawing Index a graph, not just a tree. Without relations, you have isolated entities: a door here, a schedule there, a legend somewhere else. Relations connect them: this door is scheduled in that schedule, this symbol is defined by that legend entry, these two rooms are adjacent to each other.

Polymorphic source and target

Relations can connect blocks to blocks, features to features, or features to blocks. The source_type and target_type discriminator fields indicate which:

Relation types

relation_type is a free string, like Feature type. The list above covers the current vocabulary but will grow as new cross-reference patterns are discovered.

Key fields

Each relation is unique by the combination of (source_type, source_id, target_type, target_id, relation_type).

Note linking patterns

Construction drawings have three distinct note reference patterns, each modeled differently in the Drawing Index:

Keynotes (point-specific)

A tag like “KN-3” with a leader arrow pointing to a specific element on the plan. Modeled as a Feature (type="keynote", label="KN-3") linked via a defined_by Relation to a keynote entry Feature in the KeyNotes block.

General notes (categorical)

Statements like “All GFCI receptacles shall be installed within 6’ of any water source.” These apply to categories of features, not specific instances. Instead of creating explosive N x M relations, notes are parsed into the block’s metadata with applies_to tags:
At query time, the system matches Feature.type against applies_to tags from notes blocks on the same sheet. No explicit Relations needed.

Sheet notes (sheet-scoped)

Notes specific to one sheet (e.g., “See structural for beam sizes at grid B”). Same metadata structure as general notes, matched contextually via tags.

API access

Example: door to schedule

Door 104 on a plan view is linked to the Door Schedule via a scheduled_in relation:
The agent reads the schedule block’s metadata.rows["104"] to get the door specifications:

Next steps

Grid System

Spatial coordination across disciplines using shared grid lines.

Features

The entities that relations connect.