Units

Prev Next
This content is currently unavailable in English. You are viewing the default (French) version.

In IFC you can define your own units. You can do this on the IfcProject level, but in certain cases you can also set units on a per-value basis. The BQL allows you to extract exactly what is in the IFC file, additionally BQL allows you to dictate in which units you would like to extract or select data. The BIM viewer will automatically convert all the available units.

Global unit settings

For convenience, you can set the default units in your BQL per unit type. This will have an effect on all returned values.

Length units in millimeters



GET attribute.OverallWidth USING LENGTH_UNIT=mm


"OverallWidth": {   "name": "OverallWidth",   "value": 1000,   "type": "double",   "unit": "MILLI_METER",   "original_unit": "METER",   "original_value": 1 }

Length units in meters



GET attribute.OverallWidth USING LENGTH_UNIT=m


"OverallWidth": {   "name": "OverallWidth",   "value": 1,   "type": "double",   "unit": "METER" }

Note how the example only request the “OverallWidth” attribute, but the units are applied to all returned values that have a LENGTH_UNIT (also properties, calculated values etc…)

Available units



Definition order


Unit type


Allowed values


1

LENGTH_UNIT

mm, cm, dm, m, km, in, ft, yd, mi

2

AREA_UNIT

mm2, cm2, dm2, m2, m2, km2, inch2, yard2, foot2, acre, mile2

3

VOLUME_UNIT

mm3, cm3, dm3, m3, inch3, foot3, yard3, l

4

MASS_UNIT

mg, cg, g, kg

5

TEMPERATURE_UNIT

dc


Note that the order of defining the default units has no effect on the outcome, but the syntax does require a specific order when defining them (this is inherent to the technology used to parse the queries). The required order is the same order as in the above table.

Also note that in BQL for the exponents we are using regular characters and not the superscript characters, to make it easier for developers to type them. In the query output superscript is used for the symbols, again to make life easier.

Unit type


Value


Symbol



Unit type


Value


Symbol


Length

MILLI_METER

mm

Length

CENTI_METER

cm

Length

DECI_METER

dm

Length

METER

m

Length

KILO_METER

km

Length

INCH

in

Length

FOOT

ft

Length

YARD

yd

Length

MILE

mi

Area

SQUARED_MILLI_METER

mm²

Area

SQUARED_CENTI_METER

cm²

Area

SQUARED_DECI_METER

dm²

Area

SQUARED_METER

Area

SQUARED_KILO_METER

km²

Area

SQUARED_INCH

in²

Area

SQUARED_FOOT

ft²

Area

SQUARED_YARD

yd²

Area

SQUARE_MILE

mi²

Area

ACRE

ac

Volume

CUBIC_MILLI_METER

mm³

Volume

CUBIC_CENTI_METER

cm³

Volume

CUBIC_DECI_METER

dm³

Volume

LITER

l

Volume

CUBIC_METER

Volume

CUBIC_INCH

in³

Volume

CUBIC_FOOT

ft³

Mass

GRAM

g

Mass

MILLIGRAM

mg

Mass

CENTIGRAM

cg

Mass

KILOGRAM

kg

Temperature

DC

°C

Unitless

UNITLESS