<html dir="ltr">
<head>
<!-- Template generated by Exclaimer Mail Disclaimers on 05:20:26 Wednesday, 20 January 2016 -->
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">P.414e7b50-9f91-49ff-842d-fa8ec507eb62 {
        MARGIN: 0cm 0cm 0pt
}
LI.414e7b50-9f91-49ff-842d-fa8ec507eb62 {
        MARGIN: 0cm 0cm 0pt
}
DIV.414e7b50-9f91-49ff-842d-fa8ec507eb62 {
        MARGIN: 0cm 0cm 0pt
}
TABLE.414e7b50-9f91-49ff-842d-fa8ec507eb62Table {
        MARGIN: 0cm 0cm 0pt
}
DIV.Section1 {
        page: Section1
}
</style><style id="owaParaStyle" type="text/css">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body ocsi="0" fpstyle="1">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Hi,<br>
<br>
Is there a way to set the snapping settings for a layer via Python?  I would like to turn on snapping with a specified tolerance automatically when a user begins editing within a plugin.<br>
<br>
There is a question on gis.stackexchange, but it hasn't been answered.<br>
<br>
<a href="http://gis.stackexchange.com/questions/133816/how-to-enable-the-snapping-options-for-vector-layer-using-the-python-programming" target="_blank">http://gis.stackexchange.com/questions/133816/how-to-enable-the-snapping-options-for-vector-layer-using-the-python-programming</a><br>
<br>
QSettings stores some values, but these are the defaults:<br>
<br>
    qs = QSettings()<br>
    qs.value('Qgis/digitizing/default_snap_mode')<br>
    qs.value('Qgis/digitizing/default_snapping_tolerance')<br>
    qs.value('Qgis/digitizing/default_snapping_tolerance_units')<br>
<br>
I have also found the canvas.snappingUtils(), but cannot find functions there to enable snapping modes or set tolerances.<br>
<br>
Thanks,<br>
John<br>
</div>
<br>
<table class="414e7b50-9f91-49ff-842d-fa8ec507eb62Table" borderColor="black" cellspacing="0" cols="1" cellpadding="0" width="450" border="0">
<tbody>
<tr>
<td>
<p><span style="font-family:Arial; color: #009F94; font-weight: bold; ">John Stevenson</span><br>
<span style="font-family:Arial; font-size:x-small; ">Senior Developer</span> </p>
</td>
<td style="PADDING-BOTTOM: 5px; PADDING-TOP: 5px; PADDING-LEFT: 5px; PADDING-RIGHT: 5px">
<p class="414e7b50-9f91-49ff-842d-fa8ec507eb62"><a href="http://www.thinkwhere.com"><img id="IMG1" border="0" align="right" src="cid:image985e2b.PNG@7eaab0b3.4abdcafe"></a></p>
</td>
</tr>
<tr>
<td>
<p><font size="2" face="Arial"><font color="#009f94">t:</font> 01786 476060 (Office)<br>
<font color="#009f94">t:</font> 01786 476093 (Direct Dial)<br>
<font color="#009f94">w:</font><a href="http://www.thinkwhere.com">www.thinkwhere.com</a></font>
</p>
</td>
<td style="PADDING-BOTTOM: 5px; PADDING-TOP: 5px; PADDING-LEFT: 5px; PADDING-RIGHT: 5px">
<p align="right"><font size="2" face="Arial">Glendevon House<br>
Castle Business Park<br>
Stirling FK9 4TZ</font></p>
</td>
</tr>
<tr>
<td><a href="https://twitter.com/thinkWhere1"><img id="IMG1" border="0" align="left" src="cid:imageb46136.PNG@a13dc9e0.43bf4b39"></a>
<a href="http://www.linkedin.com/company/1509510?trk=companies_home_ycp_logo_forth-valley-gis">
<img id="IMG1" border="0" align="left" src="cid:image064812.PNG@9af40f23.4298b90c"></a>
</td>
<td style="PADDING-BOTTOM: 5px; PADDING-TOP: 5px; PADDING-LEFT: 5px; PADDING-RIGHT: 5px">
</td>
</tr>
</tbody>
</table>
<br>
<p align="justify"><font color="#7f7f7f" size="1" face="Verdana">This email and its attachments are private and confidential. If you believe you have received this email in error, please contact the sender immediately on 01786 476060. If you are not the intended
 recipient, you may not rely on, use or disclose this email or any attachments in any way.<br>
<br>
thinkWhere Limited does not accept any liability for any damage that may be caused to the recipient's system or data by this email or any attachments. Please note that our email system may be subject to random monitoring by us. This Company accepts no liability
 for personal emails.<br>
<br>
thinkWhere is a limited company registered in Scotland with Registered Number SC315349 and having its Registered Office at Glendevon House, Castle Business Park, Stirling, FK9 4TZ.
</p>
<br>
</font>
<p></p>
<p></p>
<p></p>
</body>
</html>