Type objects

The type definition of an occurrence — typeObject.attribute, typeObject.property, the merging of type and occurrence properties, origin, and the own relation.

Most building objects are occurrences of a type object (IfcWallType, IfcDoorType, …) that carries shared attributes, properties and materials. typeObject reaches it from the occurrence; the properties of the type are also merged into the occurrence's own.

typeObject.feature#

BQL#
GET qid, attribute.Name, typeObject.qid, typeObject.attribute.Name, typeObject.niceType WHERE type = IFCDOOR
BQL#
GET qid, typeObject(attribute.Name, attribute.PredefinedType, property.*) WHERE type = IFCWALL

In WHERE#

Selecting occurrences by data of their type is the way to find building objects by type name; querying the *TYPE classes directly returns geometry-less definitions (types#occurrences).

BQL#
GET qid, attribute.Name WHERE type = IFCSPACE AND typeObject.attribute.Name CONTAINS "balkon"
BQL#
GET typeObject.attribute.Name, COUNT(qid) WHERE type = IFCWINDOW GROUP BY typeObject.attribute.Name

Merging rules#

When a property is read from an occurrence (property.Pset_WallCommon.FireRating), BIM.works first takes the type object's properties and then the occurrence's own. A property present on both is returned with the occurrence's value; a property only the type defines is returned with origin: "type". The same holds for attributes read with attribute.*. Filtering on property.*.X therefore sees type properties too — an occurrence without its own FireRating still matches when its type has one.

own#

own restricts a feature to the occurrence's own data, without the merge: own.property.Pset_WallCommon.FireRating has no value when only the type defines the rating.

BQL#
GET qid, attribute.Name, own.property.Pset_WallCommon.FireRating, typeObject.property.Pset_WallCommon.FireRating
WHERE type = IFCWALL AND property.Pset_WallCommon.FireRating
BQL#
GET qid, attribute.Name WHERE type = IFCWALL AND property.Pset_WallCommon.FireRating AND NOT own.property.Pset_WallCommon.FireRating

Used in#