---
title: Properties and quantities
summary: Read property sets and quantity sets by name or with the * wildcard, discover which sets a model has, and quote names that need it.
order: 30
terms: [bql, pset, property, quantity-set, quantity]
see-also: [tutorials/bql/filtering-with-where, tutorials/bql/relations, reference/bql/properties, reference/bql/quantities]
---

# Properties and quantities

Most of what makes a model useful is not in the IFC attributes but in its property sets ([[term:pset|psets]]) and quantity sets. BQL reaches both with a three-part path: the kind, the set, the name.

```bql {#external-walls}
GET qid, attribute.Name, property.Pset_WallCommon.IsExternal
WHERE type = IFCWALL AND property.Pset_WallCommon.IsExternal = true
```

`property.Pset_WallCommon.IsExternal` is the `IsExternal` property of the `Pset_WallCommon` set. Booleans are written `true` and `false`; strings and numbers as in the previous lesson. The same path works in `GET` and in `WHERE`.

## When you do not know the set

Property names are far more stable than set names: `IsExternal` lives in `Pset_WallCommon` on walls, `Pset_DoorCommon` on doors and `Pset_SlabCommon` on slabs. A `*` in the set position matches any set, so one condition covers them all:

```bql {#wildcard}
GET qid, type, attribute.Name WHERE property.*.IsExternal = true
```

The same wildcard exists for quantities (`quantity.*.NetVolume`) and, in the name position, gives you every member of a set (`property.Pset_WallCommon.*`). `property.*` on its own returns all properties of an object, which is a lot of columns but the fastest way to see what an object carries. Details and the field suffixes (`.value`, `.unit`, `.propertySetName`) are in [[bql:properties]].

## Discovering what a model has

`property.meta` lists the property names an object has instead of their values. Grouped and counted (the grouping lesson explains the syntax), it is a survey of the model in one query — the doors of the demo model turn out to carry 2756 different property-and-set combinations, most of them one door supplier's own sets:

```bql {#survey}
GET property.meta, COUNT(qid) WHERE type = IFCDOOR GROUP BY property.meta
```

`quantity.meta` does the same for quantities. Run these before you rely on a name in a model you have not seen before.

## Quoting names

A set or property name is written bare when it looks like an identifier (letters, digits, underscore). Anything else needs double quotes: the demo model's custom set `eigenschappen` has a property called `Rc-waarde`, which is `property.eigenschappen."Rc-waarde"`, and its `wapening kg/m3` is `property.eigenschappen."wapening kg/m3"`. Quote the set name too when it contains spaces.

## Quantities and units

Quantities follow the same path with `quantity`. The demo model has a `BaseQuantities` set on its building elements with `Length`, `Width`, `Height`, `NetSideArea`, `GrossVolume`, `NetVolume` and a few more. A quantity has a unit, so a comparison can carry one: `quantity.*.Height > 2.5 m` is read as 2.5 metres whatever unit the model uses internally, and `> 2500 mm` means the same. Without a unit the number is not converted: it is compared with the value as stored, in the internal unit (millimetres for lengths) or in the model's own unit depending on how the condition runs ([[bql:unit#literals]]), which is easy to get wrong, so write the unit. [[bql:quantities]] describes the quantity kinds; the units lesson at the end of this course shows how to control the units in the result.

Besides the quantities the authoring tool exported, BIM.works computes its own from the geometry: `calculated.quantity.volume`, `calculated.quantity.floorArea` on spaces, `aabb.height`. They exist for every object with geometry, exported quantities or not, and the [calculated values](calculated-values.md) lesson uses them.

Watch out for the difference between the wildcard and a set name: 443 walls of the demo model are higher than 2.5 m when you ask with `quantity.*.Height`, but only 439 when you ask `quantity.BaseQuantities.Height` — four walls keep their height in the authoring tool's own set. The wildcard is the safer question.

## Your turn

```lesson {#lesson-1}
goal: List the external walls with their name and the IsExternal value from Pset_WallCommon.
show: json
check: values
starter: |
  GET qid, attribute.Name WHERE type = IFCWALL
hints: |
  - The property path is property.Pset_WallCommon.IsExternal.
  - Add the same path to GET to see the value in the result.
  - Booleans are lowercase.
solution: |
  GET qid, attribute.Name, property.Pset_WallCommon.IsExternal WHERE type = IFCWALL AND property.Pset_WallCommon.IsExternal = true
accept: |
  - GET qid, attribute.Name, property.*.IsExternal WHERE type = IFCWALL AND property.*.IsExternal = true
```

The JSON above is worth reading closely: a property leaf carries `propertySetName`, so the result tells you which set the value came from even when you asked with a wildcard.

```lesson {#lesson-2}
goal: List the walls that are both external and load-bearing, without naming a single property set.
show: table
check: objects
forbid: Pset_
forbid-message: the point of this round is the set wildcard — no Pset_ name in the query
starter: |
  GET qid, attribute.Name WHERE type = IFCWALL AND property.Pset_WallCommon.IsExternal = true
hints: |
  - Replace the set name by *.
  - The second property is called LoadBearing.
solution: |
  GET qid, attribute.Name WHERE type = IFCWALL AND property.*.IsExternal = true AND property.*.LoadBearing = true
accept: |
  - GET qid, attribute.Name WHERE type = IFCWALL AND property.*.LoadBearing = true AND property.*.IsExternal = true
```

```lesson {#lesson-3}
goal: List the walls higher than 2.5 metres with their height and net volume.
show: table
check: values
starter: |
  GET qid, attribute.Name WHERE type = IFCWALL
hints: |
  - The quantities are called Height and NetVolume; use the * wildcard for the set.
  - Write the unit in the comparison: 2.5 m.
solution: |
  GET qid, attribute.Name, quantity.*.Height, quantity.*.NetVolume WHERE type = IFCWALL AND quantity.*.Height > 2.5 m
accept: |
  - GET qid, attribute.Name, quantity.*.Height, quantity.*.NetVolume WHERE type = IFCWALL AND quantity.*.Height > 2500 mm
```

```lesson {#lesson-4}
goal: List the doors that have no FireRating property at all.
show: table
check: objects
starter: |
  GET qid, attribute.Name WHERE type = IFCDOOR
hints: |
  - A property path without a comparator means "has a value".
  - NOT in front of it means the opposite.
  - Use the set wildcard so the set name does not matter.
solution: |
  GET qid, attribute.Name WHERE type = IFCDOOR AND NOT property.*.FireRating
accept: |
  - GET qid, attribute.Name WHERE NOT property.*.FireRating AND type = IFCDOOR
```

## You can now

- Read a property or quantity by set and name, in `GET` and in `WHERE`.
- Use `*` when the set name is unknown or varies by type.
- Survey a model with `property.meta` and `quantity.meta`.
- Quote names with spaces or punctuation.
- Compare quantities with unit literals.

Next: [Relations](relations.md), from an object to the objects around it.
