Query Editor

Gio Siradze
Gio Siradze
  • Updated

The Query Editor is the window where you build a query in Simplebim. A query is a set of rules that picks objects out of the model — all walls whose Fire Rating is REI 60, everything on the third storey that is load bearing, every space whose name starts with "Office" — and it is how tools, dataflow steps and settings dialogs are told which objects to work on.

This article is about the editor: what the buttons, lists and boxes do and how to read the feedback it gives you. One of the rule types, Expression, opens the Expression Editor; that editor has its own article, Expression Editor, and what you can write in it is covered in Writing Expressions in Simplebim.

Where You Find the Query Editor

You do not open the Query Editor from a menu. It opens from a query setting in a configuration. Tools, dataflow steps and settings dialogs are configured with a list of settings, and a setting that takes a query shows two buttons.

Edit Query opens the Query Editor for this setting. While the setting has no query yet, the button reads Edit Query (empty).

Preview runs the query that is stored in the setting and selects the matching objects in the model, without opening the editor. Only shown while a model is open.

Click Edit Query. The editor opens in place of the list you came from, in the same window. A path at the top tells you where you are, for example

Query: Add or Modify Group

and two buttons, Apply Changes and Discard Changes, take you back. See Keeping or Discarding Your Changes.

The editor works on the model that is open: the property names, object classes, groups and values it offers in its lists all come from that model. Open the model you want to query before you open the editor.

The Editor at a Glance.

From top to bottom the editor has these parts:

  1. Toolbar — the Add, Duplicate and Delete buttons, at the left end of the top row. Add opens the list of rule types; Duplicate and Delete work on the ticked rules.
  2. Combination selector — a drop-down with All, Any and Advanced. Decides how the rules are combined.
  3. Logic box — shows how the rules are combined, for example A AND B AND C. Read-only for All and Any; this is where you write your own logic when Advanced is chosen.
  4. Preview — runs the query as it is now and selects the matching objects in the model.
  5. The rules — one row per rule, lettered A, B, C … in the order they were added.

Each rule row has the same frame around its own controls.

The letter at the left edge is the rule's identifier. It is also a check box: tick it to select the rule for Duplicate and Delete, or drag it to move or duplicate the rule, see Duplicating, Moving and Removing Rules.

The header shows the name of the rule type — Text Property, Object Class and so on.

× at the right end of the header removes the rule.

The rule's controls are below the header: the property, operator and value boxes described under The Rule Types.

How a Query Works

  • Every rule is a yes/no test on one object. A Text Property rule asks does this object's Name contain "wall"?, an Object Class rule asks is this object a wall or a slab?.
  • The combination decides how many rules an object has to pass. With All it has to pass every rule, with Any at least one, and with Advanced whatever logic you write, for example A AND (B OR C).
  • The query is run against the objects currently in the model. Objects that are filtered out of the model are not listed in the editor's value lists and are not selected by Preview.
  • A query can have at most 24 rules, lettered A to X. Trying to add a 25th shows Rule count exceeded. Maximum number of rules is 24.

The Query Editor does not run anything by itself. It builds the query; the tool or dialog you came from runs it when it needs the objects. Preview is the exception — it runs the query right away so you can see what it would select.

Adding a Rule

Click Add on the toolbar and pick a rule type from the menu that opens. Each entry adds a rule that tests whether the object…

Add Object Class Rule — is one of the chosen object classes — walls, doors, spaces, storeys …

Add Object Classification Rule — is of an object class that carries one of the given classifications.

Add Object Group Rule — belongs to a group.

Add Text Property Rule — has a text property that equals, contains, starts with … a value.

Add Yes/No Property Rule — has a yes/no property set to Yes, to No, or left empty.

Add Number Property Rule — has a decimal number property that is equal to, greater than … a value.

Add Whole Number Property Rule — the same, for whole-number properties.

Add Measure Property Rule — has a measurement — a length, an area, a volume — that compares to a value in a unit of your choice.

