<div dir="ltr"><div dir="ltr">Hi Matteo, <div><br></div><div>I've been successfully using <i>execAlgorithmDialog()</i> instead [0]:</div><div><br></div><div><i>processing.execAlgorithmDialog("my_provider:my_algorithm", params)</i><br></div><div><br></div><div>where, <i>params</i> is a dict with the pre-filled values you have. You can see an example at [1].</div><div><br></div><div>Regards,</div><div><br></div><div>Germán</div><div>-----------</div><div>[0] <a href="https://github.com/qgis/QGIS/blob/2d1aa68f0d044f2aced7ebeca8d2fa6b754ac970/python/plugins/processing/tools/general.py#L185">https://github.com/qgis/QGIS/blob/2d1aa68f0d044f2aced7ebeca8d2fa6b754ac970/python/plugins/processing/tools/general.py#L185</a></div><div>[1] <a href="https://github.com/SwissTierrasColombia/LADM-COL-Add-on-Ambiente/blob/master/ladm_col_environment_add_on.py#L140">https://github.com/SwissTierrasColombia/LADM-COL-Add-on-Ambiente/blob/master/ladm_col_environment_add_on.py#L140</a></div></div><div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">El lun, 1 ago 2022 a las 15:23, matteo via QGIS-Developer (<<a href="mailto:qgis-developer@lists.osgeo.org">qgis-developer@lists.osgeo.org</a>>) escribió:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi all,<br>
<br>
I've a set of custom processing scripts within a plugin (that is both <br>
"normal" and processing provider plugin).<br>
<br>
I'm trying to executing the dialog of these algorithm from one of the <br>
main plugin file. I found the processing.createAlgorithmDialog [0], but <br>
it is constantly crashing when I'm passing the instance of the algorithm:<br>
<br>
my_alg = MyCustomAlg()<br>
my_dialog = my_alg.createAlgorithmDialog(custom_dict)<br>
<br>
## crash here<br>
<br>
Thinking it was a problem of the threads I also tried to overwrite the <br>
`flag` method in the algorithm by setting also <br>
QgsProcessingAlgorithm.FlagNoThreading but with the same results.<br>
<br>
I know I can run the processing algorithm with processing.run(....) but <br>
I need to open the dialog pre-filled with custom parameters and to get <br>
also some other outputs besides the standard ones (like the <br>
QgsFeatureSink path)<br>
<br>
Thanks for any suggestion<br>
<br>
Cheers<br>
<br>
Matteo<br>
<br>
<br>
[0] <br>
<a href="https://github.com/qgis/QGIS/blob/master/python/plugins/processing/tools/general.py#L155" rel="noreferrer" target="_blank">https://github.com/qgis/QGIS/blob/master/python/plugins/processing/tools/general.py#L155</a><br>
<br>
_______________________________________________<br>
QGIS-Developer mailing list<br>
<a href="mailto:QGIS-Developer@lists.osgeo.org" target="_blank">QGIS-Developer@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>-----------<br></div><div> |\__ <br>(:>__)(<br> |/ <br>Soluciones Geoinformáticas Libres <br><a href="http://geotux.tuxfamily.org/" target="_blank">http://geotux.tuxfamily.org/</a><br><a href="http://twitter.com/GeoTux2" target="_blank">https://twitter.com/GeoTux2</a></div><div><br></div><div><div><a href="http://gis.stackexchange.com/users/4972/germ%c3%a1n-carrillo" target="_blank"><img src="http://gis.stackexchange.com/users/flair/4972.png"></a></div></div></div></div></div></div></div></div>