Addressing Evaluation Parameters in CadnaA-Lua
cna.eval_parameteris used to address evaluation parameters in CadnaA (e.g. Ld, Le, etc.). It includes support for an iteratorall(), an accessor functioncurrentto change the current evaluation parameter. The iterator for the evaluation parameter returns 4 values: number, name, unit and type. This information can be also omitted.cna.eval_parameter.all()iterates over all evaluation parameters (returning four variables: ordinal number, identifier, unit, type)cna.eval_parameter.currentexposes read and write access to the current evaluation parameter
This Lua script loops over all active evaluation parameters and prints their properties:
local i, name, unit, typ
for i, name, unit, typ in cna.eval_parameter.all() do
cna.print(i .. "," .. name .."," .. unit .. "," .. typ)
end