Query
Run BQL queries against model versions from every SDK and over HTTP, count and validate them, bind parameters, and query several models at once.
BQL is the query language of BIM.works: GET a list of features (attributes, properties, quantities, relations, calculated values) WHERE a condition holds, optionally grouped, ordered and limited. A query runs against one or more model versions and answers with one record per object, or per group. The language itself is described in BQL and taught in Learn BQL by doing; the guides here are about calling it.
- Run a BQL query: the call, the shape of the result, caching.
- Count results: the number of matching objects without fetching them.
- Use query parameters:
$nameplaceholders bound at call time. - Validate a query: syntax and feature checks without running.
- Convert 2.x queries to 3.0: BQL, BVL and BCL written for 2.x, rewritten to the 3.0 syntax in one request.
- Query multiple models: one query over several versions, and telling the results apart by qid.
- LLM assistance: a sentence turned into a BQL query or a BVL visualisation by the language model, run on the server and shown in the 3D viewer, with a live demo.
Pages#
- Run a BQL querySend a BQL query to one or more versions in JavaScript, Java, .NET, PHP or over HTTP, and read the records that come back.
- Count resultsGet the number of objects a query matches without fetching them, with a count call or with a COUNT aggregate.
- Use query parametersWrite $name placeholders in a query and bind their values at call time, instead of building query strings from user input.
- Query models that use different classification systemsDefine one virtual classification that reads NL-SfB where a model has it and translates Uniclass where it does not, so a query names one code instead of an OR per system.
- Validate a queryCheck that a query parses and uses only available features before running it, from the SDKs or with an empty model set over HTTP, and read the line and column of what fails and the warnings, with suggestions, of a query that parses.
- Convert 2.x queries to 3.0Send the BQL queries, BVL visualisations and BCL checks your application keeps itself, written for BIM.works 2.x, in one request and get them back in the 3.0 syntax, with what changed, or with the error that is left for you to fix.
- Query multiple modelsRun one query over several versions, tell the results apart by version, and select the models under a folder over HTTP.
- LLM assistanceTurn a sentence into a BQL query or a BVL visualisation with TextToAction, run it on the server with Query or ResolveBvl, and show the result in the 3D viewer, all through the OpenAPI.