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.
vrequiredA var object, or the name of a variable the report declared.
fieldrequiredThe field read; an unknown one stops, naming the valid ones.
domainoptional · default noneFor a name, the domain it is read in.
domainoptional · default nonenoneFree text, for example:
domain: "ende"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
| Argument | Status | What 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
#get((value: 1.394, unit: "kN/m²", symbol: "s_k"), "value")#var("q_k", domain: ("live-load", "A1"), level: 0)
#context fmt-number(get("q_k", "value") * 0.7, get("q_k", "unit"))#var("eta", 0.75, level: 0)
#context if get("eta", "value") <= 1 [Die Bemessung ist ausreichend.] else [Die Bemessung genügt nicht.]Defined in lib/calc-engine-core.typ:498