<?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: Looking for ways to automate weekly map production (change title, count) in Mapping Questions</title>
    <link>https://community.esri.com/t5/mapping-questions/looking-for-ways-to-automate-weekly-map-production/m-p/645400#M7049</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.esri.com/people/OCACNY"&gt;Paula Cutrone&lt;/A&gt;​ you can do these things with python if your interested I just recently finished a project for our planning department that does similar.The mapping module will hold most of the elements you'll need &lt;A href="http://desktop.arcgis.com/en/desktop/latest/analyze/arcpy-mapping/introduction-to-arcpy-mapping.htm" title="http://desktop.arcgis.com/en/desktop/latest/analyze/arcpy-mapping/introduction-to-arcpy-mapping.htm"&gt;Introduction to arcpy.mapping—Help | ArcGIS for Desktop&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 03 Sep 2015 14:22:54 GMT</pubDate>
    <dc:creator>WesMiller</dc:creator>
    <dc:date>2015-09-03T14:22:54Z</dc:date>
    <item>
      <title>Looking for ways to automate weekly map production (change title, count)</title>
      <link>https://community.esri.com/t5/mapping-questions/looking-for-ways-to-automate-weekly-map-production/m-p/645398#M7047</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, I'm looking for ways to automate a couple of our repetitive map processes.&amp;nbsp; Each week my analysts go into individual Arc Maps to create .pdf exports of their respective crime types that are published on the Police Department's website.&amp;nbsp; They have to update the date range in the title (previous Monday through Sunday) and change the total count of crimes.&amp;nbsp; I was hoping there would be a way to have the date range automatically display by using a SQL statement similar to the one I use in the definition query:&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ToDate Between DATEADD(wk,DATEDIFF(wk,7,GETDATE()),0) AND DATEADD(wk,DATEDIFF(wk,7,GETDATE()),6)&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would also like to have the total number of crimes change based on how many are selected through the definition query.&amp;nbsp; It would be the equivalent of a count of the attributes, I think.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;All of the maps are using definition queries based off the same view in SDE.&amp;nbsp; There are several analysts who are each responsible for their own crime type.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any suggestions would be appreciated.&amp;nbsp; I have been researching this for a couple of weeks and am stuck.&amp;nbsp; Thank you!!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 11 Nov 2014 16:20:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/looking-for-ways-to-automate-weekly-map-production/m-p/645398#M7047</guid>
      <dc:creator>PaulaCutrone</dc:creator>
      <dc:date>2014-11-11T16:20:36Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for ways to automate weekly map production (change title, count)</title>
      <link>https://community.esri.com/t5/mapping-questions/looking-for-ways-to-automate-weekly-map-production/m-p/645399#M7048</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I haven't received any responses on this topic; I'm still looking for help! Thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Sep 2015 13:05:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/looking-for-ways-to-automate-weekly-map-production/m-p/645399#M7048</guid>
      <dc:creator>PaulaCutrone</dc:creator>
      <dc:date>2015-09-03T13:05:02Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for ways to automate weekly map production (change title, count)</title>
      <link>https://community.esri.com/t5/mapping-questions/looking-for-ways-to-automate-weekly-map-production/m-p/645400#M7049</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.esri.com/people/OCACNY"&gt;Paula Cutrone&lt;/A&gt;​ you can do these things with python if your interested I just recently finished a project for our planning department that does similar.The mapping module will hold most of the elements you'll need &lt;A href="http://desktop.arcgis.com/en/desktop/latest/analyze/arcpy-mapping/introduction-to-arcpy-mapping.htm" title="http://desktop.arcgis.com/en/desktop/latest/analyze/arcpy-mapping/introduction-to-arcpy-mapping.htm"&gt;Introduction to arcpy.mapping—Help | ArcGIS for Desktop&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Sep 2015 14:22:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/looking-for-ways-to-automate-weekly-map-production/m-p/645400#M7049</guid>
      <dc:creator>WesMiller</dc:creator>
      <dc:date>2015-09-03T14:22:54Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for ways to automate weekly map production (change title, count)</title>
      <link>https://community.esri.com/t5/mapping-questions/looking-for-ways-to-automate-weekly-map-production/m-p/645401#M7050</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Wes is quite correct that the arcpy mapping module can take care of most of your needs.&amp;nbsp; You would probably need to set-up some map templates with all the layers, text elements, picture elements, legends, etc you will need on them(Naming all these elements making them &lt;EM&gt;significantly &lt;/EM&gt;easier to access via the arcpy module).&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using cursors you could pull data from the attribute table and apply them to various text elements on your map.&amp;nbsp; You could pull the current date via the python time module, and also created date information for the start of the week for display.&amp;nbsp; Once all the changes are made, you can save the map and export to pdf.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I posted a script that I used alot of the arcpy.mapping module on this thread, if you need some examples.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/thread/160192"&gt;Custom brochure printing Python&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Sep 2015 15:15:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/looking-for-ways-to-automate-weekly-map-production/m-p/645401#M7050</guid>
      <dc:creator>IanMurray</dc:creator>
      <dc:date>2015-09-03T15:15:37Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for ways to automate weekly map production (change title, count)</title>
      <link>https://community.esri.com/t5/mapping-questions/looking-for-ways-to-automate-weekly-map-production/m-p/645402#M7051</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Wes, I will definitely look into that.&amp;nbsp; I appreciate your time.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Sep 2015 18:08:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/looking-for-ways-to-automate-weekly-map-production/m-p/645402#M7051</guid>
      <dc:creator>PaulaCutrone</dc:creator>
      <dc:date>2015-09-03T18:08:49Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for ways to automate weekly map production (change title, count)</title>
      <link>https://community.esri.com/t5/mapping-questions/looking-for-ways-to-automate-weekly-map-production/m-p/645403#M7052</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you Ian, I will check out your post.&amp;nbsp; I am new to using Python, so of course I have to start with an ambitious project.!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Sep 2015 18:09:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/looking-for-ways-to-automate-weekly-map-production/m-p/645403#M7052</guid>
      <dc:creator>PaulaCutrone</dc:creator>
      <dc:date>2015-09-03T18:09:52Z</dc:date>
    </item>
    <item>
      <title>Re: Looking for ways to automate weekly map production (change title, count)</title>
      <link>https://community.esri.com/t5/mapping-questions/looking-for-ways-to-automate-weekly-map-production/m-p/645404#M7053</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Paula just to help you get started see below. Use a blank arcmap with a layer and create a text element and use below to guide to get you through one.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;#Get a reference to the current map document
mxd = arcpy.mapping.MapDocument("Current")
#Get a reference to the first dataframe
df = arcpy.mapping.ListDataFrames(mxd)[0]
#Get a reference to the desired layer I'm using "Property Lines" 
#but you may use whatever layer you want the name must be exactly like it is listed in your table of coontents
plyr = arcpy.mapping.ListLayers(mxd, "Property Lines", df)[0]
#Get a reference to a text element after you'created a text element you tight click and choose properties the choose the 
#"Size and Position" tab on the right side fill in the "Element Name", in this example I used "pcount"
txtelm = arcpy.mapping.ListLayoutElements(mxd, "TEXT_ELEMENT", "pcount")[0]
# now we can fill in the text element with the layers count and a defintiion query is honored in the count
txtelm.text = int(arcpy.GetCount_management(plyr).getOutput(0))
#And lastly refresh the view so we a can see our work
arcpy.RefreshActiveView()&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 03:24:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/looking-for-ways-to-automate-weekly-map-production/m-p/645404#M7053</guid>
      <dc:creator>WesMiller</dc:creator>
      <dc:date>2021-12-12T03:24:17Z</dc:date>
    </item>
  </channel>
</rss>

