AnsweredAssumed Answered

Script to toggle layers

Question asked by jwa_ofc@bellsouth.net on Feb 13, 2018
Latest reply on Feb 14, 2018 by jwa_ofc@bellsouth.net

I'm trying to write my first script. I want to toggle layers and export pngs. I'm getting stuck on the first step. My code generates a syntax error on line 3:

 

import arcpy
mxd = arcpy.mapping.MapDocument("CURRENT")
for lyr in arcpy.mapping.ListLayers(mxd, "Median Gross Rent", "Layers")
lyr.visible = True

Outcomes