[Qgis-user] putting a script that doesn't involve GUI in scripts toolbox

Havard Tveite havard.tveite at nmbu.no
Tue Aug 28 01:12:32 PDT 2018


Hi Reginald,

Python (Processing) scripts in QGIS 3 are much more complicated
than in QGIS 2.  I recently learned that you will get an example
script by choosing "Create new script from template..." under
the "Scripts" icon that is located at the top of the Processing
Toolbox.
Use that script as a starting point.

Håvard

On 28. aug. 2018 09:49, Reginald wrote:
> Hello,
> 
> In QGIS 2.18 I made a script that created a feature from the selected
> Cadastral Parcels. That way I didn't have to draw them manualy.
> I want to use this script in QGIS 3 and put it in the Toolbox Processing.
> I did some changes to the script like replacing MapLayerRegistry with
> QgsProject and such, but at a point when I wanted to test my script I only
> get a notice saying "There seems to be no valid script in the file".
> I looked at the Python Errors and Warnings dialog but could not find any
> log.
> How can I put this script in the toolbox? I know there is a template for a
> script available but I want to use a script that doesn't open a window: just
> click on the script so it executes.
> Is this still posible in QGIS 3?
> 
> Regards,
> 
> 
> 
> 
> --
> Sent from: http://osgeo-org.1560.x6.nabble.com/QGIS-User-f4125267.html
> _______________________________________________
> Qgis-user mailing list
> Qgis-user at lists.osgeo.org
> List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
> Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user
> 

-- 
Håvard Tveite
Faculty of Science and Technology, NMBU
Drøbakveien 31, POBox 5003, N-1432 Ås, NORWAY
Phone: +47 67231548   Web: http://www.nmbu.no



More information about the Qgis-user mailing list