[GIS] How to refer to a model variable in a Field Calculator or Pyculator formula

field-calculatorqgissextante

I am new to QGIS 2.0.1 Modeler (Sextante) and not very able in Python programming.

My question regard the use of field calculator (or advanced python field calculator) inside the modeler.
Is it possible to refer in the field calculator formula to an input variable of the sextante model?

Example for Buffer:
In the graphical modeler I define 2 model inputs:

  1. layer = the point layer to be buffered (type: vector layer)
  2. buff_dist = the buffer radius (type: number)

I use the "Fixed distance buffer" algorithm, setting "Imput Layer" = *layer* and "Distance" = *buff_dist*. It creates a temporary output shapefile.
I want to add a new numeric field in the output of the "buffer" algorithm, with value equal to the buffer distance previously defined (buff_dist).

How can I refer to the variable buff_dist in the Formula (or Global Expression) of the "Field Calculator" (or "Advanced Pyculator") algorithm??

Best Answer

I've added a feature request in Sextante's feature/bug tracker. Maybe someone there can come up with an alternative way of doing this:

http://hub.qgis.org/issues/8743