Commands › Reading the project's data
#domain-file Reading the project's data
Gives the path of the file Woodcore wrote for a calculation domain, to include it without ever writing it by hand.
#domain-file(, )Hover an argument: what it does. Hover its value: every possible value. A click keeps the bubble open.
kindrequiredWhat wrote the file: a member check, or a document's journal.
idrequiredThe check's id, or the journal's document.
The essentials
Data, not a displayIt returns a value: print it, compare it or loop over it.
Included, not copied
#include domain-file("check", id) prints the file as Woodcore wrote it.An unknown id stopsThe compile stops, naming the ids the export knows.
Arguments
| Argument | Status | What it does, and examples |
|---|---|---|
| The line's arguments | ||
| required | What wrote the file: a member check, or a document's journal. #raw(domain-file("check", "BI-01"))the path of a bending check#include domain-file("journal", "rs")the report's journal, printed | |
| required | The check's id, or the journal's document. "BI-01"a check"cu"the service criteria agreement's journal | |
Lines to copy
Minimal call
#domain-file("check", "ZT-01")Examples
#for id in load-domain-files().at("check", default: (:)).keys() [#id: #raw(domain-file("check", id)) \ ]#let ids-of(kind) = load-domain-files().at(kind, default: (:)).keys()
#ids-of("check").len()Defined in lib/calc-engine-core.typ:386