What problem does it solve?
IfcOpenShell Python code often breaks or produces invalid IFC when models use the wrong mutation patterns (like creating entities via create_entity() or directly assigning attributes) or when API calls use incorrect parameter conventions. This Skill prevents those production failure modes by enforcing the correct ifcopenshell.api.run() workflow for IFC mutations.
Core Features & Use Cases
- Stops common IFC-generation mistakes: avoids direct attribute writes and unsafe entity creation patterns, ensuring GlobalIds/ownership/validation are handled via API modules.
- Enforces correct API invocation and parameter rules: requires importing
ifcopenshell.api, passing the file first, using keyword arguments, and using list parameters where required.
- Guides end-to-end IFC construction flow: promotes the required bootstrap sequence (file → project → units → contexts → spatial hierarchy) and provides decision guidance for which of the 35 API modules to call.
- Supports safe deletion and schema correctness: recommends
root.remove_product over model.remove() for products and clarifies schema/version pitfalls (e.g., project.create_file(version=...)).
Quick Start
Use the ifcos-syntax-api skill to write IfcOpenShell Python that creates and modifies IFC entities using ifcopenshell.api.run() with valid module names, correct parameter names, and safe deletion patterns.