Using ifcopenshell-python 0.7.0, I would like to extract all the items that have a user-defined pset valued with a user-defined value. Using the selector module, figure out a query to fetch the required items.
I tried using ifcopenshell.util.selector.filter_elements()
, and tried figuring out a proper syntax. I tried the following
ifcopenshell.util.selector.filter_elements(self._model, f'IfcElement, "{pset}.{attribute}"="{value}"')
but the result is always an empty set. I tried using a query with query:"{pset}.{attribute}"="{value}"
but again, no results were output.
I solved the issue simply querying for IfcElement
and then iterating through all of them, retrieving the psets and checking manually, but this is obviously quite slow. Using the common psets works or seems to, but I would like to do this for general psets.
DC4 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.