<html><head><meta http-equiv="content-type" content="text/html; charset=us-ascii"></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">In the Brazilian Army plugin, we have a tool to calculate the line length or the polygon area upon digitalization, like shown in the gif below:<div><br></div><div><img src="cid:E7643165-19B0-412F-91E1-5097617F8A71" alt="Screen Recording 2025-03-11 at 14.51.02.gif"></div><div><br></div><div>The code used in this tool is available at: <a href="https://github.com/dsgoficial/DsgTools/blob/master/DsgTools/gui/ProductionTools/MapTools/MeasureTool/measureTool.py">https://github.com/dsgoficial/DsgTools/blob/master/DsgTools/gui/ProductionTools/MapTools/MeasureTool/measureTool.py</a><br id="lineBreakAtBeginningOfMessage"><div><br><blockquote type="cite"><div>On 11 Mar 2025, at 13:37, qgis-developer-request@lists.osgeo.org wrote:</div><br class="Apple-interchange-newline"><div><div>Send QGIS-Developer mailing list submissions to<br><span class="Apple-tab-span" style="white-space:pre">    </span>qgis-developer@lists.osgeo.org<br><br>To subscribe or unsubscribe via the World Wide Web, visit<br><span class="Apple-tab-span" style="white-space:pre">       </span>https://lists.osgeo.org/mailman/listinfo/qgis-developer<br>or, via email, send a message with subject or body 'help' to<br><span class="Apple-tab-span" style="white-space:pre">     </span>qgis-developer-request@lists.osgeo.org<br><br>You can reach the person managing the list at<br><span class="Apple-tab-span" style="white-space:pre">   </span>qgis-developer-owner@lists.osgeo.org<br><br>When replying, please edit your Subject line so it is more specific<br>than "Re: Contents of QGIS-Developer digest..."<br><br><br>Today's Topics:<br><br>   1. Re: Calculate area/perimtere/length of polygon/line while<br>      editing (Sylvain Th?ry)<br>   2. Re: Calculate area/perimtere/length of polygon/line while<br>      editing (Catania, Luke A ERDC-RDE-GRL-VA CIV)<br><br><br>----------------------------------------------------------------------<br><br>Message: 1<br>Date: Tue, 11 Mar 2025 17:05:15 +0100<br>From: Sylvain Th?ry <sylvain.thery@cnrs.fr><br>To: "Catania, Luke A ERDC-RDE-GRL-VA CIV"<br><span class="Apple-tab-span" style="white-space:pre">        </span><Luke.A.Catania@erdc.dren.mil>, DelazJ <delazj@gmail.com><br>Cc: "qgis-developer@lists.osgeo.org" <qgis-developer@lists.osgeo.org><br>Subject: Re: [QGIS-Developer] Calculate area/perimtere/length of<br><span class="Apple-tab-span" style="white-space:pre">    </span>polygon/line while editing<br>Message-ID: <a9f6f86d-4d22-4a2f-97c6-fa7e89e4b03b@cnrs.fr><br>Content-Type: text/plain; charset="utf-8"; Format="flowed"<br><br>Hello,<br><br>It seems there is a fix here : <br>https://github.com/agiudiceandrea/calcarea2/blob/a6a3d7c5a98e64573731cd6a005da4e2d9836fdd/calcareaevent.py<br><br>All the best,<br>S.<br><br><br>Le 11/03/2025 ? 16:14, Catania, Luke A ERDC-RDE-GRL-VA CIV via <br>QGIS-Developer a ?crit?:<br><blockquote type="cite"><br>Thanks. Plugin installed but will not run.? I get the error below. I <br>have QGIS 3.34.4.<br><br>*TypeError: QgisInterface missing 'mActionDigitizeWithCurve' action *<br><br>Traceback (most recent call last):<br>? File "C:\PROGRA~1/QGIS33~1.4/apps/qgis-ltr/./python\qgis\utils.py", <br>line 423, in _startPlugin<br>? ? plugins[packageName] = package.classFactory(iface)<br>? File <br>"C:\Users/RDTECLAC/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\calcarea2\__init__.py", <br>line 29, in classFactory<br>? ? return CalcAreaPlugin( iface )<br>? File <br>"C:\Users/RDTECLAC/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\calcarea2\plugin.py", <br>line 66, in __init__<br>? ? self.toolEvent = CalcAreaEvent( self.iface )<br>? File <br>"C:\Users/RDTECLAC/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\calcarea2\calcareaevent.py", <br>line 478, in __init__<br>? ? self.addFeatureEvent = AddFeatureEvent( iface )<br>? File <br>"C:\Users/RDTECLAC/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\calcarea2\calcareaevent.py", <br>line 213, in __init__<br>? ? self.geomPolygon = self.GeomPolygon( iface )<br>? File <br>"C:\Users/RDTECLAC/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\calcarea2\calcareaevent.py", <br>line 316, in __init__<br>? ? self.actionDigitizeWithCurve = getActionDigitizeWithCurve( iface )<br>? File <br>"C:\Users/RDTECLAC/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\calcarea2\calcareaevent.py", <br>line 308, in getActionDigitizeWithCurve<br>? ? raise TypeError(f"QgisInterface missing '{name}' action")<br>TypeError: QgisInterface missing 'mActionDigitizeWithCurve' action<br><br>*From:*DelazJ <delazj@gmail.com><br>*Sent:* Tuesday, March 11, 2025 11:08 AM<br>*To:* Catania, Luke A ERDC-RDE-GRL-VA CIV <Luke.A.Catania@erdc.dren.mil><br>*Cc:* qgis-developer@lists.osgeo.org<br>*Subject:* Re: [QGIS-Developer] Calculate area/perimtere/length of <br>polygon/line while editing<br><br>Hi,<br><br>There is a CalcArea2 plugin whose description mentions it should be <br>doing that for polygons. You might want to take ispiration from their <br>code.<br><br>Regards,<br><br>Harrissou<br><br>Le?mar. 11 mars 2025 ??15:55, Catania, Luke A ERDC-RDE-GRL-VA CIV via <br>QGIS-Developer <qgis-developer@lists.osgeo.org> a ?crit?:<br><br>    I need to calculate these values on the fly while I am in an edit<br>    session resizing a polygon or a line.? I need the user to see this<br>    calculation while they are editing not after the edits are<br>    committed. I already have the UI set up to capture after commit,<br>    but I need to capture while they are moving vertices and update<br>    the values in the UI, so they don?t keep editing and then<br>    committing just to see if they are close.? I want them to know<br>    before they commit.<br><br>    Any idea how to achieve this?<br><br>    Luke Catania<br><br>    US Army ERDC-GRL<br><br>    JCMS Site Planning Developer<br><br>    _______________________________________________<br>    QGIS-Developer mailing list<br>    QGIS-Developer@lists.osgeo.org<br>    List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer<br>    <Blockedhttps://lists.osgeo.org/mailman/listinfo/qgis-developerBlocked><br>    Unsubscribe:<br>    https://lists.osgeo.org/mailman/listinfo/qgis-developer<br>    <Blockedhttps://lists.osgeo.org/mailman/listinfo/qgis-developerBlocked><br><br><br>_______________________________________________<br>QGIS-Developer mailing list<br>QGIS-Developer@lists.osgeo.org<br>List info:https://lists.osgeo.org/mailman/listinfo/qgis-developer<br>Unsubscribe:https://lists.osgeo.org/mailman/listinfo/qgis-developer<br></blockquote><br>-- <br>Sylvain TH?RY - Ing?nieur d'?tudes CNRS en g?omatique<br>UMR 5281 ART-Dev - Acteurs, Ressources et Territoires dans le D?veloppementhttps://art-dev.cnrs.fr/<br>sylvain.thery@cnrs.fr  - +33.4.11.75.70.98<br>Universit? Paul-Val?ry Montpellier 3 - Site St Charles - Bureau 239<br>@ postale : ART-Dev - St Charles - Route de Mende - 34 199 Montpellier Cedex 5<br>https://www.researchgate.net/profile/Sylvain-Thery<br><br>-------------- next part --------------<br>An HTML attachment was scrubbed...<br>URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20250311/5ac92921/attachment-0001.htm><br>-------------- next part --------------<br>A non-text attachment was scrubbed...<br>Name: smime.p7s<br>Type: application/pkcs7-signature<br>Size: 4795 bytes<br>Desc: Signature cryptographique S/MIME<br>URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20250311/5ac92921/attachment-0001.bin><br><br>------------------------------<br><br>Message: 2<br>Date: Tue, 11 Mar 2025 16:37:45 +0000<br>From: "Catania, Luke A ERDC-RDE-GRL-VA CIV"<br><span class="Apple-tab-span" style="white-space:pre"> </span><Luke.A.Catania@erdc.dren.mil><br>To: Sylvain Th?ry <sylvain.thery@cnrs.fr>, DelazJ <delazj@gmail.com><br>Cc: "qgis-developer@lists.osgeo.org" <qgis-developer@lists.osgeo.org><br>Subject: Re: [QGIS-Developer] Calculate area/perimtere/length of<br><span class="Apple-tab-span" style="white-space:pre">   </span>polygon/line while editing<br>Message-ID: <29d216cf35a34103ac67038c14846614@erdc.dren.mil><br>Content-Type: text/plain; charset="utf-8"<br><br>Thanks.  That works.   But looks like it only works when initially drawing the polygon as opposed to also working when editing an existing polygon.  I have a similar tool to this that shows the area when drawing, just trying to figure out how to get it to work when editing an existing polygon.  I was hoping to build on my own tool if there was an easy what to get a hold of some other signal that gets fired while editing.<br><br><br><br>From: Sylvain Th?ry <sylvain.thery@cnrs.fr> <br>Sent: Tuesday, March 11, 2025 12:05 PM<br>To: Catania, Luke A ERDC-RDE-GRL-VA CIV <Luke.A.Catania@erdc.dren.mil>; DelazJ <delazj@gmail.com><br>Cc: qgis-developer@lists.osgeo.org<br>Subject: Re: [QGIS-Developer] Calculate area/perimtere/length of polygon/line while editing<br><br><br><br>Hello, <br><br>It seems there is a fix here : https://github.com/agiudiceandrea/calcarea2/blob/a6a3d7c5a98e64573731cd6a005da4e2d9836fdd/calcareaevent.py <Blockedhttps://github.com/agiudiceandrea/calcarea2/blob/a6a3d7c5a98e64573731cd6a005da4e2d9836fdd/calcareaevent.pyBlocked> <br><br>All the best, <br>S.<br><br><br><br>Le 11/03/2025 ? 16:14, Catania, Luke A ERDC-RDE-GRL-VA CIV via QGIS-Developer a ?crit :<br><br>Thanks. Plugin installed but will not run.  I get the error below.  I have QGIS 3.34.4.<br><br><br><br>TypeError: QgisInterface missing 'mActionDigitizeWithCurve' action <br><br>Traceback (most recent call last):<br>  File "C:\PROGRA~1/QGIS33~1.4/apps/qgis-ltr/./python\qgis\utils.py", line 423, in _startPlugin<br>    plugins[packageName] = package.classFactory(iface)<br>  File "C:\Users/RDTECLAC/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\calcarea2\__init__.py", line 29, in classFactory<br>    return CalcAreaPlugin( iface )<br>  File "C:\Users/RDTECLAC/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\calcarea2\plugin.py", line 66, in __init__<br>    self.toolEvent = CalcAreaEvent( self.iface )<br>  File "C:\Users/RDTECLAC/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\calcarea2\calcareaevent.py", line 478, in __init__<br>    self.addFeatureEvent = AddFeatureEvent( iface )<br>  File "C:\Users/RDTECLAC/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\calcarea2\calcareaevent.py", line 213, in __init__<br>    self.geomPolygon = self.GeomPolygon( iface )<br>  File "C:\Users/RDTECLAC/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\calcarea2\calcareaevent.py", line 316, in __init__<br>    self.actionDigitizeWithCurve = getActionDigitizeWithCurve( iface )<br>  File "C:\Users/RDTECLAC/AppData/Roaming/QGIS/QGIS3\profiles\default/python/plugins\calcarea2\calcareaevent.py", line 308, in getActionDigitizeWithCurve<br>    raise TypeError(f"QgisInterface missing '{name}' action")<br>TypeError: QgisInterface missing 'mActionDigitizeWithCurve' action<br><br><br><br>From: DelazJ  <mailto:delazj@gmail.com> <delazj@gmail.com> <br>Sent: Tuesday, March 11, 2025 11:08 AM<br>To: Catania, Luke A ERDC-RDE-GRL-VA CIV  <mailto:Luke.A.Catania@erdc.dren.mil> <Luke.A.Catania@erdc.dren.mil><br>Cc: qgis-developer@lists.osgeo.org <mailto:qgis-developer@lists.osgeo.org> <br>Subject: Re: [QGIS-Developer] Calculate area/perimtere/length of polygon/line while editing<br><br><br><br>Hi,<br><br>There is a CalcArea2 plugin whose description mentions it should be doing that for polygons. You might want to take ispiration from their code.<br><br><br><br>Regards,<br><br>Harrissou<br><br><br><br>Le mar. 11 mars 2025 ? 15:55, Catania, Luke A ERDC-RDE-GRL-VA CIV via QGIS-Developer <qgis-developer@lists.osgeo.org <mailto:qgis-developer@lists.osgeo.org> > a ?crit :<br><br>I need to calculate these values on the fly while I am in an edit session resizing a polygon or a line.  I need the user to see this calculation while they are editing not after the edits are committed. I already have the UI set up to capture after commit, but I need to capture while they are moving vertices and update the values in the UI, so they don?t keep editing and then committing just to see if they are close.  I want them to know before they commit.<br><br><br><br>Any idea how to achieve this?<br><br><br><br>Luke Catania<br><br>US Army ERDC-GRL<br><br>JCMS Site Planning Developer<br><br><br><br>_______________________________________________<br>QGIS-Developer mailing list<br>QGIS-Developer@lists.osgeo.org <mailto:QGIS-Developer@lists.osgeo.org> <br>List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer <Blockedhttps://lists.osgeo.org/mailman/listinfo/qgis-developerBlocked> <br>Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer <Blockedhttps://lists.osgeo.org/mailman/listinfo/qgis-developerBlocked> <br><br><br><br><br><br>_______________________________________________<br>QGIS-Developer mailing list<br>QGIS-Developer@lists.osgeo.org <mailto:QGIS-Developer@lists.osgeo.org> <br>List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer <Blockedhttps://lists.osgeo.org/mailman/listinfo/qgis-developerBlocked> <br>Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer <Blockedhttps://lists.osgeo.org/mailman/listinfo/qgis-developerBlocked> <br><br>-- <br>Sylvain TH?RY - Ing?nieur d'?tudes CNRS en g?omatique<br>UMR 5281 ART-Dev - Acteurs, Ressources et Territoires dans le D?veloppement https://art-dev.cnrs.fr/ <Blockedhttps://art-dev.cnrs.fr/Blocked> <br>sylvain.thery@cnrs.fr <mailto:sylvain.thery@cnrs.fr>   - +33.4.11.75.70.98<br>Universit? Paul-Val?ry Montpellier 3 - Site St Charles - Bureau 239<br>@ postale : ART-Dev - St Charles - Route de Mende - 34 199 Montpellier Cedex 5 <br>https://www.researchgate.net/profile/Sylvain-Thery <Blockedhttps://www.researchgate.net/profile/Sylvain-TheryBlocked> <br>-------------- next part --------------<br>An HTML attachment was scrubbed...<br>URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20250311/5e33bb04/attachment.htm><br>-------------- next part --------------<br>A non-text attachment was scrubbed...<br>Name: smime.p7s<br>Type: application/pkcs7-signature<br>Size: 8254 bytes<br>Desc: not available<br>URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20250311/5e33bb04/attachment.bin><br><br>------------------------------<br><br>Subject: Digest Footer<br><br>_______________________________________________<br>QGIS-Developer mailing list<br>QGIS-Developer@lists.osgeo.org<br>List info: https://lists.osgeo.org/mailman/listinfo/qgis-developer<br>Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-developer<br><br><br>------------------------------<br><br>End of QGIS-Developer Digest, Vol 233, Issue 7<br>**********************************************<br></div></div></blockquote></div><br></div></body></html>