Query Editor

Sakari Lehtinen
Sakari Lehtinen Expert (Gold)
  • Updated

Query Editor is used everywhere where you need to define a rule for rule-based object grouping.

The rules can be simple, defined with one rule item. Or they can be a complex combination of many items. Let's first look at the individual rules separately, and then at how to combine and manage them.

Add or Copy Rules

To add a rule, click on the drop-down and select a rule. The different kinds of rules are described below.

simplebim_UI_query_editor_select_rule.png

Add Object Class Rule

This rule selects all the object instances of one or more object classes.

simplebim_UI_query_editor_object_class_rule.png

Optionally, you can define a list of line-bread-separated list of object classes with the list editor button.

Add Object Group Rule

This rule selects all objects from a group that already exists in the model. Type in the group name or select it from the dropdown list.

simplebim_UI_query_editor_object_group_rule.png

Add Text Property Rule

This rule selects objects with specific values for a given text property.

simplebim_UI_query_editor_text_property_rule.png

Property

Defines the text property to use in the rule. You can either type in the property name or select it from the dropdown list. The dropdown list is filtered based on your writing. This is a convenient way of finding a property name that already exists in the model.

Operator

The default operator finds the exact same values. See the other options in the table below.

Match Operators Description
Equals Must be the same text
Contains Must contain the text
Starts With Must start with the text
Ends With Must end with the text
Like Using wildcards
Match Using regular expression
Not Equals Must not be the text
Not Contains Must not contain the text
Not Starts With Must not start with the text
Not Ends With Must not end with the text
Not Like Using wildcards
Not Match Using regular expression

Case Sensitivity

By default, the rule takes into account the case of the characters (big or small). For a more relaxed rule, you can turn this off, so that it doesn't matter whether the big or small characters are used.

Value

Type in a value, or select a value that already exists in the model from the dropdown.

Value List

Optionally, you can define a list of allowed values. Click on the List Editor button and define a line-break-separated list of values.

simplebim_UI_query_editor_value_list_editor.png

Add Yes/No Property Rule

This rule selects objects with given yes/no value for a given Yes/No property.

simplebim_UI_query_editor_boolean_property_rule.png

Property

Defines the Yes/No property to use in the rule. You can either type in the property name or select it from the dropdown list. The dropdown list is filtered based on your writing. This is a convenient way of finding a property name that already exists in the model.

Value

Yes, No, or <no value>.

Add Number Property Rule

This rule selects objects with specific values for a given (decimal) number property.

simplebim_UI_query_editor_number_property_rule.png

Property

Defines the number property to use in the rule. You can either type in the property name or select it from the dropdown list. The dropdown list is filtered based on your writing. This is a convenient way of finding a property name that already exists in the model.

Operator

Match Operators Description
Equals (=) Must be the same value
Not Equals Must not be the same value
Greater than (>) Must be greater
Greater than or Equals (>=) Must be greater or the same value
Smaller than (<) Must be smaller
Smaller than o Equals (<=) Must be smaller or the same value

Value

Type in a decimal number, or select a value that already exists in the model from the dropdown.

Add Whole Number Property Rule

This rule selects objects with specific values for a given whole number property.

simplebim_UI_query_editor_whole_number_property_rule.png

Property

Defines the number property to use in the rule. You can either type in the property name or select it from the dropdown list. The dropdown list is filtered based on your writing. This is a convenient way of finding a property name that already exists in the model.

Operator

Match Operators Description
Equals (=) Must be the same value
Not Equals Must not be the same value
Greater than (>) Must be greater
Greater than or Equals (>=) Must be greater or the same value
Smaller than (<) Must be smaller
Smaller than o Equals (<=) Must be smaller or the same value

Value

Type in a whole number, or select a value that already exists in the model from the dropdown.

Add Measure Property Rule

This rule selects objects with specific values for a given measure property. Measure properties contain decimal numbers with units. These can be, for example, length, area, volume or weight measures.

simplebim_UI_query_editor_measure_property_rule.png

Property

Defines the measure property to use in the rule. You can either type in the property name or select it from the dropdown list. The dropdown list is filtered based on your writing. This is a convenient way of finding a property name that already exists in the model.

Operator

Match Operators Description
Equals (=) Must be the same value
Not Equals Must not be the same value
Greater than (>) Must be greater
Greater than or Equals (>=) Must be greater or the same value
Smaller than (<) Must be smaller
Smaller than o Equals (<=) Must be smaller or the same value

Value

Type in a decimal number, or select a value that already exists in the model from the dropdown.

Unit

