Hi Scott, The new possibility in 2.18 is cool but if you have older QGIS version you can use SIGNAL/SLOTS
<your Layer>.featuresAdded().connect(defaultAttributes) def defaultAttributes(fid): feature = [feat for feat in <your Layer>.getFeatures() if feat.id() == fid][0] <your Layer>.changeAttributeValue(fid, <index of the attribute>, feature.geometry().length()) <your Layer>.featuresAdded().disconnect() It is a little bit messy :). Marian -----Original Message----- From: Qgis-user [mailto:[email protected]] On Behalf Of Matthias Kuhn Sent: November-09-17 9:47 AM To: [email protected] Subject: Re: [Qgis-user] vector digitizing question Hi Scott, a tiny bit of configuration and it will be done for you: https://gis.stackexchange.com/a/211154/9839 Regards Matthias On 11/09/2017 03:43 PM, Madry, Scott wrote: > Hello all. I have a vector polygon shape file that was originally > created in ArcGIS. I have recently added three polygons to the file > using QGIS, but the results (attached) show that the area and > perimeter values for these are not computed. How can I, in QGIS, > generate these area and perimeter fields to be added? I know I can > manually do the areas using the ‘Measure’ tool, but would prefer an automated > process. > Does Arc just create these automatically? Can QGIS? > > Thanks so much, > > Scott > > Scott Madry, Ph.D. > Research Associate Professor of Archaeology The University of North > Carolina at Chapel Hill > > Tel 1-919-448-4493 > Email: [email protected] <mailto:[email protected]> > https://scottmadry.web.unc.edu > Skype: scott.madry > > > > > _______________________________________________ > Qgis-user mailing list > [email protected] > List info: https://lists.osgeo.org/mailman/listinfo/qgis-user > Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user > _______________________________________________ Qgis-user mailing list [email protected] List info: https://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user ________________________________ This electronic message, as well as any transmitted files included in the electronic message, may contain privileged or confidential information and is intended solely for the use of the individual(s) or entity to which it is addressed. If you have received this electronic message in error please notify the sender immediately and delete the electronic message. Any unauthorized copying, disclosure or distribution of the electronic message is strictly forbidden. NAV CANADA accepts no liability for any damage caused by any virus and/or other malicious code transmitted by this electronic communication. Le présent message électronique et tout fichier qui peut y être joint peuvent contenir des renseignements privilégiés ou confidentiels destinés à l’usage exclusif des personnes ou des organismes à qui ils s’adressent. Si vous avez reçu ce message électronique par erreur, veuillez en informer l’expéditeur immédiatement et supprimez le. Toute reproduction, divulgation ou distribution du présent message électronique est strictement interdite. NAV CANADA n’assume aucune responsabilité en cas de dommage causé par tout virus ou autre programme malveillant transmis par ce message électronique. _______________________________________________ Qgis-user mailing list [email protected] List info: https://lists.osgeo.org/mailman/listinfo/qgis-user Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
