[Qgis-user] layer variable not working in modeler

Kurt Menke kurt at birdseyeviewgis.com
Sat Feb 27 18:39:40 PST 2016


Thanks Nyall! Variables are so useful & being able to use them on models will be great!
Kurt

Kurt Menke, GISP
Bird's Eye View
www.BirdsEyeViewGIS.com
Cell: 505.362.1776
Office: 505.265.0243
Sent from my iPad

> On Feb 27, 2016, at 7:07 PM, Nyall Dawson <nyall.dawson at gmail.com> wrote:
> 
>> On 28 February 2016 at 05:54, Kurt Menke <kurt at birdseyeviewgis.com> wrote:
>> Hello everyone,
>> 
>> I am trying to develop a model in QGIS 2.13.0-Master, that will add an
>> attribute column populated with the layer name. I can do this in the
>> standard Field Calculator using the @layer_name Layer variable.
>> 
>> 
>> 
>> However, when I try repeating this in a model using the Field calculator
>> algorithm, it produces NULL output. I’m guessing this is syntax issue,
>> rather than a scoping issue, because creating a project level variable still
>> produces NULL output.
>> 
>> 
>> 
>> I have been putting the variable in the Formula line of the Field calculator
>> tool. For example: @layer_name
>> 
>> 
>> 
>> Should variables work in the Processing modeler? If so am I just using
>> incorrect syntax?
> 
> Damn... sorry... I didn't even realise there was a field calculator in
> processing. This is fixed in master now, I'll get it backported for
> 2.14.1
> 
> Nyall
> 
> 
>> 
>> Thanks!
>> 
>> 
>> 
>> Kurt
>> 
>> 
>> 
>> **************************
>> 
>> Kurt Menke, GISP
>> 
>> Bird’s Eye View
>> 
>> www.BirdsEyeViewGIS.com
>> 
>> Work: 505-265-0243
>> 
>> Cell: 505-362-1776
>> 
>> 
>> 
>> 
>> _______________________________________________
>> Qgis-user mailing list
>> Qgis-user at lists.osgeo.org
>> List info: http://lists.osgeo.org/mailman/listinfo/qgis-user
>> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-user



More information about the Qgis-user mailing list