WoodcoreMake the numbers vibe

Commands › Reading the project's data

#get Reading the project's data

Reads one field of a variable already read or declared: its value, unit, symbol, label…

#get(, ,
  : 
)

Hover an argument: what it does. Hover its value: every possible value. A click keeps the bubble open.

The essentials

Data, not a displayIt returns a value: print it, compare it or loop over it.
In a contextA report variable is read by its name, in a context: a sentence that depends on a result.
One placeThe engine reads fields through get, never .value: a variable's shape changes here alone.

Arguments

ArgumentStatusWhat it does, and examples
The line's arguments
required
A var object, or the name of a variable the report declared.
#get((value: 1.394, unit: "kN/m²", symbol: "s_k"), "value")an object written
#context get("eta", "value")a report variable, by its name
required
The field read; an unknown one stops, naming the valid ones.
"value"the number
"unit"the unit, "" if dimensionless
optional
For a name, the domain it is read in.
domain: "ende"the F of the domain «ende»
domain: nonethe current domain, then the default one

Lines to copy

Minimal call

#get((value: 0, unit: "m", symbol: "Delta h", label: "Korrektur Wert", description: "Höhenzuschlag auf die Höhe ü. NN nach SIA 261, Anhang D."), "value")

Complete call

#get((value: 0, unit: "m", symbol: "Delta h", label: "Korrektur Wert", description: "Höhenzuschlag auf die Höhe ü. NN nach SIA 261, Anhang D."), "value", domain: none)

Examples

Example 1
#get((value: 1.394, unit: "kN/m²", symbol: "s_k"), "value")
The page get produces, level 2
Example 2
#var("q_k", domain: ("live-load", "A1"), level: 0)
#context fmt-number(get("q_k", "value") * 0.7, get("q_k", "unit"))
The page get produces, level 2
Example 3
#var("eta", 0.75, level: 0)
#context if get("eta", "value") <= 1 [Die Bemessung ist ausreichend.] else [Die Bemessung genügt nicht.]
The page get produces, level 2

Defined in lib/calc-engine-core.typ:498