Add Date Property Rule — has a date property that compares to a date.

Add Date and Time Property Rule — the same, for properties with a date and a time.

Add Time Of Day Property Rule — the same, for time-only properties.

Add Expression Rule — makes an expression give true.

The new rule appears at the end of the rules with the next free letter, and the menu closes. To copy rules, tick them and use Duplicate, see Duplicating, Moving and Removing Rules.

Which rule type to pick depends on the kind of data the property holds, not on how it looks. A door width stored as a measurement needs a Measure Property rule; a fire rating stored as text needs a Text Property rule, even when the text is 60. If you cannot find a property in a rule's property list, you have probably picked the wrong kind of rule — see Choosing the Property.

The Rule Types

Object Class

One drop-down list with check boxes. The list is in two groups:

  • Elements — walls, slabs, doors, pipes and every other building element class that has objects in the model, in alphabetical order.
  • Containers — Project, Site, Building, Building Storey and Space, when they are in the model.

Tick every class you want. An object passes the rule when it is any one of the ticked classes. Ticking a group heading ticks the whole group, and clearing it clears the whole group.

Only classes that actually have objects in the model are listed. To include a class that is not in the model — say, because the query will later run on other models — click the list button at the right end of the box and type the class names, one per line. Classes that are not in the model show up under a third heading, Not in Model, and are dropped from the list again when you untick them.

You can also drop object classes, or objects, from a palette onto the list: the dropped classes, or the classes of the dropped objects, are ticked. When classes are already ticked, a menu asks whether to Set, Add or Remove the dropped classes.

Ticking classes in an Object Class rule also narrows the other rules when the combination is All. See Object Class Rules Narrow the Other Rules.

Object Classification

One box with the hint Type classification key or name. An object passes the rule when its object class carries the classification, or one of the classifications below it. These are classifications of object classes, not the classification systems that classify single objects in the Objects palette.

The classification is typed: there is no list to pick from. Type the key or the name of one classification; the key is tried first, then the name, and capitalisation is ignored. To give several classifications, click the list button at the right end of the box and type them one per line; the box then reads List (3 items) and the rule passes the objects of classes that carry any of them. A rule with an empty box is reported as an error when the query is run.

An Object Classification rule is a good scope for Taking Objects Away with EXCEPT when you want to start from a large part of the model.

Object Group

One box with the hint Select or type group name. Drop it down to pick one of the groups that have objects in the model, or start typing — the list narrows to the names that contain what you typed. Type object groups and classification system groups are not listed.

When groups in different categories share a name, the list shows the category after the name, Level 1 (Storeys), so you can tell them apart. You can type a group that way too. A name typed without a category looks for the group in every category; when several categories have a group with that name, such a rule matches nothing, so pick the entry that shows the category or type it.

You can also type the name of a group that does not exist yet; the rule then matches nothing until it does.

An object passes the rule when it belongs to the group. A saved query that refers to several groups at once shows them as one entry, List (3 items), and passes objects that belong to any of them.

You can drop groups, or a group category, from the Objects palette onto the box. An empty box takes the dropped groups at once, several of them as one List entry. When the box already has a group, a menu asks whether to Set, Add or Remove the dropped groups.

Text Property

From left to right: the property, the operator, the case button and the value. The object passes when the property…

Equals — is exactly the value.

Contains — contains the value anywhere.

Starts With — begins with the value.

Ends With — ends with the value.

Like — matches a pattern with wildcards: ? stands for one character, * for any number of characters, # for one digit and [abc] for one of the listed characters. Basic Wall* matches every name that starts with Basic Wall.

Match — matches a regular expression.

Not Equal, Not Contains, Not Starts With, Not Ends With, Not Like, Not Match — the opposite of the operator above.

