Checking and IDS
How IDS and BCL checks share one pipeline and Java checks run beside it, how an IDS file is evaluated, what a run returns, when to choose which, and how every check-in is validated against its schema first.
A Check asks of every object in a selection whether it satisfies a rule and records the answer. BIM.works runs checks written in three ways: buildingSMART's IDS format and its own BCL language, which share one pipeline and one result model, and Java, which runs in a sandbox and reports a list of findings of its own. This page explains what each way is good for and what happens between "run" and a list of red objects. The steps are in Checks and Run an IDS check.
What a check produces#
Every check yields, per object it applies to, one result: success, error, warning or info, with an optional message. A check that applies to two thousand walls produces two thousand results, and a check run over several versions produces them per version. That granularity is the point: a summary "37 failures" is useful, a list of the 37 objects, colourable in the viewer and exportable to BCF, is what gets the model fixed. Results carry the object's Qid, so they can be selected, hidden and coloured with the same sets the viewers use.
A run evaluates the check afresh every time: results are not reused from an earlier run, and identical BCL or IDS runs that overlap share one evaluation.
IDS#
The Information Delivery Specification is buildingSMART's XML format for requirements on IFC models. A file holds specifications; each has an applicability — which objects it concerns, by entity and predefined type, attribute, property, classification, material or part-of relation — and requirements the applicable objects must meet, with cardinalities (required, optional, prohibited) and value restrictions (enumerations, patterns, bounds). Its strength is that it is an exchange format: a client writes one file, every contractor's tool evaluates it, and the requirements travel with the contract.
BIM.works validates an uploaded IDS file against the IDS 1.0 schema and evaluates it by translation: every applicability facet and every requirement facet becomes a BQL condition — an entity facet is a type condition, a property facet a condition on property.<Pset>.<Name>, a classification facet on classification.<System>, a material facet on material.name, a part-of facet a walk up the decomposition — and the engine evaluates the combined condition per object exactly as it would a hand-written query. The results are the same per-object results as for a BCL check. IDS files live in the Actions tree like any other Action ("Add new → IDS Check", NEW_IDS); the instance seeds an Examples folder with public IDS files, and the API runs an IDS string against a set of versions in one call (Run an IDS check via the API).
BCL#
BCL is the in-house language: select (type = IFCWALL AND property.*.IsExternal = true) { name "External walls have a fire rating" check (property.*.FireRating != null) { success; } else { error("Missing FireRating"); } }. Anything a BQL condition can say, a BCL check can test: wildcards across property sets, calculated values against declared quantities within a tolerance, spatial relations, storey and type properties, regular expressions. require <condition>; is the shorthand for the common check that errors on failure, nested select blocks narrow the scope, and BVL actions inside the blocks colour the scope or the failures so the check doubles as a visualisation.
BCL is faster to write and iterate than IDS — it is one text field in the UI, or one proposal from the chat, with live validation — and it is more expressive, because IDS facets are a fixed vocabulary and BQL is a language. Its weakness is the mirror image: it runs in BIM.works. When a requirement has to leave the platform, a BCL check can be converted to IDS (BCL_TO_IDS) within what IDS can express.
Java checks#
Some rules are not rules but algorithms: a geometric test that needs to walk the mesh, a lookup against an external table, a computation over several objects at once. For those BIM.works accepts a check written in Java (BCLJ), compiled and run in a sandbox with a whitelisted API. A run returns the check's findings as a flat list — severity, title, description and object, with optional groups, related objects and figures — which the Actions tree shows in the 3D viewer in the colours of a BCL result. They are not the result tree of a BCL or IDS check, and there is no BCF export of them. Java checks are a developer feature (JAVA_ACTIONS) with its own scope (checks:java), deliberately not implied by checks:run: running user-supplied code is a larger capability than running a declarative check, and a token can be issued that does one and not the other. Two switches must both be on: the operator's sandbox.enabled for the instance, and the feature for the account. Without the feature the server refuses to store, compile or run Java (also through an import), and the app shows no Java actions; with the sandbox off the app hides them as well and every compile or run is refused.
The pipeline#
Whatever the source, a check is parsed and validated first — BCL by its grammar, IDS by its schema, Java by compilation — with positions and messages, before anything is evaluated. For BCL and IDS the selection and the conditions are then evaluated against the feature index of each version, the same index that answers queries, so a check over a large model is a matter of seconds rather than a pass over the file. The results form one result tree per run, which the UI reads into the check panel, the viewer colouring and, for an IDS check with CHECK_CHARTS, a chart view. A run over several models produces one result set with a per-model mapping, so a federated check — the door in the architect's model must have a matching opening in the structural one — is possible where the languages allow it.
Before BCL, checks were "check definitions" (CHECK_DEFINITIONS): named sets of definitions, each a check built into the server with its configuration, run together on a set of versions. They are still supported — the feature gates the tasks that read and manage them, and the checks:write scope — but the Java SDK marks their methods deprecated and the how-to guides leave them out (Checks); new checks are BCL or IDS.
Choosing#
Write IDS when the requirement is contractual and must be evaluated outside BIM.works too, or when the client hands you one. Write BCL when you are the one checking, when the rule needs calculated values, tolerances or spatial relations, or when you want to iterate in the UI with the model in view; convert to IDS if it later has to travel. Write Java only when a rule cannot be stated as conditions; its findings have no BCF export. IDS and BCL produce the same results with the same viewer integration, so the choice between them can be made per check and revisited.
Validation, before any check#
A check asks whether a model meets requirements; validation asks whether the file is a correct IFC file in the first place, against its own schema. BIM.works validates every check-in, successful or not, and keeps the validation report with the version — or, when the file could not be read at all, with the error, so a rejected file still says why (Read the validation report, Get the validation report via the API).
The report follows the pipeline: a stage for upload, parse, schemaCheck, geometry3d, geometry2d and indexing, each with a status — completed, failed, skipped, not run, disabled — so not checked is never confused with no findings. The schema check evaluates the schema's own rules: the WHERE rules of entities and types (for IFC2X3, IFC4 and IFC4X3 that is 1085 distinct rules, compiled from the EXPRESS schemas), UNIQUE and global rules, required attributes, attribute types, enumeration literals, select membership, aggregate bounds, abstract instantiation, inverse cardinality, the standard property sets and the file header. The geometry stages report what went wrong while the geometry was generated: unsupported representations, tessellation and boolean failures, missing placements, openings that could not be subtracted, degenerate geometry, open edges, excessive tessellation. A plain-English rendering of every rule that fired is generated from the same rule text the checker compiles, so the explanation cannot drift from what was checked.
Validation never blocks: a failing rule does not fail the check-in, the model loads, and the report says what to fix. How much is checked is a setting of the instance, from nothing to every rule, and the schema check can be run again when that setting changes. It is not a mesh analysis: self-intersections and non-manifold shapes are not found.