<?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 Re: legend element issue in Mapping Questions</title>
    <link>https://community.esri.com/t5/mapping-questions/legend-element-issue/m-p/437599#M4764</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Ryan,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried to reproduce this issue using my data / mxds and could not.&amp;nbsp; I tried on 10.0 SP4 and 10.1.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I start with a legend the has 1 column and then load/run your script.&amp;nbsp; Everytime I reload the script into the Python window and run, the legend remains the same.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I did notice that you are trying to set both the elementHeight and elementWidth.&amp;nbsp; Since the aspect ratio gets locked, it only&amp;nbsp; make sense to set on.&amp;nbsp; Last one wins.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you want to send me a map package, I'd be happy to give it a test.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jeff&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 12 Apr 2012 14:53:43 GMT</pubDate>
    <dc:creator>JeffBarrette</dc:creator>
    <dc:date>2012-04-12T14:53:43Z</dc:date>
    <item>
      <title>legend element issue</title>
      <link>https://community.esri.com/t5/mapping-questions/legend-element-issue/m-p/437598#M4763</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have been working on a script to fit dynamic legends on the second page of a pdf. However, the legend seems to place incorrectly when I run the code.&amp;nbsp; I was writing some functions to deal with each size template... but am wondering if this is a bug or I am just using this code incorrectly.&amp;nbsp; In my script I am deleting all var's at the end and this still happens.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I stripped it down and this behavior also exists in "CURRENT" as well. Copy/paste a few times in in a row in the arcpy window and you'll see what I mean. The legend's placement and columns toggle back and forth. Perhaps if I can understand why this is happening, it may help me understand the specific issues of my script. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;import arcpy&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;legend = MAP.ListLayoutElements(MXD, "LEGEND_ELEMENT", "Legend")[0]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;legend.adjustColumnCount(4)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;legend.elementHeight = 10&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;legend.elementWidth = 16&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;legend.elementPositionX = .6&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;legend.elementPositionY = .5 &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.RefreshActiveView()&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Apr 2012 19:23:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/legend-element-issue/m-p/437598#M4763</guid>
      <dc:creator>RyanKelley</dc:creator>
      <dc:date>2012-04-11T19:23:08Z</dc:date>
    </item>
    <item>
      <title>Re: legend element issue</title>
      <link>https://community.esri.com/t5/mapping-questions/legend-element-issue/m-p/437599#M4764</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Ryan,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I tried to reproduce this issue using my data / mxds and could not.&amp;nbsp; I tried on 10.0 SP4 and 10.1.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I start with a legend the has 1 column and then load/run your script.&amp;nbsp; Everytime I reload the script into the Python window and run, the legend remains the same.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I did notice that you are trying to set both the elementHeight and elementWidth.&amp;nbsp; Since the aspect ratio gets locked, it only&amp;nbsp; make sense to set on.&amp;nbsp; Last one wins.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you want to send me a map package, I'd be happy to give it a test.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jeff&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Apr 2012 14:53:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/legend-element-issue/m-p/437599#M4764</guid>
      <dc:creator>JeffBarrette</dc:creator>
      <dc:date>2012-04-12T14:53:43Z</dc:date>
    </item>
  </channel>
</rss>

