Quantities

Quantity sets and quantities — quantity.Qset.Name, wildcards, the fields of a quantity, units, aggregating quantities, and quantity.meta.

A quantity is a measured value in a quantity set (Quantity set): Qto_WallBaseQuantities.NetSideArea, Qto_DoorBaseQuantities.Width, Qto_SpaceBaseQuantities.NetFloorArea. Quantities are addressed like properties and always carry a unit.

quantity.Qset.Name#

Text#
quantity.<Qset>.<Name>
quantity.*.<Name>            // the quantity in any set
quantity.<Qset>.*            // every quantity of the set
quantity.*                   // every quantity of the object
quantity.<Qset>.<Name>.<field>

Names follow the same quoting rules as properties. A quantity path needs a quantity name.

BQL#
GET qid, attribute.Name, quantity.Qto_WallBaseQuantities.NetSideArea, quantity.Qto_WallBaseQuantities.NetVolume WHERE type = IFCWALL
BQL#
GET qid, quantity.*.Width, quantity.*.Height WHERE type IN (IFCDOOR, IFCWINDOW)

In WHERE#

Quantities are numbers: compare them with <, <=, >, >=, =, != (with WITHIN tolerances), BETWEEN and IN, with unit literals on the right-hand side, or against another feature or expression.

BQL#
GET qid, quantity.Qto_DoorBaseQuantities.Width UNIT mm WHERE type = IFCDOOR AND quantity.Qto_DoorBaseQuantities.Width < 0.85 m
BQL#
GET qid, quantity.Qto_WallBaseQuantities.NetVolume, calculated.quantity.volume
WHERE type = IFCWALL AND quantity.Qto_WallBaseQuantities.NetVolume != calculated.quantity.volume WITHIN 2 %

Units#

A quantity value carries the model's unit for its dimension (unit, with an SI symbol). Convert one quantity with UNIT (UNIT) or every value of a dimension with USING (USING and parameters).

BQL#
GET qid, quantity.Qto_SpaceBaseQuantities.NetFloorArea UNIT m2 AS FloorArea WHERE type = IFCSPACE ORDER BY quantity.Qto_SpaceBaseQuantities.NetFloorArea DESC

Aggregates#

Quantities are the usual argument of SUM, AVG, MIN, MAX and the other numeric aggregates (group-by#aggregates).

BQL#
GET buildingStorey.attribute.Name, SUM(quantity.Qto_SpaceBaseQuantities.NetFloorArea) AS FloorArea WHERE type = IFCSPACE GROUP BY buildingStorey.attribute.Name

Fields#

A quantity in the result has name, quantitySetName, type, value, classType (IFCQUANTITYLENGTH, IFCQUANTITYAREA, IFCQUANTITYVOLUME, IFCQUANTITYCOUNT, IFCQUANTITYWEIGHT, …), an optional description, and unit/symbol. The selectable fields are .name, .description, .value, .type, .classType, .quantitySetName and .oid.

Calculated alternatives#

When a model has no quantities, or to check the ones it has, BIM.works derives floor areas, volumes and bounding boxes from the geometry: Calculated values.

quantity.meta#

quantity.meta lists the quantity sets and quantities an object has (Meta features).

BQL#
GET quantity.meta, COUNT(qid) WHERE type = IFCWALL GROUP BY quantity.meta

Used in#