Function
has_property
(self, product: ifcopenshell.entity_instance, property_name: str)
Source from the content-addressed store, hash-verified
| 415 | |
| 416 | |
| 417 | def 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 |
Tested by
no test coverage detected