<?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: Trying to change elementWidth in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/trying-to-change-elementwidth/m-p/290378#M22498</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am not working in "current" I am working in pywin 2.7&amp;nbsp; and I do save.mxd() and the width still isn't changing, only the xy position will change.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 Mar 2013 00:43:34 GMT</pubDate>
    <dc:creator>courtneygarlock</dc:creator>
    <dc:date>2013-03-26T00:43:34Z</dc:date>
    <item>
      <title>Trying to change elementWidth</title>
      <link>https://community.esri.com/t5/python-questions/trying-to-change-elementwidth/m-p/290376#M22496</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'm using the following code: &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;import arcpy&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;mxd = arcpy.mapping.MapDocument(r"C:\Courtney\TEST.mxd")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;for elm in arcpy.mapping.ListLayoutElements(mxd, "TEXT_ELEMENT"):&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if elm.name == "author":&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; elm.text = '&amp;lt;dyn type="document" property="author"/&amp;gt;'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; elmWidth = 2.5&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; elm.elementPositionX = 3.23&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; elm.elementPositionY = 8.54&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print elmWidth&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;prints 2.5&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The script runs fine but when I open the mxd the xy position is changed but not the elmWidth, is there another way to change &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;element width bc I've tried it a bunch of times and nothing works. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also is there a better script to add title, author, dataframe time to the layout without having to set each xy position and element width?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Mar 2013 17:31:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/trying-to-change-elementwidth/m-p/290376#M22496</guid>
      <dc:creator>courtneygarlock</dc:creator>
      <dc:date>2013-03-25T17:31:34Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to change elementWidth</title>
      <link>https://community.esri.com/t5/python-questions/trying-to-change-elementwidth/m-p/290377#M22497</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If you are working with the 'current' map document, did you make sure to use arcpy.RefreshActiveView()? Also, are you making sure to do mxd.save() at the end?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Mar 2013 18:17:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/trying-to-change-elementwidth/m-p/290377#M22497</guid>
      <dc:creator>LucasDanzinger</dc:creator>
      <dc:date>2013-03-25T18:17:24Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to change elementWidth</title>
      <link>https://community.esri.com/t5/python-questions/trying-to-change-elementwidth/m-p/290378#M22498</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am not working in "current" I am working in pywin 2.7&amp;nbsp; and I do save.mxd() and the width still isn't changing, only the xy position will change.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Mar 2013 00:43:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/trying-to-change-elementwidth/m-p/290378#M22498</guid>
      <dc:creator>courtneygarlock</dc:creator>
      <dc:date>2013-03-26T00:43:34Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to change elementWidth</title>
      <link>https://community.esri.com/t5/python-questions/trying-to-change-elementwidth/m-p/290379#M22499</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;elmWidth = 2.5 should be elm.elementWidth = 2.4&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, 28 Mar 2013 19:26:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/trying-to-change-elementwidth/m-p/290379#M22499</guid>
      <dc:creator>JeffBarrette</dc:creator>
      <dc:date>2013-03-28T19:26:40Z</dc:date>
    </item>
  </channel>
</rss>

