Navigating references¶
EnergyPlus objects refer to each other by name: a surface names its zone and
construction, a lights object names its schedule. idfpy turns those names into
navigable links once the objects live in the same IDF.
Forward: what does this object use?¶
Every reference field gets a property without the _name suffix that resolves
the target object.
from idfpy.models import BuildingSurfaceDetailed, Zone
surface = idf.get(BuildingSurfaceDetailed, 'Wall1')
surface.zone_name # 'Zone1', the raw string
surface.zone # the Zone object, or None if it is missing
surface.construction # the Construction object
surface.referenced() # every object this surface refers to
surface.referenced(Zone) # only the zones
Backward: who uses this object?¶
zone = idf.get(Zone, 'Zone1')
zone.referencing(BuildingSurfaceDetailed) # surfaces in this zone
zone.referencing('Lights') # lights objects in this zone
Calls chain naturally:
The object reference lists, for every object type, which types it can name and which types can name it.
Constructions and layers¶
The built-in construction extension resolves layers in order and classifies the construction: