<?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: Enable Time for a layer using arcpy in Python Snippets Questions</title>
    <link>https://community.esri.com/t5/python-snippets-questions/enable-time-for-a-layer-using-arcpy/m-p/874763#M652</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There was another duplicate over in python snippets Space.&amp;nbsp; I went ahead and shared with a few other Places&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 03 Sep 2015 16:58:02 GMT</pubDate>
    <dc:creator>IanMurray</dc:creator>
    <dc:date>2015-09-03T16:58:02Z</dc:date>
    <item>
      <title>Enable Time for a layer using arcpy</title>
      <link>https://community.esri.com/t5/python-snippets-questions/enable-time-for-a-layer-using-arcpy/m-p/874760#M649</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; font-size: 14px; font-style: normal; font-weight: normal; text-align: left; text-indent: 0px;"&gt;I have over 1000 feature classes that I am loading into a map document.&amp;nbsp; I have figured out how to automate this process in using Arcpy.&amp;nbsp; Each feature class has a field with datetime.&amp;nbsp; I can enable time on the layers one by one by right clicking on the layer once it is in arcmap and clicking the box "enable time on this layer". I would like to automate the process using arcpy.&amp;nbsp; Can anyone help?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; font-size: 14px; font-style: normal; font-weight: normal; text-align: left; text-indent: 0px;"&gt;Ian&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Sep 2015 16:21:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-snippets-questions/enable-time-for-a-layer-using-arcpy/m-p/874760#M649</guid>
      <dc:creator>IanIrmischer</dc:creator>
      <dc:date>2015-09-03T16:21:11Z</dc:date>
    </item>
    <item>
      <title>Re: Enable Time for a layer using arcpy</title>
      <link>https://community.esri.com/t5/python-snippets-questions/enable-time-for-a-layer-using-arcpy/m-p/874761#M650</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Ian&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't believe there is a direct way to do this with arcpy.mapping.Layer.&amp;nbsp; However, if you have a saved Layer file that does have time enabled, you should be able to use arcpy.mapping.UpdateLayerTime to update the time properties of the layers you are adding from an existing .lyr file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;see:(copy/paste) &lt;A href="http://resources.arcgis.com/en/help/main/10.1/index.html#/UpdateLayerTime/00s300000064000000/" title="http://resources.arcgis.com/en/help/main/10.1/index.html#/UpdateLayerTime/00s300000064000000/"&gt;http://resources.arcgis.com/en/help/main/10.1/index.html#/UpdateLayerTime/00s300000064000000/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'd test on a single layer first.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ian M&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Sep 2015 16:37:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-snippets-questions/enable-time-for-a-layer-using-arcpy/m-p/874761#M650</guid>
      <dc:creator>IanMurray</dc:creator>
      <dc:date>2015-09-03T16:37:18Z</dc:date>
    </item>
    <item>
      <title>Re: Enable Time for a layer using arcpy</title>
      <link>https://community.esri.com/t5/python-snippets-questions/enable-time-for-a-layer-using-arcpy/m-p/874762#M651</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This post is a duplicate of&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" data-containerid="1759" data-containertype="700" data-objectid="548340" data-objecttype="2" href="https://community.esri.com/message/548340#548340"&gt;https://community.esri.com/message/548340#548340&lt;/A&gt;&lt;/P&gt;&lt;P&gt;possible links are on that thread.&amp;nbsp; post and/or update in one thread, then share to spaces, don't just try again the next day&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Sep 2015 16:51:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-snippets-questions/enable-time-for-a-layer-using-arcpy/m-p/874762#M651</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2015-09-03T16:51:25Z</dc:date>
    </item>
    <item>
      <title>Re: Enable Time for a layer using arcpy</title>
      <link>https://community.esri.com/t5/python-snippets-questions/enable-time-for-a-layer-using-arcpy/m-p/874763#M652</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There was another duplicate over in python snippets Space.&amp;nbsp; I went ahead and shared with a few other Places&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Sep 2015 16:58:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-snippets-questions/enable-time-for-a-layer-using-arcpy/m-p/874763#M652</guid>
      <dc:creator>IanMurray</dc:creator>
      <dc:date>2015-09-03T16:58:02Z</dc:date>
    </item>
    <item>
      <title>Re: Enable Time for a layer using arcpy</title>
      <link>https://community.esri.com/t5/python-snippets-questions/enable-time-for-a-layer-using-arcpy/m-p/874764#M653</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Apologies, I didn't know the protocol.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Sep 2015 17:32:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-snippets-questions/enable-time-for-a-layer-using-arcpy/m-p/874764#M653</guid>
      <dc:creator>IanIrmischer</dc:creator>
      <dc:date>2015-09-03T17:32:15Z</dc:date>
    </item>
    <item>
      <title>Re: Enable Time for a layer using arcpy</title>
      <link>https://community.esri.com/t5/python-snippets-questions/enable-time-for-a-layer-using-arcpy/m-p/874765#M654</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Ian.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Sep 2015 17:32:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-snippets-questions/enable-time-for-a-layer-using-arcpy/m-p/874765#M654</guid>
      <dc:creator>IanIrmischer</dc:creator>
      <dc:date>2015-09-03T17:32:35Z</dc:date>
    </item>
    <item>
      <title>Re: Enable Time for a layer using arcpy</title>
      <link>https://community.esri.com/t5/python-snippets-questions/enable-time-for-a-layer-using-arcpy/m-p/874766#M655</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ian, Thanks very much for the help.&amp;nbsp; This method worked.&amp;nbsp; It might be nice for ESRI to build an arcpy tool in the future but this method works for my purposes.&amp;nbsp; I was able to load all the files via arcpy.&amp;nbsp; Then I enabled time on the 1st layer in the TOC.&amp;nbsp; Then I used arcpy to enable time in all the other layers via code below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MXD = arcpy.mapping.MapDocument("CURRENT")&lt;/P&gt;&lt;P&gt;DF = arcpy.mapping.ListDataFrames(MXD)[0]&lt;/P&gt;&lt;P&gt;sourceLayer=arcpy.mapping.ListLayers(MXD,"",DF)[0]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;updateLayer=arcpy.mapping.ListLayers(MXD,"",DF)&lt;/P&gt;&lt;P&gt;for layers in updateLayer:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.mapping.UpdateLayerTime (DF,layers, sourceLayer)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Sep 2015 18:19:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-snippets-questions/enable-time-for-a-layer-using-arcpy/m-p/874766#M655</guid>
      <dc:creator>IanIrmischer</dc:creator>
      <dc:date>2015-09-03T18:19:08Z</dc:date>
    </item>
    <item>
      <title>Re: Enable Time for a layer using arcpy</title>
      <link>https://community.esri.com/t5/python-snippets-questions/enable-time-for-a-layer-using-arcpy/m-p/874767#M656</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;They are very hit and miss about what layer properties you can set with arcpy, and which ones you need ArcObjects to directly manipulate.&amp;nbsp; Luckily they had somewhat of a workaround for this particular scenario.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Sep 2015 14:24:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-snippets-questions/enable-time-for-a-layer-using-arcpy/m-p/874767#M656</guid>
      <dc:creator>IanMurray</dc:creator>
      <dc:date>2015-09-04T14:24:57Z</dc:date>
    </item>
  </channel>
</rss>

