<div dir="ltr"><div>Oh well, found it just a minute after sending this mail, sorry to bother you.</div><div>Answer:</div><div><br></div><div><pre class="gmail-lang-py gmail-prettyprint gmail-prettyprinted"><code><span class="gmail-pln">iface</span><span class="gmail-pun">.</span><span class="gmail-pln">actionAddFeature</span><span class="gmail-pun">().</span><span class="gmail-pln">trigger</span><span class="gmail-pun">()</span></code></pre></div><div><br></div><div class="gmail_extra">
<br><div class="gmail_quote">On 21 June 2018 at 12:49, Adam Borczyk <span dir="ltr"><<a href="mailto:adam.borczyk@gis-support.pl" target="_blank">adam.borczyk@gis-support.pl</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi all,</div><div><br></div><div>I'm looking for a way to enable "Add polygon" tool from the editing toolbar using PyQGIS (v3) - so the 4th icon from the left. This way when I press a button in my plugin, I'd have a cursor ready to draw features, instead of having to manually click the icon. I tried setting the map tool to QgsMapToolAdvancedDigitizing, but it's not the way. <br></div><div><br></div><div><div><img src="cid:ii_jiof474h0_16421f0b40b0b9b4" width="488" height="60"><br></div><br></div><div>Is there a way to do it?</div><div><br></div><div>Best regards</div><span class="HOEnZb"><font color="#888888"><div>Adam Borczyk</div>
</font></span></div>
</blockquote></div><br></div></div>