<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Hello again,</p>
    <p>nevermind, figured it out.</p>
    <p>just casting the map tool to QgsMapToolCapture does the trick:</p>
    <pre><tt>from qgis.core import QgsPointXY
from qgis.gui import QgsMapTool, QgsMapToolCapture</tt><tt>
from qgis.PyQt import sip</tt><tt>

mapToolCapture = sip.cast(iface.mapCanvas().mapTool(), QgsMapToolCapture)
mapToolCapture.addVertex(QgsPointXY(1,2))
</tt></pre>
    <p><br>
    </p>
    <p>Cheers<br>
    </p>
    <p>Jonas</p>
    <div class="moz-cite-prefix">On 09.05.2019 12:55, Jonas wrote:<br>
    </div>
    <blockquote type="cite"
      cite="mid:%3Ce1df3177-2b1b-d036-8ed9-6de2c2a190cd@ag99.de%3E">Hi,
      <br>
      <br>
      is there a way to add vertices to the rubberband when the user
      currently digitizes a feature via the python API?
      <br>
      <br>
      For example when adding a line feature, the user has already
      created a few vertices of a line via the rubber band. now i want
      to add the next vertex of that rubber band via python. I do NOT
      want to end the users action to create the feature, or add
      vertices to already existing features.
      <br>
      <br>
      I think that would mean calling addVertex() on a
      QgsMapToolCapture-object. However i cannot find a way to retrieve
      a QgsMapToolCapture-object from the current mapTool.
      <br>
      <br>
      Is there a way to do this?
      <br>
      <br>
      Thanks
      <br>
      <br>
      Jonas
      <br>
      <br>
      <br>
      <br>
    </blockquote>
  </body>
</html>