<?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: Extending Dynamic Text in ArcGIS Enterprise Portal Questions</title>
    <link>https://community.esri.com/t5/arcgis-enterprise-portal-questions/extending-dynamic-text/m-p/117070#M1486</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Chris Fox at Esri just kindly posted this example of using python to generate dynamic text outside of the data driven pages/index layer model:&lt;BR /&gt;&lt;BR /&gt;Below is a sample, this assumes i have a map document, two text elements in the layout, a layer named TestLayer with 2 fields "AddressField" and "ZipField".&lt;BR /&gt;&lt;BR /&gt;import arcpy&lt;BR /&gt;&lt;BR /&gt;# get the reference to the map document and the layer named "TestLayer" in the map document&lt;BR /&gt;mxd = arcpy.mapping.MapDocument("C:/Temp/Test.mxd")&lt;BR /&gt;mapLyr = arcpy.mapping.ListLayers(mxd, "TestLayer")[0]&lt;BR /&gt;&lt;BR /&gt;# get the reference to the text elements in the map document. I have 2 text elements with the name Address and Zip&lt;BR /&gt;addrElem = arcpy.mapping.ListLayoutElements(mxd, "TEXT_ELEMENT", "Address")[0]&lt;BR /&gt;zipElem = arcpy.mapping.ListLayoutElements(mxd, "TEXT_ELEMENT", "Zip")[0]&lt;BR /&gt;&lt;BR /&gt;# create a cursor and grab the first row in the feature class for the layer specified above&lt;BR /&gt;rows = arcpy.SearchCursor(mapLyr.dataSource)&lt;BR /&gt;row = rows.next()&lt;BR /&gt;&lt;BR /&gt;# set the text property of the text element equal to the value from the fields named "AddressField" and "ZipField"&lt;BR /&gt;addrElem.text = row.getValue("AddressField")&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;zipElem.text = row.getValue("ZipField")&lt;BR /&gt;&lt;BR /&gt;# save the map document and delete the reference to the row, cursor and map object&lt;BR /&gt;mxd.save()&lt;BR /&gt;del mxd, row, rows,&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is exactly (at least I think) what I want to do.&amp;nbsp; Problem is, I'm a VBA programmer and I'm really struggling to switch over to Python.&amp;nbsp; I've tried pasting the code into the Python Windo in ArcMap.&amp;nbsp; I've change all the variables.&amp;nbsp; I can't seem to get the script to run like I think it should.&amp;nbsp; Nothing happens and I get and error message ('exceptions.IndexError')&amp;nbsp; Any tips for a budding Python programmer?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 02 May 2011 20:21:06 GMT</pubDate>
    <dc:creator>NathanEide</dc:creator>
    <dc:date>2011-05-02T20:21:06Z</dc:date>
    <item>
      <title>Extending Dynamic Text</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-portal-questions/extending-dynamic-text/m-p/117065#M1481</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Are there any code samples using a python script, or using ArcObjects from within dynamic text?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there anyway to extend the information available to dynamic text, or is it limited to the 7 types of dynamic text that are provided with ArcMap (system, document, data frame...)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Mike Braun&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Telvent Utilities Group&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Feb 2011 02:20:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-portal-questions/extending-dynamic-text/m-p/117065#M1481</guid>
      <dc:creator>MichaelBraun1</dc:creator>
      <dc:date>2011-02-02T02:20:10Z</dc:date>
    </item>
    <item>
      <title>Re: Extending Dynamic Text</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-portal-questions/extending-dynamic-text/m-p/117066#M1482</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If you're using data driven pages, you can easily add Dynamic Text relevant to any of the index layer's attribute fields; just add any old piece of Dynamic Text, right click, and modify the code to reflect the field you want.&amp;nbsp; There is also a way to use arcpy.mapping to dynamically update text based on non-index layer feature classes; I'll update this post with that info when I have it.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Mar 2011 15:47:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-portal-questions/extending-dynamic-text/m-p/117066#M1482</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2011-03-23T15:47:27Z</dc:date>
    </item>
    <item>
      <title>Re: Extending Dynamic Text</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-portal-questions/extending-dynamic-text/m-p/117067#M1483</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Chris Fox at Esri just kindly posted this example of using python to generate dynamic text outside of the data driven pages/index layer model:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Below is a sample, this assumes i have a map document, two text elements in the layout, a layer named TestLayer with 2 fields "AddressField" and "ZipField".&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;import arcpy&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# get the reference to the map document and the layer named "TestLayer" in the map document&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;mxd = arcpy.mapping.MapDocument("C:/Temp/Test.mxd")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;mapLyr = arcpy.mapping.ListLayers(mxd, "TestLayer")[0]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# get the reference to the text elements in the map document. I have 2 text elements with the name Address and Zip&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;addrElem = arcpy.mapping.ListLayoutElements(mxd, "TEXT_ELEMENT", "Address")[0]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;zipElem = arcpy.mapping.ListLayoutElements(mxd, "TEXT_ELEMENT", "Zip")[0]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# create a cursor and grab the first row in the feature class for the layer specified above&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;rows = arcpy.SearchCursor(mapLyr.dataSource)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;row = rows.next()&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# set the text property of the text element equal to the value from the fields named "AddressField" and "ZipField"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;addrElem.text = row.getValue("AddressField")&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;zipElem.text = row.getValue("ZipField")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# save the map document and delete the reference to the row, cursor and map object&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;mxd.save()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;del mxd, row, rows,&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Mar 2011 18:19:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-portal-questions/extending-dynamic-text/m-p/117067#M1483</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2011-03-23T18:19:36Z</dc:date>
    </item>
    <item>
      <title>Re: Extending Dynamic Text</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-portal-questions/extending-dynamic-text/m-p/117068#M1484</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Is there some code to grab "Bookmarks" to use as dynamic text?&amp;nbsp; I have several bookmarks and would like to have the text change for each bookmark I choose to provide the title for the map.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Jake&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Apr 2011 15:40:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-portal-questions/extending-dynamic-text/m-p/117068#M1484</guid>
      <dc:creator>JakeKrall</dc:creator>
      <dc:date>2011-04-20T15:40:46Z</dc:date>
    </item>
    <item>
      <title>Re: Extending Dynamic Text</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-portal-questions/extending-dynamic-text/m-p/117069#M1485</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I don't know of a way to do that, but if your bookmark names are related somehow to attributes in your data, you could fashion dynamic text out of that.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Apr 2011 15:48:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-portal-questions/extending-dynamic-text/m-p/117069#M1485</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2011-04-20T15:48:08Z</dc:date>
    </item>
    <item>
      <title>Re: Extending Dynamic Text</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-portal-questions/extending-dynamic-text/m-p/117070#M1486</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Chris Fox at Esri just kindly posted this example of using python to generate dynamic text outside of the data driven pages/index layer model:&lt;BR /&gt;&lt;BR /&gt;Below is a sample, this assumes i have a map document, two text elements in the layout, a layer named TestLayer with 2 fields "AddressField" and "ZipField".&lt;BR /&gt;&lt;BR /&gt;import arcpy&lt;BR /&gt;&lt;BR /&gt;# get the reference to the map document and the layer named "TestLayer" in the map document&lt;BR /&gt;mxd = arcpy.mapping.MapDocument("C:/Temp/Test.mxd")&lt;BR /&gt;mapLyr = arcpy.mapping.ListLayers(mxd, "TestLayer")[0]&lt;BR /&gt;&lt;BR /&gt;# get the reference to the text elements in the map document. I have 2 text elements with the name Address and Zip&lt;BR /&gt;addrElem = arcpy.mapping.ListLayoutElements(mxd, "TEXT_ELEMENT", "Address")[0]&lt;BR /&gt;zipElem = arcpy.mapping.ListLayoutElements(mxd, "TEXT_ELEMENT", "Zip")[0]&lt;BR /&gt;&lt;BR /&gt;# create a cursor and grab the first row in the feature class for the layer specified above&lt;BR /&gt;rows = arcpy.SearchCursor(mapLyr.dataSource)&lt;BR /&gt;row = rows.next()&lt;BR /&gt;&lt;BR /&gt;# set the text property of the text element equal to the value from the fields named "AddressField" and "ZipField"&lt;BR /&gt;addrElem.text = row.getValue("AddressField")&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;zipElem.text = row.getValue("ZipField")&lt;BR /&gt;&lt;BR /&gt;# save the map document and delete the reference to the row, cursor and map object&lt;BR /&gt;mxd.save()&lt;BR /&gt;del mxd, row, rows,&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is exactly (at least I think) what I want to do.&amp;nbsp; Problem is, I'm a VBA programmer and I'm really struggling to switch over to Python.&amp;nbsp; I've tried pasting the code into the Python Windo in ArcMap.&amp;nbsp; I've change all the variables.&amp;nbsp; I can't seem to get the script to run like I think it should.&amp;nbsp; Nothing happens and I get and error message ('exceptions.IndexError')&amp;nbsp; Any tips for a budding Python programmer?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 May 2011 20:21:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-portal-questions/extending-dynamic-text/m-p/117070#M1486</guid>
      <dc:creator>NathanEide</dc:creator>
      <dc:date>2011-05-02T20:21:06Z</dc:date>
    </item>
    <item>
      <title>Re: Extending Dynamic Text</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-portal-questions/extending-dynamic-text/m-p/117071#M1487</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello! I suggest you paste the script and your question on Arc's Python forum: &lt;/SPAN&gt;&lt;A href="http://forums.arcgis.com/forums/117-Python"&gt;http://forums.arcgis.com/forums/117-Python&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You'll reach a more appropriate pool than with just this one thread.&amp;nbsp; Good luck; I'm looking forward to the answer!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 May 2011 21:23:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-portal-questions/extending-dynamic-text/m-p/117071#M1487</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2011-05-02T21:23:40Z</dc:date>
    </item>
    <item>
      <title>Re: Extending Dynamic Text</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-portal-questions/extending-dynamic-text/m-p/117072#M1488</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have found that it is very easy to insert any Index layer data to the Layout Using the Insert&amp;nbsp; - Dynamic Text Tool.&amp;nbsp; Simply understanding that "Page" is synonymous with your index Layer will serve you well.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a County Name in my index Layer field that I want to add to my layout.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I simply Insert - Dynamic Text - Data Driven Page Name.&amp;nbsp; When looking at the properties of this tag it should read as follows: &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;dyn type="page" property="name"/&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I want that text to actually display the County Name that is associated with that page, I have a field in my index layer called "County".&amp;nbsp; I simply edit the string to read as follows:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;dyn type="page" property="County"/&amp;gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am used to DS Mapbook, and I am trying to recreate the same functionality in Data Driven Pages.&amp;nbsp; I guess it took me a while to realize that the "Page" dynamic text type was actually tied to my index layer.&amp;nbsp; I can't find where the ArcGIS Desktop Help indicates that "Page" text is in any way related to the index Layer, but the results speak for themselves.&amp;nbsp; Apparently it is so simple that it needs to explanation.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Jul 2011 22:53:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-portal-questions/extending-dynamic-text/m-p/117072#M1488</guid>
      <dc:creator>joesather</dc:creator>
      <dc:date>2011-07-06T22:53:41Z</dc:date>
    </item>
    <item>
      <title>Re: Extending Dynamic Text</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-portal-questions/extending-dynamic-text/m-p/117073#M1489</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there a way to use python in a dynamic text where it looks for the dynamic text by attribute and depending on that value, you place and if else. If attribute = 0 then "No", else "Yes"?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Dec 2018 13:41:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-portal-questions/extending-dynamic-text/m-p/117073#M1489</guid>
      <dc:creator>LouiePadilla</dc:creator>
      <dc:date>2018-12-03T13:41:35Z</dc:date>
    </item>
  </channel>
</rss>

