[Qgis-developer] Update Fields Selected Features.

Luís Miguel Royo Pérez luis.miguel.royo at gmail.com
Thu Jan 7 08:52:15 PST 2016

Hello everyone,

I'm trying to modify the values of some selected features. I have 
written this small script, but nothing happens when I run it. Is there 
something that I've missed? Here is my code.

/lyr = qgis.utils.iface.activeLayer()//
//features = lyr.selectedFeatures()//
//for f in features://
//    fid= f.id()//
//    lyr.changeAttributeValue(fid,12,"0")//
//    lyr.updateFeature(f)//
//    print "elemento alterado"//

Thanks per advance!!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20160107/7e3572dd/attachment.html>

More information about the Qgis-developer mailing list