Three things about how the comparison is made:

  • Capitalisation is ignored unless you press the case button between the operator and the value. The button's icon changes to show that the comparison is now exact.
  • The Not… operators also pass objects that do not have the property at all. Name Not Contains "wall" selects the objects whose name lacks wall and the objects that have no name.
  • An empty value has a meaning. Equals with an empty value selects the objects whose property is empty or missing, and Not Equal with an empty value selects the objects that have any value at all. Contains, Starts With, Ends With, Like and Match never match an empty value.

The value box lists every distinct value the property has in the model. You can also type a value, compare against a whole list of values, or drop property values onto the box; all of that is described in Choosing the Value. With a list of values, Equals, Contains and the other positive operators pass an object that matches any of the values; the Not… operators pass an object that matches none of them.

Yes/No Property

The property and a value with three choices. The object passes when the property…

Yes — is Yes.

No — is No.

<no value> — has no value.

There is no operator to choose; the rule is always is equal to.

Number Property and Whole Number Property

The property, the operator and the value. The two rule types are the same apart from the properties they list: a Whole Number Property rule lists the properties that hold whole numbers, a Number Property rule those that hold decimal numbers. The object passes when the property is…

= — equal to the value.

≠ — different from the value — objects without a value pass too.

> ≥ < ≤ — greater than, at least, less than, at most the value — objects without a value never pass.

Write decimals with a dot: 3.5. The value box lists the values the property has in the model, and you can type your own or compare against a list of values, see Choosing the Value. With a list, = passes an object that equals any of the values, ≠ one that equals none, and the four relational operators pass an object only when the comparison holds against every value in the list.

Measure Property

The property, the operator, the value and the unit. The operators are the same as for a number property. The value is a single number; type it or pick one of the values the property has in the model.

The unit list fills in when you pick the property: it offers every unit of that property's kind — all length units for a length, all area units for an area — with the unit the model uses already selected. The value you type is read in the unit shown, and an object's measurement is converted to that unit before it is compared, so Height > 3 m and Height > 3000 mm select the same objects.

Measurements are rarely exactly equal to a round number. = and ≠ compare the numbers as they are, so for measured values ≥ and ≤, or a pair of > and < rules, are usually what you want.

Date, Date and Time, and Time of Day Property

The property, the operator and the value. The three rule types differ in the properties they list, in the operators they offer and in how the value is entered.

= ≠ > ≥ < ≤ — available for Date, Date and Time, and Time of Day.

Exists / Not Exists — the property has / does not have a value; the value box is ignored. Available for Date, Date and Time, and Time of Day.

Same Week, Same Month, Same Quarter, Same Year — in the same calendar week, month, quarter or year as the value. Available for Date, and Date and Time.

Same Hour, Same Day — available for Date and Time only.

The value box lists the values the property has in the model. You can also type a value, in the short date and time format of your Windows settings, or use the buttons at the right end of the box:

  • the calendar button (Date, Date and Time) opens a calendar to pick the date;
  • the clock button (Date and Time, Time of Day) opens a time editor with spin buttons; confirm with its OK button or cancel with its ×.

Every operator except Exists and Not Exists needs a value. If you leave the value empty, the rule quietly becomes Not Exists when the query is built and selects the objects that have no value. Check the value box if a date rule selects the wrong objects.

Expression

One box, with an fx button at its right end. The box shows the expression in colors on one line, cut with an ellipsis when it does not fit, and marks the place of a syntax error like the Expression Editor does. Click the box to edit the expression in place: while you type, the box shows the whole expression and the rule grows to make room for it. Click fx to open the Expression Editor in place of the Query Editor; when you apply or discard there, you come back to the query with the expression in the box.

An expression in a query has to answer true or false — the object passes when the answer is true. [Length {mm}] > 8000 is a valid rule, [Length {mm}] is not, and the Expression Editor refuses it. The expression can use every property of every object in the model. See the Expression Editor article for the editor and Writing Expressions in Simplebim for what you can write.

