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

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.