[Qgis-user] How to count number of layers loaded in layer panel of QGIS

Jorge Gustavo Rocha jgr at geomaster.pt
Wed Mar 15 06:37:50 PDT 2023


Hi Paul,

Run this on the Python console:

len(QgsProject.instance().mapLayers())

Best regards,

Jorge Gustavo

On 15/03/23 07:42, Paul N via QGIS-User wrote:
> I want to count number of layer loaded. How to count number of layers 
> loaded in layer panel of QGIS.
>
> Regards.
>
> Paul N
>
> _______________________________________________
> 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

-- 
Jorge Gustavo Rocha
Geomaster, LDA
"Take the open source journey with us"

VAT/NIF: PT 510 906 109
Phone: +351 253 257 173 (landline)
Mobile: +351 910 333 888 (cellular)

Rua Afonso Palmeira, 31, 7 D
4715-278 Braga
PORTUGAL
GPS 41.54627, -8.40432



More information about the QGIS-User mailing list