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.*— NEVERblenderbim.*Dependencies: bonsai-core-architecture, ifcos-syntax-api
Critical Warnings
- ALWAYS use
bonsai.*imports. NEVER useblenderbim.*— renamed in 2024 (v0.8.0+). - ALWAYS check
IfcStore.get_file()andtool.Ifc.get()forNonebefore any IFC operation. - ALWAYS use
tool.Ifc.get_entity(obj)to get an IFC entity from a Blender object. NEVER readobj.BIMProperties.ifc_definition_idand callmodel.by_id()manually — the tool method handles edge cases. - NEVER assume every Blender object has an IFC entity.
get_entity()returnsNonefor non-IFC objects. - NEVER assume every IFC entity has a Blender object.
get_object()returnsNonefor entities without scene representation. - ALWAYS run element access code inside Blender (
blender --python).bonsai.tool.*depends onbpyand CANNOT run in standalone Python. - NEVER cache IFC entity references across file reloads. Entity instances become stale when the IFC file is reloaded.
- ALWAYS use
tool.Ifc.link(element, obj)to create bidirectional mappings. NEVER manually populateIfcStore.id_maporIfcStore.guid_map.
Related skills
More from openaec-foundation/blender-bonsai-ifcopenshell-sverchok-claude-skill-package
blender-syntax-materials
>
3blender-core-gpu
>
3blender-agents-code-validator
>
3blender-syntax-panels
>
3blender-errors-data
>
3blender-syntax-data
Covers Blender data management including collections, library overrides, asset system, linked libraries, BlendDataLibraries, data block creation and removal, fake users, and data transfer between files. Activates when managing Blender collections, linking/appending data, working with library overrides, or using the asset system.
3