Quantcast
Channel: Forums - Python
Viewing all articles
Browse latest Browse all 2485

Check whether a group layer is empty or not

$
0
0
Hello,

I have an mxd file with around 100 layers and group layers. I'm trying to loop through all group layers and find out if they're empty or not (contains Feature class(es) or not). If a group layer is empty, I want to remove that group layer from the map.

I found the script to remove the group layer, but I couldn't figure out how to check if the group layer is empty or not

Anyone can help?
Thank you

Viewing all articles
Browse latest Browse all 2485

Trending Articles