bonsai-syntax-elements

Installation
SKILL.md

Bonsai IFC Element Access Syntax

Version: Bonsai v0.8.4 | Blender 4.2.0+ | Python 3.11 Module path: bonsai.* — NEVER blenderbim.* Dependencies: bonsai-core-architecture, ifcos-syntax-api

Critical Warnings

  1. ALWAYS use bonsai.* imports. NEVER use blenderbim.* — renamed in 2024 (v0.8.0+).
  2. ALWAYS check IfcStore.get_file() and tool.Ifc.get() for None before any IFC operation.
  3. ALWAYS use tool.Ifc.get_entity(obj) to get an IFC entity from a Blender object. NEVER read obj.BIMProperties.ifc_definition_id and call model.by_id() manually — the tool method handles edge cases.
  4. NEVER assume every Blender object has an IFC entity. get_entity() returns None for non-IFC objects.
  5. NEVER assume every IFC entity has a Blender object. get_object() returns None for entities without scene representation.
  6. ALWAYS run element access code inside Blender (blender --python). bonsai.tool.* depends on bpy and CANNOT run in standalone Python.
  7. NEVER cache IFC entity references across file reloads. Entity instances become stale when the IFC file is reloaded.
  8. ALWAYS use tool.Ifc.link(element, obj) to create bidirectional mappings. NEVER manually populate IfcStore.id_map or IfcStore.guid_map.

Related skills

More from openaec-foundation/computational-design-day-delft-march-2026

Installs
1
GitHub Stars
1
First Seen
Mar 24, 2026