tmackey-esriaustralia-com-au-esridist

Documentation fix

Discussion created by tmackey-esriaustralia-com-au-esridist on Sep 22, 2011
Latest reply on Sep 23, 2011 by jmoulds-esristaff
Just a quick one, in the web help for arcpy.mapping.GraduatedColorsSymbology (http://resourcesbeta.arcgis.com/en/help/main/10.1/index.html#/GraduatedColorsSymbology/00s30000005z000000/) the code sample 1 claims to "save the map document" but the code snippet doesn't (assuming there's no funky .save() method call in the destructor of the mxd class...?).

Just a minor touch-up but thought I'd point it out.

Code Sample
GraduatedColorsSymbology example 1
The following script modifies the symbology for all graduated colors layers in a map document. It iterates through each layer, changes the value field and the number of classes, and saves the map document.
import arcpy
mxd = arcpy.mapping.MapDocument(r"C:\Project\Project.mxd")
for lyr in arcpy.mapping.ListLayers(mxd):
  if lyr.symbologyType == "GRADUATED_COLORS":
    lyr.symbology.valueField = "POP2007"
    lyr.symbology.numClasses = 5
del mxd

Outcomes