6

I've stumbled upon a great plug-in called "Remove empty layers", developed by @Germán Carrillo.

I'm wondering if it's possible to use this plug-in in the Python Console.

1
  • Does this tool remove the empty Layers just from the project or also from disk?
    – fsg
    Commented Jan 25, 2023 at 12:13

1 Answer 1

12

Yes. It is possible using the following lines.

from RemoveEmptyLayers.removeemptylayers import RemoveEmptyLayers
remove = RemoveEmptyLayers(iface)
remove.run()

Please also check this answer to understand what all removeemptylayers phrases mean.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.