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
| Enum | Scope |
|---|---|
DefineScope.Global | Project-wide. |
DefineScope.DirectCostBreakdown | Only inside this direct-cost breakdown. |
DefineScope.OverheadBreakdown | Only inside this overhead breakdown. |
DefineScope.ResourceBreakdown | Only inside this built-up resource's breakdown. |
Creating a Scoped Parametric
- Inside the breakdown pane, open the Scoped Parametrics toolbar button.
- Click New.
- Name, type, value.
- 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:
- Local scoped — current breakdown.
- Parent scope — if nested breakdowns support it (rare).
- Global project defines.
- 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.