User Guide
07.6 · Formula Engine

Scoped Parametrics

A scoped parametric is a variable that only exists inside a specific breakdown. It lets you keep formula values local to their calculation without polluting the global namespace.

Why Not Just Use Globals?

Globals are shared; scoped are private. If every breakdown for "Concrete 25MPa" defines its own #mix_ratio, you get five different values in five different contexts, all named identically. That would be chaos with globals — fine with scopes.

Supported Scopes

EnumScope
DefineScope.GlobalProject-wide.
DefineScope.DirectCostBreakdownOnly inside this direct-cost breakdown.
DefineScope.OverheadBreakdownOnly inside this overhead breakdown.
DefineScope.ResourceBreakdownOnly inside this built-up resource's breakdown.

Creating a Scoped Parametric

  1. Inside the breakdown pane, open the Scoped Parametrics toolbar button.
  2. Click New.
  3. Name, type, value.
  4. Scope auto-fills to the current breakdown; you can change it if needed.

Resolution Order

When a formula uses #name, TX1 resolves in this order:

  1. Local scoped — current breakdown.
  2. Parent scope — if nested breakdowns support it (rare).
  3. Global project defines.
  4. Live defines.

First match wins. If no match, #NAME?.

Use Case Examples

Concrete breakdown — mix ratio needed only here:

Scoped define: #agg_cement_ratio = 5
L1  Aggregate  = #agg_cement_ratio * #lq_cement

Formwork breakdown — strike time multiplier, local:

Scoped define: #strike_multiplier = 1.25
L1  Labour hours  = Qty * #strike_multiplier

Different breakdowns can reuse the same define name without interfering.

Scoped + Global at the Same Time

If both a scoped and project parametric share a name, the scoped wins within its scope. This is deliberate — scoped parametrics let you override a global value for one breakdown only.

Example: global #productivity_factor = 1.0. One troublesome breakdown sets its own #productivity_factor = 0.7. Only that breakdown applies the reduced figure; everywhere else uses 1.0.

Deleting

Scoped parametrics disappear when their parent breakdown is deleted. Deleting the define directly fails if any formula in its scope references it.