If the result of a parameter should be fixed, it can be written to the parameter as a literal formula. The LiteralFormulaBuilder class performs this for all base types (Integer, Double, Boolean, String, Pair, Map, OrderedMap, BidiMap, List, Bag, Set) and for mechatronic components and classes as well.
The least are created as pattern of the following forms:
if existsRef('p.b.c.d'') then ref('a.b.c.d') else default endif
and
if existsType('b.c.d.e') then type('b.c.d.e') else default endif
import com.mind8.mechatronic.skill.api.LiteralFormulaBuilder;
// mo is any mechatronic component
parameter = mo.getParameter("Param1");
formulaResult = parameter.getCalculatedValue();
parameter.setPrettyValue(LiteralFormulaBuilder.buildLiteralFormula(formulaResult));