bonsai-syntax-properties
Installation
SKILL.md
Bonsai Property Set Management
Version: Bonsai v0.8.x | IfcOpenShell v0.8+ | Blender 4.2.0+ | Python 3.11 Module path:
bonsai.bim.module.pset,bonsai.bim.module.pset_template,bonsai.bim.module.qtoIFC API:ifcopenshell.api.pset,ifcopenshell.api.pset_template
Critical Warnings
- ALWAYS use
ifcopenshell.api.run("pset.edit_pset", ...)to modify properties. NEVER setprop.NominalValuedirectly — it bypasses template validation, type inference, and owner history. - ALWAYS pass
product(singular) topset.add_psetandpset.add_qto. Passproducts(list) topset.assign_pset. - NEVER use the
Pset_orQto_prefix for custom property sets — these are reserved for buildingSMART standards. Use a company or project prefix (e.g.,Acme_StructuralData). - ALWAYS check pset applicability before assigning a standard pset.
Pset_WallCommononly applies toIfcWall/IfcWallType, not toIfcBeam. - NEVER pass
Nonevalues inedit_qtoexpecting them to be kept. Quantities set toNoneare ALWAYS removed — there is noshould_purgeparameter for quantity sets. - ALWAYS use
ifcopenshell.util.element.get_psets()for reading. NEVER traverseIsDefinedByrelationships manually. - ALWAYS use
pset.add_pset()beforepset.edit_pset(). The add function is idempotent — it returns the existing pset if one with the same name already exists. - NEVER assume
boolmaps toIfcInteger. Pythonboolis a subclass ofint, but IfcOpenShell checksboolfirst and maps it toIfcBoolean.