Yes indeed it's in the roadmap - basically everywhere people should have the option to use the graphical selector from now on. Would you mind filing a bug on Github, or if you're keen, helping code it?
Good news thanks, i'll fill a bug (request) asap (edit: https://github.com/IfcOpenShell/IfcOpenShell/issues/4069). Help coding I think it's hard for me (basic knowledge) but if you think it's easy give me some hint and i'll try
I tried that already--unfortunately get the following error.
Python: Traceback (most recent call last):
File "C:\Users\Ryan Schultz\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\blenderbim\libs\site\packages\lark\visitors.py", line 68, in _call_userfunc
return f(children)
File "C:\Users\Ryan Schultz\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\blenderbim\libs\site\packages\ifcopenshell\util\selector.py", line 198, in round
value = Decimal(args[0] or 0.0)
decimal.InvalidOperation: [<class 'decimal.ConversionSyntax'>]
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\Ryan Schultz\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\blenderbim\bim\module\drawing\operator.py", line 75, in execute
IfcStore.execute_ifc_operator(self, context)
File "C:\Users\Ryan Schultz\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\blenderbim\bim\ifc.py", line 340, in execute_ifc_operator
result = getattr(operator, "_execute")(context)
File "C:\Users\Ryan Schultz\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\blenderbim\bim\module\drawing\operator.py", line 2198, in _execute
core.edit_text(tool.Drawing, obj=context.active_object)
File "C:\Users\Ryan Schultz\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\blenderbim\core\drawing.py", line 32, in edit_text
drawing.update_text_value(obj)
File "C:\Users\Ryan Schultz\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\blenderbim\tool\drawing.py", line 898, in update_text_value
props.literals[i].value = cls.replace_text_literal_variables(literal.Literal, product)
File "C:\Users\Ryan Schultz\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\blenderbim\tool\drawing.py", line 1397, in replace_text_literal_variables
text = text.replace(original_command, ifcopenshell.util.selector.format(command[2:-2]))
File "C:\Users\Ryan Schultz\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\blenderbim\libs\site\packages\ifcopenshell\util\selector.py", line 252, in format
return FormatTransformer().transform(format_grammar.parse(query))
File "C:\Users\Ryan Schultz\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\blenderbim\libs\site\packages\lark\visitors.py", line 105, in transform
return self._transform_tree(tree)
File "C:\Users\Ryan Schultz\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\blenderbim\libs\site\packages\lark\visitors.py", line 101, in _transform_tree
children = list(self._transform_children(tree.children))
File "C:\Users\Ryan Schultz\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\blenderbim\libs\site\packages\lark\visitors.py", line 92, in _transform_children
yield self._transform_tree(c)
File "C:\Users\Ryan Schultz\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\blenderbim\libs\site\packages\lark\visitors.py", line 101, in _transform_tree
children = list(self._transform_children(tree.children))
File "C:\Users\Ryan Schultz\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\blenderbim\libs\site\packages\lark\visitors.py", line 92, in _transform_children
yield self._transform_tree(c)
File "C:\Users\Ryan Schultz\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\blenderbim\libs\site\packages\lark\visitors.py", line 102, in _transform_tree
return self._call_userfunc(tree, children)
File "C:\Users\Ryan Schultz\AppData\Roaming\Blender Foundation\Blender\3.6\scripts\addons\blenderbim\libs\site\packages\lark\visitors.py", line 72, in _call_userfunc
raise VisitError(tree.data, tree, e)
lark.exceptions.VisitError: Error trying to process rule "round":
[<class 'decimal.ConversionSyntax'>]
@theoryshaw I got this error because I didn't have created the Qto_SpaceBaseQuantities in the IfcSpace object yet. After I created, it worked. Maybe is something with the Object Quantity Sets? Or maybe the annotation is not assigned to the right object?
I tested with your file by creating a new space and a new annotation and it worked.
@theoryshaw you have to use quotes so: IfcFurniture, PredefinedType="CHAIR"
When i don't know exactly how to write the query, i find useful to use the UI first and after that copy the query text from the pop up menu like this:
@theoryshaw you actually have found two bugs :-)
1 - If you create a new search group starting from the query (like what you have done in your video), the query gets modified in a wrong way adding an equals symbol
If you delete the equals symbol, the search works ok
2 - In your file, there are two IfcFurniture objects, but only one has the PredefinedType = CHAIR.
The other object hasn't the PredefinedType but the panel "object metadata" still shows the PredefinedType into the square brackets
This is ok
This seems wrong
@bruno_perdigao said: @Moult Is quantity filtering not implemented yet? If so, I would like to try.
Nevermind, I see that they are implemented. However, they don't seem to work with decimal numbers like: ifcopenshell.util.selector.filter_elements(model, "IfcColumn, Qto_ColumnBaseQuantities.Length > 2.5")
@theoryshaw i guess in this way
Please note that it selects also the type object so, if you don't want to select also the type object, you can use this:
Comments
@c4rlosdias yes, it is not yet implemented. Would you like to try?
ok @Moult , I'll try
I think should be useful use the query syntax in the IfcClash Tool too.

