---
title: Model
summary: Features of the model an object belongs to — model.name, id, versionUuid, ifcVersion, discipline, filesize and the header fields; the model conditions ifcVersion, discipline and count in WHERE.
order: 220
terms: [vid]
see-also: [reference/bql/index, reference/bql/where, how-to/query/query-multiple-models]
---

# Model

A query runs over the models passed to the API call ([[page:reference/bql#models]]). `model.*` reads properties of the model a result object comes from, which matters when a query spans several models.

## GET features {#features}

| Path | Value |
|---|---|
| `model.name` | The model's name (the file name of the version). |
| `model.id`, `model.versionUuid` | The version identifier ([[term:vid|Vid]]) as an id and as a UUID. |
| `model.ifcVersion` | The IFC schema: `IFC2X3`, `IFC4`, `IFC4X3`. |
| `model.discipline` | The discipline assigned to the version (`ARCHITECTURAL`, `STRUCTURAL`, `HVAC`, …). |
| `model.filesize` | Size of the uploaded file in bytes. |
| `model.header.<field>` | A STEP header field: `descriptions`, `implementationLevel`, `filename`, `timeStamp`, `authors`, `organizations`, `preProcessorVersion`, `originatingSystem`, `authorization`, `schemaIdentifiers`, `ifcSchemaVersion`. `authors`, `organizations` and `descriptions` are lists of texts, `timeStamp` is milliseconds since 1970 (written under the key `timestamp`), the others are texts; `schemaIdentifiers` is the same value as `ifcSchemaVersion`. |
| `model.*` | All of the above. |
| `model` | The model summary. |

```bql {#model-get}
GET model.name, model.ifcVersion, model.discipline, COUNT(qid) GROUP BY model.name, model.ifcVersion, model.discipline
```

```bql {#model-header}
GET model.header.originatingSystem, model.header.preProcessorVersion, model.header.authors, COUNT(qid) GROUP BY model.header.originatingSystem, model.header.preProcessorVersion, model.header.authors
```

Grouping by a list field groups by the whole list: models with the same authors share a group.

## Conditions {#conditions}

Three model conditions filter objects by their model. Each takes `=`, `!=`, `IN (...)` and `NOT IN (...)`; `count` takes a numeric comparator.

| Condition | Meaning |
|---|---|
| `model.ifcVersion = IFC4` | The object's model has that schema. |
| `model.discipline IN (ARCHITECTURAL, STRUCTURAL)` | The model has one of those disciplines. |
| `model.count(<condition>) > n` | The model contains more than *n* objects matching the condition. |

Disciplines: `UNKNOWN`, `ARCHITECTURAL`, `AIR_CONDITIONING`, `BUILDING_SERVICES`, `ELECTRICAL`, `HEATING`, `STRUCTURAL`, `VENTILATION`, `PLUMBING`, `SPRINKLER`, `INVENTORY`, `FACILITY_MANAGEMENT`, `LANDSCAPE`, `PREFAB_CONCRETE`, `STEEL_STRUCTURE`, `SITE_OPERATIONS`, `COOLING`, `SPECIAL_PIPING`, `PROCESS`, `HVAC`, `SPATIAL`, `GEOTECHNICAL`, `BRIDGE`, `ROAD`, `RAILWAY`, `PORTS_AND_WATERWAYS`, `TIMBER_STRUCTURE`, `VERTICAL_TRANSPORT`, `TUNNEL`, `SURVEY`.

```bql {#model-where-version}
GET qid, attribute.Name WHERE type = IFCWALL AND model.ifcVersion = IFC2X3
```

```bql {#model-where-discipline}
GET model.name, COUNT(qid) WHERE model.discipline NOT IN (ARCHITECTURAL, SPATIAL) GROUP BY model.name
```

```bql {#model-where-count}
GET model.name, COUNT(qid) WHERE type = IFCSPACE AND model.count(type = IFCSPACE) > 50 GROUP BY model.name
```

A header field is compared like any text feature (`=`, `!=`, `IN`, `CONTAINS`, ...); a list field matches when one of its texts does.

```bql {#model-where-header}
GET model.name, COUNT(qid) WHERE model.header.originatingSystem CONTAINS "Revit" GROUP BY model.name
```

## Geo-reference {#georeference}

The model's geo-reference is tested with `geoReference WITHIN_EPSG(<code>)` and `geoReference WITHIN_COUNTRY(NL)`, and converted with `gis:convertGeoReference(<epsg>)`; see [[bql:spatial-and-advanced#georeference]].

## Used in {#used-in}

- [[page:how-to/query/query-multiple-models]] — telling the models apart in one result.
