H. Ach
H. Ach

Reputation: 33

Extracting external walls from an IFC file using the selector syntax in IFCOPENSHELL

I am an absolute beginner in ifcopenshell python and blender BIM. I am trying to extract all external walls from an existing IFC file and then writing them into a new IFC file. what i tried was to use the selector Syntax. However when i run the code on blender BIM it gives me set() no output values.

enter image description here

import ifcopenshell
import ifcopenshell.util.selector

#model 
model = ifcopenshell.open("C:/Users/x/Downloads/BIM4EEB-TUD-2x3.ifc")

#selector syntax for external walls
ifcopenshell.util.selector.filter_elements(model,"IfcWall,  Pset_Wallcommon.IsExternal=True")

Upvotes: -1

Views: 349

Answers (1)

Dion Moult
Dion Moult

Reputation: 211

The "true" keyword should be uppercase:

ifcopenshell.util.selector.filter_elements(model, "IfcWall,  Pset_Wallcommon.IsExternal=TRUE")

Upvotes: 0

Related Questions