<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Setting GraduatedSymbolsSymbology.classBreakValues with joined fields by ArcPy in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/setting-graduatedsymbolssymbology-classbreakvalues/m-p/39927#M3193</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried to set breakvalues and breaklabels on a graduatedsymbol-layer. When the layer&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;has no join it works fine, but I need to join a SDE table in order to classify one field of the&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;joined table. Even if I take a field of the non-joined part of the table (e.g. AREA_HA) the script&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;gets an RuneTime-Error. Within the desktop application it works fine as well ... &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any ideas are welcome!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best regards from Berlin,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Christoph &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy
mxd = arcpy.mapping.MapDocument(r"MJoin.mxd")
df = arcpy.mapping.ListDataFrames(mxd, "Layer")[0]
lyr = arcpy.mapping.ListLayers(mxd, "AGHWahlkreise", df)[0]
lyrFile = arcpy.mapping.Layer(r"MJoin.lyr")
arcpy.mapping.UpdateLayer(df, lyr, lyrFile, True)
if lyr.symbologyType == "GRADUATED_COLORS":
&amp;nbsp; lyr.symbology.valueField = "AGHWahlkreise.AREA_HA"
&amp;nbsp; lyr.symbology.classBreakValues = [169.0, 503.0, 885.0, 1475.0, 2544.0, 4912.0]
&amp;nbsp; lyr.symbology.classBreakLabels = [u'169,0 - 503,0', u'503,0 - 885,0', u'885,0 - 1475,0', u'1475,0 - 2544,0', u'2544,0 - 4912,0']
arcpy.mapping.ExportToPDF(mxd, r"MJoin.pdf")
del mxd, lyrFile
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;Traceback (most recent call last):
&amp;nbsp; File "R:\RBS\MAP\WAHL\BW1309\Python-Code fÃ¼r Export\MJoin.py", line 9, in &amp;lt;module&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; lyr.symbology.classBreakValues = [169.0, 503.0, 885.0, 1475.0, 2544.0, 4912.0]
&amp;nbsp; File "C:\Programme\ArcGIS\Desktop10.1\arcpy\arcpy\arcobjects\_base.py", line 87, in _set
&amp;nbsp;&amp;nbsp;&amp;nbsp; return setattr(self._arc_object, attr_name, cval(val))
RuntimeError&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 15:57:03 GMT</pubDate>
    <dc:creator>ChristophEffing</dc:creator>
    <dc:date>2021-12-12T15:57:03Z</dc:date>
    <item>
      <title>Setting GraduatedSymbolsSymbology.classBreakValues with joined fields by ArcPy</title>
      <link>https://community.esri.com/t5/python-questions/setting-graduatedsymbolssymbology-classbreakvalues/m-p/39927#M3193</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried to set breakvalues and breaklabels on a graduatedsymbol-layer. When the layer&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;has no join it works fine, but I need to join a SDE table in order to classify one field of the&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;joined table. Even if I take a field of the non-joined part of the table (e.g. AREA_HA) the script&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;gets an RuneTime-Error. Within the desktop application it works fine as well ... &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any ideas are welcome!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Best regards from Berlin,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Christoph &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy
mxd = arcpy.mapping.MapDocument(r"MJoin.mxd")
df = arcpy.mapping.ListDataFrames(mxd, "Layer")[0]
lyr = arcpy.mapping.ListLayers(mxd, "AGHWahlkreise", df)[0]
lyrFile = arcpy.mapping.Layer(r"MJoin.lyr")
arcpy.mapping.UpdateLayer(df, lyr, lyrFile, True)
if lyr.symbologyType == "GRADUATED_COLORS":
&amp;nbsp; lyr.symbology.valueField = "AGHWahlkreise.AREA_HA"
&amp;nbsp; lyr.symbology.classBreakValues = [169.0, 503.0, 885.0, 1475.0, 2544.0, 4912.0]
&amp;nbsp; lyr.symbology.classBreakLabels = [u'169,0 - 503,0', u'503,0 - 885,0', u'885,0 - 1475,0', u'1475,0 - 2544,0', u'2544,0 - 4912,0']
arcpy.mapping.ExportToPDF(mxd, r"MJoin.pdf")
del mxd, lyrFile
&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;Traceback (most recent call last):
&amp;nbsp; File "R:\RBS\MAP\WAHL\BW1309\Python-Code fÃ¼r Export\MJoin.py", line 9, in &amp;lt;module&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; lyr.symbology.classBreakValues = [169.0, 503.0, 885.0, 1475.0, 2544.0, 4912.0]
&amp;nbsp; File "C:\Programme\ArcGIS\Desktop10.1\arcpy\arcpy\arcobjects\_base.py", line 87, in _set
&amp;nbsp;&amp;nbsp;&amp;nbsp; return setattr(self._arc_object, attr_name, cval(val))
RuntimeError&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 15:57:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/setting-graduatedsymbolssymbology-classbreakvalues/m-p/39927#M3193</guid>
      <dc:creator>ChristophEffing</dc:creator>
      <dc:date>2021-12-12T15:57:03Z</dc:date>
    </item>
  </channel>
</rss>