Use an Expression rule for the tests the other rules cannot express: comparing two properties with each other, arithmetic, several conditions on one property, and so on. For a plain comparison with a value, the typed rules are easier to read and faster.

Choosing the Property

The Text, Yes/No, Number, Whole Number, Measure, Date, Date and Time and Time of Day rules all start with the same property list. Drop it down and pick a property, or start typing — the list suggests the names that match.

The list is not a list of every property in the model. It holds the properties that:

  • are of the kind the rule tests — text properties in a Text Property rule, lengths and areas in a Measure Property rule, and so on;
  • hold a single value per object. Properties that hold a list of values cannot be queried;
  • exist on objects that are currently in the model, and — when the combination is All and the query has Object Class rules — on objects of the ticked classes. See Object Class Rules Narrow the Other Rules.

When two properties have the same name but come from different property sets, both are listed with the property set in square brackets, for example Fire Rating [Pset_WallCommon] and Fire Rating [Pset_DoorCommon], so you can tell them apart.

When you open a saved query whose property is not in the model that is open, the property name is added to the list and selected, so nothing is lost. The rule selects nothing until it is run on a model that has the property.

Choosing the Value

The value box of a Text, Number, Whole Number and Measure rule works the same way:

  • Pick from the list. The box lists every distinct value that the chosen property has in the model, sorted. While no property is chosen, it lists the values of all properties of that kind. When there is exactly one value, it is selected for you.
  • Type a value. Anything you type is used as it is, whether or not it is in the list.
  • Compare against a list of values (Text, Number and Whole Number rules). Click the list button at the right end of the box. The List Editor opens in place of the Query Editor: type one value per line, or drag objects, classes or groups into it, and click Apply Changes. Back in the rule, the box reads List (5 items). Empty lines and duplicates are dropped, and spaces at the ends of a line are trimmed.
  • Drag and drop (Text, Number, Whole Number and Measure rules). Drag one or several property values from the Properties palette onto the value box, or cells from another application such as Excel. An empty box takes the values at once. A box that already has a value shows a menu: Set replaces the value, Add adds the dropped values that are not in the list yet, and Remove takes the dropped values out of the list. Only property values are taken: a class, a group, objects and a property without a value are refused. Number rules take only numbers, and a Measure rule takes a single value.

A drop changes only the box it lands on. To choose the property by drag and drop, drop a property, or a single value of it, onto the property list of the rule; a property of another data type than the rule is refused.

What a list of values means is explained under each rule type: for Equals, Contains and the other positive text operators, and for =, an object passes when it matches any value; for the Not… operators and ≠ when it matches none; for >, ≥, < and ≤ the comparison has to hold against every value.

Object Class Rules Narrow the Other Rules

When the combination is All, the classes ticked in the query's Object Class rules narrow what the other rules offer:

  • the property lists only show properties that exist on objects of those classes;
  • the value lists only show values that objects of those classes have.

This is what makes the lists usable in a large model: tick Wall in an Object Class rule and a Text Property rule below it offers wall properties and wall values, not every text in the model.

The narrowing follows the Object Class rules as you edit them — tick another class and the lists grow, remove the Object Class rule and they go back to the whole model. A property you had already chosen stays chosen even when it is no longer in the narrowed list.

With Any or Advanced there is no narrowing, because an object can then pass the query without being one of the ticked classes. The lists show the whole model.

The narrowing only changes what the lists offer. It does not change what the rule tests — a Text Property rule still tests every object it is applied to.

Combining the Rules: All, Any and Advanced

The combination selector at the top left decides how the rules are put together, and the logic box next to it shows the result.

All — the logic box shows A AND B AND C. An object is selected when it passes every rule.

Any — the logic box shows A OR B OR C. An object is selected when it passes at least one rule.

Advanced — the logic box shows whatever you write. An object is selected when it passes the logic you wrote.

With All and Any the logic box is read-only and is rewritten for you whenever a rule is added or removed. With Advanced the box becomes editable and keeps the text it had, so the quickest way to write A AND (B OR C) is to set up the three rules under All, switch to Advanced and add the brackets.

