MCPcopy Create free account
hub / github.com/IfcOpenShell/IfcOpenShell / has_property

Function has_property

src/ifc5d/ifc5d/csv2ifc.py:417–425  ·  view source on GitHub ↗
(self, product: ifcopenshell.entity_instance, property_name: str)

Source from the content-addressed store, hash-verified

415
416
417def has_property(self, product: ifcopenshell.entity_instance, property_name: str) -> bool:
418 if not property_name:
419 return True
420 qtos = ifcopenshell.util.element.get_psets(product, qtos_only=True)
421 for qset, quantities in qtos.items():
422 for quantity, value in quantities.items():
423 if quantity == property_name:
424 return True
425 return False

Callers 1

create_cost_itemMethod · 0.70

Calls 1

itemsMethod · 0.45

Tested by

no test coverage detected