Scripting & Reusable Workflows
Because this is still OcaltQL, real automation already applies - the same NEW OPERATION / RUN pattern from the core language scales cleanly into 3D and CAD workflows for variant generation, cost estimation, and batch processing.
Parametric Cost Estimation
NEW OPERATION cost_estimate WITH ?width
OPEN
NEW BIM PROJECT UNITS "m" SET ?bim
AFTER BIM ?bim LEVEL "Ground" ELEVATION 0 SET ?lvl0
AFTER BIM ?bim WALL FROM 0,0 TO ?width,0 HEIGHT 3 LEVEL ?lvl0 TYPE "Basic-200mm" SET ?w1
AFTER BIM ?bim WALL FROM ?width,0 TO ?width,10 HEIGHT 3 LEVEL ?lvl0 TYPE "Basic-200mm" SET ?w2
AFTER BIM ?bim WALL FROM ?width,10 TO 0,10 HEIGHT 3 LEVEL ?lvl0 TYPE "Basic-200mm" SET ?w3
AFTER BIM ?bim WALL FROM 0,10 TO 0,0 HEIGHT 3 LEVEL ?lvl0 TYPE "Basic-200mm" SET ?w4
AFTER CALCULATE ?width * 10 SET ?area
AFTER CALCULATE ?area * 1500 SET ?cost
AFTER EMIT "Building " & ?width & "m wide costs $" & ?cost
AFTER RETURN ?cost
CLOSE
AFTER RUN cost_estimate WITH 20 SET ?r1
AFTER RUN cost_estimate WITH 30 SET ?r2
AFTER RUN cost_estimate WITH 40 SET ?r3
One definition, three variants - the same operation-then-RUN pattern the rest of OcaltQL uses for any reusable logic.
BIM OPEN
Takes a BIM document that already exists and hands back a handle to it, so every BIM verb can address it as though you had just created it. Nothing is read, written or validated - the handle carries the path, millimetres as its units, and its kind.
Continue an Existing Model
BIM OPEN "/root/bim/office.ocad" SET ?model
AFTER BIM ?model WALL FROM 0,0,0 TO 6000,0,0 HEIGHT 2700 SET ?w
AFTER BIM ?model EXPORT AS "ifc" INTO "/root/bim/office.ifc"
The path is taken on trust. A document that is not there fails at the first verb that actually touches it, not here.