Switching back from Advanced to All or Any throws your logic away and rewrites the box.

When you open a saved query, the editor picks the choice that fits it: All or Any for a flat query, Advanced — with the logic reconstructed in the box — for a query with nested logic or with EXCEPT.

Writing Advanced Logic

With the combination set to Advanced, write the logic in the logic box using the rules' letters, the words AND, OR and EXCEPT, and brackets:

A AND B
A OR B OR C
A AND (B OR C)
(A AND B) OR (C AND D)
A EXCEPT B
(A OR B) EXCEPT (C AND D)
A AND NOT B          ← not allowed: there is no NOT, write A EXCEPT B

A AND B selects the objects that pass both rules, A OR B the objects that pass at least one of them, and A EXCEPT B the objects that pass rule A but not rule B.

The rules of the little language:

  • Letters name rules. Only the letters of rules that exist are allowed. Small letters work the same as capitals, and so do and, or and except.
  • Put spaces around AND, OR and EXCEPT. A AND B is right; AAND B is read as a rule called AAND. Brackets do not need spaces: (A AND B)OR C is fine.
  • AND is read first, then OR, then EXCEPT. A OR B AND C means A OR (B AND C), and A AND B EXCEPT C OR D means (A AND B) EXCEPT (C OR D). See The Order in Which the Logic Is Read. When in doubt, use brackets.
  • There is no NOT. To leave objects out, write what you want first, then EXCEPT, then what to take away: A EXCEPT B. See Taking Objects Away with EXCEPT.
  • A rule you do not mention is not part of the query. With rules A, B and C and the logic A AND B, rule C is ignored. You can also mention a rule more than once.
  • An empty logic box means an empty query. Preview then does nothing and Apply Changes stores no query at all.

Taking Objects Away with EXCEPT

EXCEPT takes objects away from a selection. What stands before the word is the scope — the objects you start from. What stands after it is the exception — the objects to take away. A EXCEPT B selects the objects that pass rule A, without the ones that also pass rule B.

An example with three rules: A is an Object Class rule for Wall and Slab, B a Yes/No Property rule Is External is Yes, and C an Object Group rule for the group Demolished.

A EXCEPT B             the walls and slabs that are not external
A EXCEPT C             the walls and slabs that are not in the group Demolished
A EXCEPT B EXCEPT C    the walls and slabs that are neither external nor demolished
B EXCEPT A             everything external that is not a wall or a slab

What to know about it:

  • The order matters. A EXCEPT B and B EXCEPT A are different queries, as the last example shows. With AND and OR the order makes no difference.
  • There is always a scope. You cannot write everything except B: something has to stand before EXCEPT. To start from a large part of the model, use an Object Class or Object Classification rule as the scope.
  • You can take away several things. A EXCEPT B EXCEPT C takes away B and takes away C. It is the same as A EXCEPT (B OR C).
  • An exception only takes away. Objects that pass B but not A are not in the scope, so they are neither selected nor in the way.
  • It is not the same as a Not… operator. A rule with Not Equal or ≠ only looks at the objects of the classes that have the property at all. A EXCEPT B takes away exactly the objects that pass B and keeps every other object of the scope — also the objects of classes where the property B asks about does not exist.
  • A rule that cannot be worked out empties the EXCEPT. When a rule inside an EXCEPT cannot be resolved on the model — typically a property rule whose property the model does not have — that EXCEPT selects nothing. Otherwise an exception that silently did nothing would leave objects selected that you meant to take away.
  • Do not share queries with EXCEPT with older versions. Simplebim versions before 12.0 SR2 do not know EXCEPT. A query with EXCEPT at the top selects nothing there, and an EXCEPT deeper in the query is skipped, so the query can select different objects.

The Order in Which the Logic Is Read

