ifcos-syntax-elements

Query IFC elements by class, ID, or GUID and extract property sets.

30|4|Updated Mar 5, 2026
One-click install
npx skills add https://github.com/Impertio-Studio/Blender-Bonsai-ifcOpenshell-Sverchok-Claude-Skill-Package --skill ifcos-syntax-elements-impertio-studio
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: ifcos-syntax-elements
Source: https://github.com/Impertio-Studio/Blender-Bonsai-ifcOpenshell-Sverchok-Claude-Skill-Package/tree/main/skills/ifcopenshell/syntax/ifcos-syntax-elements
Command: npx skills add https://github.com/Impertio-Studio/Blender-Bonsai-ifcOpenshell-Sverchok-Claude-Skill-Package --skill ifcos-syntax-elements-impertio-studio

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill prevents fragile, relationship-bypassing IFC code by guiding you to use the correct IfcOpenShell query and property extraction patterns when working with IFC elements.

Core Features & Use Cases

  • Element lookup methods: Find entities by IFC class (by_type), STEP ID (by_id), and GlobalId (by_guid) with schema-agnostic guidance and persistence warnings.
  • Correct data access patterns: Use get_info, is_a(), inverse references (get_inverse), and efficient attribute reading without expensive recursive expansion.
  • Universal property extraction: Extract properties reliably via IsDefinedBy -> IfcRelDefinesByProperties -> IfcPropertySet -> HasProperties, including guardrails for None values and NominalValue.
  • Production-ready helpers: Prefer ifcopenshell.util.element.get_psets() and related utilities for container/type/material retrieval and property sets.

Quick Start

Use the ifcos-syntax-elements skill to list all walls from 'model.ifc' and print each wall's GlobalId and property values by property set.

Frequently Asked Questions about ifcos-syntax-elements

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I extract property sets from IFC elements using IfcOpenShell?▼

To extract property sets from IFC elements, traverse the IsDefinedBy relationship to IfcRelDefinesByProperties, access IfcPropertySet, and read HasProperties while guarding against None values in NominalValue. Prefer ifcopenshell.util.element.get_psets() for reliable property extraction.

What is the best way to query IFC elements by GlobalId or STEP ID in IfcOpenShell?▼

Querying IFC elements by GlobalId or STEP ID requires using the schema-agnostic by_guid and by_id lookup methods. These methods provide correct entity retrieval from the IFC model while avoiding persistence warnings associated with direct attribute access.

How do I traverse inverse relationships in IFC models without causing performance issues?▼

Traversing inverse relationships in IFC models requires using the get_inverse method to safely find referencing entities. To maintain performance in production workflows, avoid recursive get_info expansion inside loops and use efficient attribute reading patterns instead.

Why does my IfcOpenShell code return None when reading IFC property values?▼

IfcOpenShell code returns None when reading IFC property values if the wrapped NominalValue is not properly guarded during extraction. Implement guardrails against None values when traversing IfcRelDefinesByProperties to ensure robust property set data retrieval.

Can I use IfcOpenShell to list all elements of a specific IFC class like IfcWall?▼

You can list all elements of a specific IFC class like IfcWall by using the schema-agnostic by_type method. This approach correctly retrieves all entities matching the specified IFC class from the model without bypassing structural relationships.