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)
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.