Without brackets the logic is read in three passes: first every AND, then every OR, then every EXCEPT. EXCEPT comes last, so it splits the whole logic: everything before the first EXCEPT is the scope, and everything after an EXCEPT, up to the next EXCEPT or the end, is one exception.

You write                 It is read as
A AND B EXCEPT C          (A AND B) EXCEPT C
A OR B EXCEPT C           (A OR B) EXCEPT C          C is taken away from A and from B
A EXCEPT B OR C           A EXCEPT (B OR C)          B and C are both taken away
A EXCEPT B AND C          A EXCEPT (B AND C)         only what passes both B and C is taken away
A EXCEPT B EXCEPT C       A EXCEPT (B OR C)
A AND B EXCEPT C OR D     (A AND B) EXCEPT (C OR D)

Use brackets when you mean something else. For A without B, plus all of C, write (A EXCEPT B) OR C, not A EXCEPT B OR C, which takes C away as well. For all of A, plus B without C, write A OR (B EXCEPT C), not A OR B EXCEPT C, which takes C away from A too. An EXCEPT inside brackets is read on its own, with the same rule: in A OR (B AND C EXCEPT D) the scope of the EXCEPT is B AND C.

If you are not sure how a logic is read, put the brackets in yourself — they never hurt — and use Preview to see what is selected.

Checking the Logic

The logic is checked about half a second after you stop typing. When it is wrong, a message appears under the box while the cursor is in it; click elsewhere and the message hides, click back into the box and it shows again. When the logic is right, the message disappears.

The messages and what is wrong:

There are no rules defined. The query has no rules yet. Add a rule first.

Unexpected identifier 'X' found at position 4. Only rule identifiers A-C are allowed. X is not the letter of a rule. Either the rule was removed, or two words ran together, like AAND.

NOT is not supported. Use EXCEPT instead, for example A EXCEPT B. The logic has the word NOT. Write what you want first, then EXCEPT, then what to take away.

Token of type 'Operator' cannot be the first token in an expression. The logic starts with AND, OR or EXCEPT. An EXCEPT needs a scope before it.

Token of type 'Operator' cannot be the last token in an expression. The logic ends with AND, OR or EXCEPT.

Token of type 'Rule identifier' at position 2 cannot occur after token type 'Rule identifier'. Two letters follow each other without AND, OR or EXCEPT between them — A B. The same message with other token types means an AND after an AND, a letter right after a ), and so on.

Not all parentheses are closed. A ( has no ).