What do you think? Is it in the roadmap?
Thanks for your work
Yes indeed it's in the roadmap - basically everywhere people should have the option to use the graphical selector from now on. Would you mind filing a bug on Github, or if you're keen, helping code it?
Good news thanks, i'll fill a bug (request) asap (edit: https://github.com/IfcOpenShell/IfcOpenShell/issues/4069). Help coding I think it's hard for me (basic knowledge) but if you think it's easy give me some hint and i'll try
Obviously i'm not doing this correctly.
Anyone have any pointers?
@theoryshaw Try this:
``round({{Qto_SpaceBaseQuantities.NetFloorArea}}, 0.1)``
I tried that already--unfortunately get the following error.
@theoryshaw I got this error because I didn't have created the
Qto_SpaceBaseQuantities
in the IfcSpace object yet. After I created, it worked. Maybe is something with the Object Quantity Sets? Or maybe the annotation is not assigned to the right object?I tested with your file by creating a new space and a new annotation and it worked.
Hmm.. not working on my end.
Can you try this file? https://www.dropbox.com/scl/fi/y1f7f6s891o72vi2xf0vb/Restaurant_Sun_Prairie.ifc?rlkey=dxi6pr6lhepiqz2b6b3bvyaes&dl=1
Drawing:
FLOOR PLAN - 1ST
That's weird, it worked here. I just added the double backtricks:

Dang, which commit are you on?
Nevermind... I ran
Purged HDF5 Cache
and it fixed it.Thanks, for helping!
I think i spoke too soon. It worked once, and then didn't again, even after the
Purged HDF5 Cache
step. :\Sorry, i 'think' I got it. I reinstalled BB, but I 'think' maybe it was because I was trying to change the 'instance' and not the 'type'.
Sorry, i'm still running into problems. This is a weird bug, sometimes it works, other times, not.
Fixed https://github.com/IfcOpenShell/IfcOpenShell/commit/6ea1e378c5f8bfd28fb3f8d3efeb958cd2468585
Probably doing something silly, but neither of the following seem to work
@theoryshaw you have to use quotes so:

IfcFurniture, PredefinedType="CHAIR"
When i don't know exactly how to write the query, i find useful to use the UI first and after that copy the query text from the pop up menu like this:
I might be doing something wrong, but
IfcFurniture, PredefinedType="CHAIR"
doesn't seem to work for me.
video: https://www.dropbox.com/scl/fi/rp9sv6qmwhardpfcvtrxx/2024-01-28_21-55-23_blenderBlenderblender.mp4?rlkey=ly9c3f09ouyamb6byqzsobg6r&dl=0
@theoryshaw you actually have found two bugs :-)

1 - If you create a new search group starting from the query (like what you have done in your video), the query gets modified in a wrong way adding an equals symbol
If you delete the equals symbol, the search works ok
2 - In your file, there are two IfcFurniture objects, but only one has the PredefinedType = CHAIR.


The other object hasn't the PredefinedType but the panel "object metadata" still shows the PredefinedType into the square brackets
This is ok
This seems wrong
Cheers, Massimo
@Moult Is quantity filtering not implemented yet? If so, I would like to try.
Thanks @Massimo

That worked for selecting the non-typed based instant object.
But, how do you select the following type-driven instance, however?
Nevermind, I see that they are implemented. However, they don't seem to work with decimal numbers like:
ifcopenshell.util.selector.filter_elements(model, "IfcColumn, Qto_ColumnBaseQuantities.Length > 2.5")
I'm getting this error:
Maybe it's a case to add "number" as expected value in the grammar.
try:
ifcopenshell.util.selector.filter_elements(model, 'IfcColumn, Qto_ColumnBaseQuantities.Length > "2.5"')
@c4rlosdias Thanks, that was it. However, it's not working with the
ifcopenshell
installed withpip
. I assume it's not updated yet.you need to install ifctester
@theoryshaw i guess in this way


Please note that it selects also the type object so, if you don't want to select also the type object, you can use this:
Anyone know how to pull out material psets via the Spreadsheet Import/Export?


The following doesn't work.
Got it..Like this! :)