Python and Constant/Expression/Export Mode

i would like to use Python to choose one of the three modes, Constant Mode, Expression Mode or Export Mode.

for now i can only do it by “mouse” is they a way to change by Python command ?
Same way is they a way to set the export by python ? i found for constant and expression

op(“opname”).par.sx = constant
op(“opname”).par.sx.expr = expression

but not for Export .
Thanks

Hello.

You would use the mode member of the Par object.

derivative.ca/wiki088/index. … =Par_Class

mode Get or set the parameter’s evaluation mode. The mode is one of:
ParMode.CONSTANT, ParMode.EXPRESSION, or ParMode.EXPORT.

example: op(‘wave1’).par.period.mode = ParMode.EXPRESSION

Note: you can only set it to export mode when there is already an export present.

Cheers,
Rob.

2 Likes

thx rob