Note: the Refresh functions are only needed when referencing a map document using the "CURRENT" keyword. Not all functions automatically refresh the current ArcMap application.1 of 1 people found this helpful
When referencing a map document via a system path, the refresh functions are not required.
Hi Jeff Barrette I ran this script from IDLE but it did not affect the visibility status of any layers:
print "This script turns off the following layers:"
mxd = arcpy.mapping.MapDocument(r"S:\EF1784\EF1784_Common\GIS\CODE SNIPPETS\remove bing\EF1784_050_000_GIS_0101.mxd")
for lyr in arcpy.mapping.ListLayers(mxd):
lyr.visible = False
When I run the script in this thread from the Python window in ArcMap there are no issues. What am I doing wrong?