Unexpected token ')' found at position 5. A ) has no ( before it.

Positions count characters from the start of the box, starting at 0.

The check only looks at the shape of the logic — whether it can be read — not at whether it selects anything. A logic that reads fine can still select nothing; use Preview to see.

Duplicating, Moving and Removing Rules

Duplicating Rules

  1. Tick the letter of every rule you want to duplicate. The letter at the left edge of a rule row is a check box.
  2. Click Duplicate on the toolbar and choose Duplicate Selected - Below, which puts the copies directly below the last ticked rule, or Duplicate Selected - End, which puts them at the end. Duplicate is available only while a rule is ticked.

The copies take the letters of their place and the rules after them get the following letters, and the ticks are cleared. Under All and Any the logic box is rewritten. Under Advanced the logic is rewritten for the new letters, but the copies are not added to it: add them to the logic yourself. A copy is independent of its original: change one and the other stays as it was. Duplicating is the fast way to make a second rule on the same property with a different value.

Moving and Duplicating Rules by Drag and Drop

Rules are moved and duplicated by dragging their letter. The drag takes the ticked rules when the letter you drag is ticked, otherwise only that rule. A click on the letter still ticks or clears it; the drag starts only when the mouse has moved a clear distance with the button held.

As you drag, a red line across the list shows where the rules will land: above the rule under the pointer when you drag upwards and below it when you drag downwards. The list scrolls when you hold the pointer near its top or bottom edge. When you drop, a menu asks whether to move or duplicate the rules: Move Rule and Duplicate Rule for one rule, Move Selected Rules and Duplicate Selected Rules for several. Cancel drops nothing.

Like in Windows File Explorer, a key held when you drop skips the menu: Ctrl duplicates and Shift moves. While the key is held, a hint beside the pointer names what the drop will do. Over the dragged rule itself a move would leave the order as it is, so the drop duplicates the rules there; with Shift held the line is gray and nothing can be dropped.

Moved rules land as one block and keep their order. The letters follow the new order, and under Advanced the logic is rewritten so that it still names the same rules.

Removing a Rule

Click the × at the right end of the rule's header. The rule disappears and the rules below it move up one letter: remove B out of A, B, C, D and the old C becomes B and the old D becomes C.

Under All and Any the logic box is simply rewritten. Under Advanced the logic is rewritten to match:

  • every mention of the removed rule is dropped, and the brackets are simplified where that leaves a bracket with one rule in it — A AND (B OR C) without B becomes A AND C;
  • the letters after the removed one are shifted down — A AND (B OR C) without A becomes A OR B;
  • removing an exception of an EXCEPT leaves the rest — A EXCEPT B EXCEPT C without B becomes A EXCEPT B, where B is the old C. Removing the scope removes the whole EXCEPT, exceptions included — A EXCEPT B without A leaves the logic box empty. The exception does not move up into the place of the scope, because that would select exactly the objects you had taken away;
  • if the logic was not valid at the time — the box was salmon — only the letters are shifted and nothing else is touched, so read the logic again afterwards.

To remove several rules at once, tick their letters and click Delete on the toolbar. The ticked rules are removed without asking, in the same way as with ×.

There is no undo. If you removed the wrong rule, Discard Changes brings back the query as it was when you opened the editor, together with everything else you changed since.

Previewing the Query

A query that is built correctly is not necessarily the right query. Preview, at the top right, builds the query from the rules as they are now, runs it against the model and selects the matching objects — in the 3D view and in every palette that shows the selection. Whatever was selected before is replaced; when nothing matches, the selection becomes empty.

Preview changes nothing else. The query is not stored, and the objects are only selected, not changed, so you can preview as often as you like while you adjust the rules.

Preview needs at least one rule, and under Advanced a valid, non-empty logic; otherwise nothing happens. When a rule cannot be turned into a query — a value that is not a number, for example — a message names the rule, Error in rule B, and says what is wrong. Fix it and click Preview again.

Keeping or Discarding Your Changes

The editor opens in place of the list you came from, and the two buttons above it take you back.

Apply Changes — the query built from the rules replaces the one in the setting.

Discard Changes — the setting keeps the query it had.

Two things to know:

  • Apply Changes stores whatever can be built. If nothing can be built — there are no rules, the Advanced logic is empty, or a rule reports an error — the setting is emptied and the button in the configuration reads Edit Query (empty). If you want to keep the query that was there, click Discard Changes instead. Clicking Preview first is the easy way to find out which of the two you are about to get.
  • Applying the query puts it back into the configuration; it does not save the configuration itself. Saving happens where it always does, when you finish with the tool or dialog.

The stored query keeps the rules, their letters and the combination. The next time you click Edit Query the editor shows them again as you left them — with one exception: a query with more than 24 rules, which can only come from outside the editor, is cut to the first 24.

Troubleshooting

The property is in the model but not in the rule's property list.
Check three things. The rule type has to match the kind of data — a number stored as text only appears in a Text Property rule, a length only in a Measure Property rule. Properties that hold a list of values are never listed. And when the combination is All and the query has an Object Class rule, the list only shows properties of the ticked classes; tick the right class or switch the combination to Any to see the whole model.

The value list is empty.
Either no property is chosen, or no object in the model — or, under All with an Object Class rule, no object of the ticked classes — has a value for it. You can still type a value.

The object class I want is not in the Object Class list.
Only classes that have objects in the model are listed. Click the list button at the right end of the box and type the class name; it appears under Not in Model and is kept in the query.

Preview selects nothing.
Work through the rules one at a time: set the combination to Any, or write a single letter in the Advanced logic, and preview each rule alone. The usual causes are All where Any was meant, a text value with different capitalisation while the case button is pressed, a date rule with an empty value (it has become Not Exists), a measure compared with = that is never exactly equal, a value typed in the wrong unit, and an EXCEPT with a rule that cannot be worked out on the model, for example a property the model does not have.

Preview selects too much.
Remember that the Not… text operators and ≠ also select objects that have no value for the property. Combine the rule with a rule that requires the property to exist — Not Equal with an empty value for a text property — under All, or take the unwanted objects away with EXCEPT, see Taking Objects Away with EXCEPT.

The logic box is salmon and says "Unexpected identifier".
The letter is not a rule, or a space is missing: AAND B is read as one word. Compare with the letters of the rules and put spaces around AND and OR.

The logic box is salmon although the logic looks right.
Read the message under the box — it hides when the cursor leaves the box, so click into the box to see it. Look for a missing ), for an AND or OR at the very end, and for two letters with nothing between them.

