for lyr in lyrList: return lyr.visible
import arcpy def IsLayerReallyVisible(mxd, layer): lyrNameList = layer.longName.split("\\") for lyrName in lyrNameList: lyr = arcpy.mapping.ListLayers(mxd, lyrName)[0] if not lyr.visible: return False return True mxd = arcpy.mapping.MapDocument("current") lyr = arcpy.mapping.ListLayers(mxd, "US_States")[0] print IsLayerReallyVisible(mxd, lyr)
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.