2

In a QGIS 3.2 model can we use system variables?

Basically I want the input filename to be used in the output filename.

So

inputName.shp -->run process-->inputName_processed.shp 

In arcGIS it's %inputName% and the value comes from Get Field Value - http://pro.arcgis.com/en/pro-app/tool-reference/modelbuilder-toolbox/get-field-value.htm

===update

based on the answer from Erik -how do i use layer_name in the final column 'calculated' in this? i want it be the input name with '_processed' at the end.

enter image description here

GeorgeC
  • 8,228
  • 7
  • 52
  • 136
  • 1
    For the field calculator layer_property(layername, source) gives you the source of the layer, and when running a batch process you may use the input layers name as a base for the auto-fill. Also, in the field calculator there are several other variables, e.g. layer_name. – Erik Jul 18 '18 at 11:19
  • @Erik thanks but please see further details on the issue above – GeorgeC Jul 19 '18 at 07:21
  • I've seen this question asked many different ways and never clearly answered. People seem to address something about the algorithm in the model, as Erik has. https://gis.stackexchange.com/questions/170480/qgis-modeler-use-input-filename-in-output-filename is the closest thing to a 'clear' answer, IMO – Pictory Mar 16 '22 at 14:42

0 Answers0