FlexPro
HistoryBase
Engineering
Training
Downloads
FlexPro Support
Knowledge
Community
About us
References
Jobs
General Contact
List Of Retailers
FlexPro Support
EN
DE
FR
Placeholder

FlexPro Documentation 2025

Python Functions und Constants

If you have set up the Python interface of FlexPro, you can use the various Python function libraries directly in your FPScript formulas.

To do this, use the python keyword in FPScript. The following example calls the sin() function in the math module with the constant pi from the Python numpy module as an argument:

python.math.sin(python.numpy.pi)

There are FPScript functions whose result can vary even with the same input data, e.g. the Noise() function. If such a function is used in an FPScript formula, it must be recalculated each time it is updated, even if the data it calculates has not changed since the last calculation. FlexPro automatically recognizes this for all FPScript functions, but not for Python functions. When calling a Python function, you must therefore specify whether the function is indeterministic with regard to its arguments or not. You do this by setting the Indeterministic option on the Result tab of the formula's Properties dialog box. An FPScript formula with this option set is recalculated each time it is updated.