Select the unit from the dropdown list. The units shown are specific for the chosen property's measure type.

Add Date Property Rule

This rule selects objects with specific dates for a given date property.

simplebim_UI_query_editor_date_property_rule.png

Property

Defines the date property to use in the rule. You can either type in the property name or select it from the dropdown list. The dropdown list is filtered based on your writing. This is a convenient way of finding a property name that already exists in the model.

Operator

Match Operators Description
Equals (=) Must be the same date
Not Equals Must not be the same date
Greater than (>) Must be later
Greater than or Equals (>=) Must be later or the same date
Smaller than (<) Must be earlier
Smaller than o Equals (<=) Must be earlier or the same date
Unknown Date value must not be valid
Exists Date must exist in the calendar
Not Exists Date must not exist in the calendar
Same Week Date must be from the same week
Same Month Date must be from the same month
Same Quarter Date must be from the same quarter
Same Year Data must be from the same year

Value

Type in a date, or select a date from the date picker.

Add Date and Time Property Rule

This rule selects objects with specific dates and times for a given date and time property.

simplebim_UI_query_editor_date_and_time_property_rule.png

Property

Defines the date property to use in the rule. You can either type in the property name or select it from the dropdown list. The dropdown list is filtered based on your writing. This is a convenient way of finding a property name that already exists in the model.

Operator

Match Operators Description
Equals (=) Must be the same date
Not Equals Must not be the same date
Greater than (>) Must be later
Greater than or Equals (>=) Must be later or the same date
Smaller than (<) Must be earlier
Smaller than o Equals (<=) Must be earlier or the same date
Unknown Date value must not be valid
Exists Date must exist in the calendar
Not Exists Date must not exist in the calendar
Same Hour Date must be on the same hour.
Same Day Date must be on the same day
Same Week Date must be from the same week
Same Month Date must be from the same month
Same Quarter Date must be from the same quarter
Same Year Data must be from the same year

Value

Type in a date and time, or select a date from the date picker and time from the time editor.

Add Time of Day Property Rule

This rule selects objects with specific times for a given time of day property.

simplebim_UI_query_editor_date_and_time_property_rule.png

Property

Defines the date property to use in the rule. You can either type in the property name or select it from the dropdown list. The dropdown list is filtered based on your writing. This is a convenient way of finding a property name that already exists in the model.

Operator

Match Operators Description
Equals (=) Must be the same date
Not Equals Must not be the same date
Greater than (>) Must be later
Greater than or Equals (>=) Must be later or the same date
Smaller than (<) Must be earlier
Smaller than o Equals (<=) Must be earlier or the same date
Unknown Date value must not be valid
Exists Date must exist in the calendar
Not Exists Date must not exist in the calendar

Value

Type in time, or edit time with the time editor.

Add Expression Rule

This rule selects objects with a formula. Using a formula allows you to find objects based on calculations, instead of single properties. The formula can be a simple comparison like in the picture below, or it can be a complex conditional formula using IF-statements.

simplebim_UI_query_editor_expression_rule.png

Formula

Type in a formula, or edit use the Expression Editor to define one. The formula must be conditional. It must return true or false. The objects which values return true for the formula are selected by the rule.

Remove Rule Items

You can delete a rule at any time from the X in the right upper corner of the rule.

simplebim_UI_query_editor_delete_rule_item.png

Copy Rule Items

If you create a lot of rules, or want to create more complex rules, it is convenient to use the copy. Select rules from the row title and then select “Add or Copy Rules” from the drop-down. Now you can edit the copied rules. For example, change the object class for the Object Class rule or values for the Text rules, and so on…

simplebim_UI_query_editor_copy_rules.png

Preview

Click “Preview” and check if the rule works as expected. The objects selected by the rule are selected from the model and highlighted in the 3D.

simplebim_UI_query_editor_preview.png

Rule Logic

Most of the time you only need to create very simple rules. However, sometimes you need more complex rules. 

The default logic, which you already used, is All. Meaning that objects must meet all the rules in order to be included in the group (AND logic). 

Another basic option is Any. When this is on, it is enough that the objects meet at least one of the rules (OR logic). 

The Advanced mode allows you to mix these two. For example, let’s change the logic of the rules we created in the previous step so that Walls must have specific Building Element Construction Type values, but the slabs don’t. So, the logic would be A AND B OR C. You can edit the rule freely, and use brackets if needed, just make sure the rule is valid and uses the identifiers of the rules you have actually defined.

simplebim_UI_query_editor_combine_rules.png

Related to

Was this article helpful?

0 out of 0 found this helpful

Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.