# Use of Salome notebook variables in analytical curve construction

### Use of Salome notebook variables in analytical curve construction

Posted by pierre_j at August 21. 2012Hi,

It doesn't seem possible to use Salome notebook variables in analytical curve construction.

For instance,

- defining variable "Length" in the notebook = 0.05mm

- constructing a curve by selecting 'Interpolation", and entering in Y(t): t*Length

Salome tells me:

"Can't evaluate the expressions, please check them".

When replacing Length by 0.05, it works.

Is it a known limitation (it is not indicated in the end of the Salome notebook help page)?

Bests,

Pierre

### Re: Use of Salome notebook variables in analytical curve construction

Posted by SMESH expert at August 21. 2012Hello Pierre

Yes, it's a limitation. One can enter notebook variables only in spin boxes GUI controls.

Edward

### Re: Use of Salome notebook variables in analytical curve construction

Posted by pierre_j at August 21. 2012### Re: Use of Salome notebook variables in analytical curve construction

Posted by Philip at November 04. 2014Hi,

is it possible to define such an analytical curve by variables in a python script?

When I do the following, nothing happens, not even an error message occurs.

L0=2

Curve_0 = geompy.MakeCurveParametric("t", "L0*t**2", "0", 0, 1, 10, GEOM.Interpolation, True, 'Curve_0')

Philip

### Re: Use of Salome notebook variables in analytical curve construction

Posted by Saint Michael at November 04. 2014### Re: Use of Salome notebook variables in analytical curve construction

Posted by Philip at November 04. 2014Thank you St. Michael,

you really keep this forum going

Another example for completeness: When several variables are used

"L0 + L1 * t**2" -> "%s + %s * t**2" % (L0, L1)

Philip

PS Is there a wiki or documentation for this kind of information?