<html><body><div style="font-family: times new roman, new york, times, serif; font-size: 12pt; color: #000000"><div>Thanks Nyali.<br></div><div>The reason is that if I use processing it doens't work correctly.<br></div><div>In details, if I write:<br></div><div><br></div><div><span style="font-family: "courier new",courier,monaco,monospace,sans-serif; font-size: small;">import processing</span><br><span style="font-family: "courier new",courier,monaco,monospace,sans-serif; font-size: small;">processing.runalg("qgis:multiparttosingleparts", input1, output1)</span></div><div><br></div><div>The plugin runs correctly only the FIRST time.<br></div><div>Then, when it finishes, if I run again the plugin choosing an input2 vectorlayer, the processing algorithm doesn't see the input2 and my ouput remains output1.<br></div><div>It's crazy!<br></div><div>It's something like a bad refresh..<br></div><div><br></div><div>If you have another solution....<br></div><div><br></div><div>Thank you very much.<br></div><div><br></div><div>Stefano<br></div><div><br></div><div><br></div><hr id="zwchr"><div style="color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><b>Da: </b>"Nyall Dawson" <nyall.dawson@gmail.com><br><b>A: </b>"Stefano Masera" <stefano.masera@arpa.piemonte.it><br><b>Cc: </b>"qgis-developer" <qgis-developer@lists.osgeo.org><br><b>Inviato: </b>Martedì, 13 giugno 2017 10:20:31<br><b>Oggetto: </b>Re: [QGIS-Developer] multipartToSingleParts via code<br><div><br></div>On 13 June 2017 at 17:49, Stefano Masera<br><stefano.masera@arpa.piemonte.it> wrote:<br>> Hi Nyali,<br>> in a few words I want to do a multipartToSingleParts (for a VectorLayer) via<br>> code without using the processing module.<br><div><br></div>Any particular reason why?<br><div><br></div>In any case, I'd suggest copying the code used by processing:<br>https://github.com/qgis/QGIS/blob/release-2_18/python/plugins/processing/algs/qgis/MultipartToSingleparts.py#L66<br><div><br></div>Nyall<br><div><br></div>--<br>Questo messaggio e' stato analizzato ed e' risultato non infetto.<br>This message was scanned and is believed to be clean.<br><div><br></div></div><div><br></div></div></body></html>