BSL
The BIM.works Sequence Language — a list of labelled frames, each a BVL script, played as a sequence of viewer states; syntax, resolution through ResolveBsl, and where sequences run.
BSL turns a series of visualisations into a sequence: each frame is a BVL script, and the viewer steps from frame to frame — construction phases, a walk through the systems, a before-and-after. The grammar builds on BVL (BSL grammar), so a frame has the whole BVL vocabulary and every BQL condition.
Where it runs#
A Sequence action (type BSL) in the Actions tree stores the frames and plays them in the 3D viewer, with the frame labels as the steps (Use the Actions tree). Needs the BSL feature. The ResolveBsl task takes models and either input, the sequence as text or as its syntax tree, or query_uuid, a stored Sequence action you may read. It resolves every frame as ResolveBvl resolves a script, with the same parameters and include_non_geometric, and returns frames: per frame, in order, its label (absent when the frame has none) and the actions ResolveBvl returns for that script. A sequence with a syntax error is refused with SYNTAX_ERROR, and so is a frame whose condition uses a feature the workspace hides (FEATURE_NOT_VISIBLE).
Syntax#
{ [label "<text>"] <bvl content> } [, { ... } ...]Frames are comma-separated blocks; the optional label names the frame. The frame's content is BVL block content — group blocks, action sets and if chains, in that order — and an empty frame is allowed.
{ label "Structure"
if (type IN (IFCWALL, IFCSLAB, IFCCOLUMN, IFCBEAM)) { SHOW; } else { HIDE; } },
{ label "Envelope"
if (type = IFCWALL AND property.Pset_WallCommon.IsExternal = true) { SHOW COLOR "#3070b3"; } else { HIDE; } },
{ label "Openings"
if (type IN (IFCDOOR, IFCWINDOW)) { SHOW COLOR "orange" VIEWFIT; } },
{ label "Everything"
if (ALL) { SHOW COLOR RESET; } }{ label "Ground floor"
if (buildingStorey.calculated.property.level = 0) { SHOW; } else { HIDE; } },
{ label "First floor"
if (buildingStorey.calculated.property.level <= 1) { SHOW; } else { HIDE; } },
{ label "Second floor"
if (buildingStorey.calculated.property.level <= 2) { SHOW; } else { HIDE; } }Frames and state#
Each frame is resolved independently against the models, so a frame states the complete picture it wants (what to show and what to hide), not the difference from the previous one. A frame that only colours leaves visibility as the viewer had it. The Actions tree applies the frame you step to on what the viewer shows at that moment, also when you step back or jump: the Openings frame above only shows objects, so reached from Envelope it adds the openings to the envelope, and reached from Everything it leaves everything visible.
Ordering objects within a frame#
A BVL condition may sort and limit (ORDER BY ... LIMIT n), and BQL's ORDER BY GEOMETRY(...) produces a spatial walking order (order-by#geometry); together with SEQ labels they number objects along a route inside one frame.
{ label "Doors along the corridor"
if (type = IFCDOOR ORDER BY GEOMETRY(attribute.Name = "Main entrance")) { label(SEQ, ANNOTATION) SHOW; } }Used in#
- Use the Actions tree — playing a stored sequence.
Pages#
- BSL grammarThe Xtext grammar of BSL as shipped in this release.