The rules have different letters than before.
A rule was removed, moved or duplicated, and the letters follow the new order. Under Advanced the logic was rewritten to match; check that it still says what you meant.

I clicked Apply Changes and the setting now says "Edit Query (empty)".
Nothing could be built — the query had no rules, the Advanced logic was empty, or a rule reported an error that was dismissed. The previous query is gone. Open the editor again and rebuild it, and next time click Preview before Apply Changes.

Duplicate and Delete are not available.
No rule is ticked. Tick the letter at the left edge of a rule first.

A message says "Rule count exceeded. Maximum number of rules is 24."
That is the limit. Combine rules where you can — a list of values in one Text Property rule instead of one rule per value, or an Expression rule for several conditions on one property.

The date rule selected the objects with no value instead of the ones I wanted.
The value box was empty, so the rule became Not Exists. Pick or type a date.

The unit list of a Measure Property rule is empty.
Pick the property first; the units are listed for the property's kind of measurement.

Release Notes

Simplebim 12.0 SR2

  • A toolbar replaces Add or Copy Rules: Add opens the list of rule types, Duplicate copies the ticked rules below the last of them or to the end, and Delete removes the ticked rules at once, without asking.
  • Rules can be moved and duplicated by dragging their letter, with a drop menu or with Ctrl (duplicate) and Shift (move). Ticked rules move together, and the letters and the Advanced logic follow.
  • The new Object Classification rule selects the objects of the object classes that carry one of the typed classifications.
  • The Advanced logic has EXCEPT, for example (A OR B) EXCEPT C. AND is read first, then OR, then EXCEPT. Typing NOT gives a message that points to EXCEPT. Queries that use EXCEPT should not be shared with older versions: there, a query with EXCEPT at the top selects nothing, and an EXCEPT deeper in the query is skipped.
  • Each box of a rule takes only its own kind of drop. The value boxes take dropped property values or text from another application and offer Set, Add and Remove when they already have a value; the property list, the class list of an Object Class rule and the box of an Object Group rule take drops too. Earlier, a drop on a value box wrote the name of the dropped class, group or property.
  • The Expression rule is edited in place, with the expression in colors and syntax errors marked.
  • After a rule was removed, the rules below it kept their old letters while the Advanced logic was renumbered. The letters now follow.
  • Changes results. A query whose object class rules match no object class of the model now selects nothing. Earlier, the other rules then selected matching objects of every object class: walls with a given fire rating, in a model without walls, selected other objects with that fire rating.
  • Changes results. Rules that must all be true were in some cases combined as if one of them was enough: two Object Group rules, two object class rules, and a test for a missing property together with object class rules. Such queries and the rule based groups that use them now select fewer objects.

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.