---
title: Types
summary: The IFC class of an object — type with inheritance, NI for exact matches, IN lists and parameters, niceType, occurrences versus type definitions, and the suggestedType and suggestion facets.
order: 100
terms: [type-object]
see-also: [reference/bql/where, reference/bql/type-objects, reference/bql/group-by]
---

# Types

Every object has an IFC class (`IFCWALL`, `IFCDOOR`, `IFCSPACE`, …). `type` reads and tests it; `niceType` is a readable name; `suggestedType` is the class BIM.works' classifier proposes for the object.

## type {#type}

In `GET` and `GROUP BY`, `type` returns the class name in upper case. In `WHERE` it takes these forms:

| Form | Meaning |
|---|---|
| `type = IFCWALL` | The class or any subclass (`IFCWALLSTANDARDCASE` matches). |
| `type != IFCWALL` | Not the class nor a subclass. |
| `type IN (IFCWALL, IFCSLAB)`, `type NOT IN (...)` | Any of, none of — subclasses included. |
| `type IN $types` | The list comes from a parameter bound to an array of class names. |
| `type NI = IFCWALL`, `type NI IN (...)` | No inheritance: the exact class only. |

Class names are upper case and unquoted. A misspelt or lower-case name is flagged at validation with a did-you-mean and rejected at run time with [[error:BimWorksQueryError.UNKNOWN_TYPE]].

```bql {#type-basic}
GET qid, type, attribute.Name WHERE type = IFCWALL
```

```bql {#type-ni}
GET type, COUNT(qid) WHERE type NI IN (IFCWALL, IFCWALLSTANDARDCASE) GROUP BY type
```

```bql {#type-group}
GET type, COUNT(qid) GROUP BY type
```

## Occurrences and type definitions {#occurrences}

`IFCWALLTYPE`, `IFCDOORTYPE`, `IFCSPACETYPE` and the other `*TYPE` classes are type definitions without geometry. Querying them answers questions about the type catalogue, not about the building. To select building objects by data of their type, match the occurrence and reach the type through the `typeObject` relation ([[bql:type-objects]]):

```bql {#type-occurrence}
GET qid, attribute.Name WHERE type = IFCDOOR AND typeObject.attribute.Name CONTAINS "Double"
```

## niceType {#nicetype}

`niceType` is the class name without the `IFC` prefix and in readable casing (`Wall`, `Door`, `WallStandardCase`). It can be selected, grouped on and filtered with the string comparators.

```bql {#nicetype}
GET niceType, COUNT(qid) WHERE niceType CONTAINS "Wall" GROUP BY niceType
```

## suggestedType {#suggestedtype}

On instances with type suggestion enabled, `suggestedType` is the corrected class BIM.works' classifier proposes per object. It takes exactly the forms of `type` (`=`, `!=`, `[NOT] IN`, `NI`, parameters) and is selectable and groupable. Objects of models without suggestions match nothing.

```bql {#suggestedtype}
GET suggestedType, COUNT(qid) WHERE type = IFCBUILDINGELEMENTPROXY GROUP BY suggestedType
```

```bql {#suggestedtype-ni}
GET qid, attribute.Name WHERE suggestedType = IFCDOOR AND type NI = IFCBUILDINGELEMENTPROXY
```

## suggestion facets {#suggestion}

`suggestion.<facet>` exposes the classifier's verdict per object; every facet is selectable and filterable.

| Facet | Value |
|---|---|
| `suggestion.status` | `AGREE`, `REFINEMENT`, `CONTRADICTION`, `LOW_CONFIDENCE` or `NOT_CLASSIFIED` — the verdict on the object's class. |
| `suggestion.confidence` | Calibrated probability of the top suggestion, 0–1. |
| `suggestion.predefinedType` | The suggested `PredefinedType` value, to compare with `attribute.PredefinedType`. |
| `suggestion.predefinedStatus` | `AGREE`, `REFINEMENT`, `CONTRADICTION` or `NOT_APPLICABLE` at the PredefinedType level. |
| `suggestion.candidate1` … `candidate3` | The ranked labels, e.g. `IFCSLAB.ROOF`. |
| `suggestion.confidence1` … `confidence3` | Their probabilities. |

```bql {#suggestion}
GET type, suggestedType, suggestion.confidence WHERE suggestion.status = "CONTRADICTION" ORDER BY suggestion.confidence
```

## Used in {#used-in}

- [[page:tutorials/bql/your-first-query]] — filtering on type.
- [[page:tutorials/bql/filtering-with-where]] — `IN`, `NI` and the occurrence rule.
- [[page:how-to/query/run-a-bql-query]] — listing the classes of a model.
