This page shows some examples to clarify BimQL. These examples show the basics, which can very useful by itself and which can be combined into more complex queries.

Select

Select all

Select ?Var1

Select all doors

Select ?Var1
Where ?Var1.EntityType = “IfcDoor”

Selection based on attribute

Select ?Var1
Where ?Var1.Attribute.GlobalId = “32UdM49pfAMxiX5WyXhCuy”

Using a wildcard

Select ?Var1
Where ?Var1.EntityType = “IfcW*”

Select all with height attribute

Select ?Var1
Where ?Var1.Attribute.OverallHeight = “*”

Selection based on property

Select ?Var1
Where ?Var1.Property.MainColor = “rot”

Selection based on attribute or property

Select ?Var1
Where ?Var1.Color = “Yellow”

Select walls related to one space

Select ?Var1
Where ?Var1.Attribute.GlobalId = “3iSzpa9d93jhTDB7hG0QBW”
Select ?Var2 := ?Var1.*(2)
Where ?Var2.EntityType = “IfcWallStandardCase”

Update

During the development of BimQL the focus was mainly on the select part, however we also implemented functionality to update the value of an attribute. An example is shown on this page.

Update attribute

Select ?Var1
Where ?Var1.Attribute.GlobalId = ”1eHJakbVPEdf9cGdMXVBAY”
Set ?Var1.Attribute.Description := ”RedDoor”