I'd like to get the names of any layer that has at least 1 selected feature. A function is building a bunch of selections, after which I want to find the names of those layers that have selections within to do more stuff.
I've tried:
for layer in layers:
if len(layer.getSelectionSet()) > 0:
print layer.name
which returns all the layers, even those with no selection.
I've also tried something very similar to:
for layer in layers:
if layer.getFIDSet != '':
print layer.name
which gives me an error message.
I am a bit stumped. I'll be using the output from this to create layer-specific messages based on if / elif statements, if that context helps.
Thank you!