<?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>idea Support creation of NEW layer files in arcpy in ArcGIS Pro Ideas</title>
    <link>https://community.esri.com/t5/arcgis-pro-ideas/support-creation-of-new-layer-files-in-arcpy/idi-p/968116</link>
    <description>&lt;P&gt;Expand arcpy.mapping to allow for users to create new lyr files programatically.&lt;BR /&gt;&lt;BR /&gt;This would be useful as a script developer trying to share scripts accross an organization without having to maintain large numbers of files. Rather than making sure users are pointing to the current script, and have access to directories where neccessary layers are stored, the ability to create layer files directly within a .pyt file would enable easier sharing and maintenence.&lt;/P&gt;&lt;!--  content transformation source ID: 087E00000004s1y  --&gt;</description>
    <pubDate>Tue, 06 Aug 2024 23:09:30 GMT</pubDate>
    <dc:creator>DouglasSands1</dc:creator>
    <dc:date>2024-08-06T23:09:30Z</dc:date>
    <item>
      <title>Support creation of NEW layer files in arcpy</title>
      <link>https://community.esri.com/t5/arcgis-pro-ideas/support-creation-of-new-layer-files-in-arcpy/idi-p/968116</link>
      <description>&lt;P&gt;Expand arcpy.mapping to allow for users to create new lyr files programatically.&lt;BR /&gt;&lt;BR /&gt;This would be useful as a script developer trying to share scripts accross an organization without having to maintain large numbers of files. Rather than making sure users are pointing to the current script, and have access to directories where neccessary layers are stored, the ability to create layer files directly within a .pyt file would enable easier sharing and maintenence.&lt;/P&gt;&lt;!--  content transformation source ID: 087E00000004s1y  --&gt;</description>
      <pubDate>Tue, 06 Aug 2024 23:09:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-ideas/support-creation-of-new-layer-files-in-arcpy/idi-p/968116</guid>
      <dc:creator>DouglasSands1</dc:creator>
      <dc:date>2024-08-06T23:09:30Z</dc:date>
    </item>
    <item>
      <title>Re: Support creation of NEW layer files in arcpy</title>
      <link>https://community.esri.com/t5/arcgis-pro-ideas/support-creation-of-new-layer-files-in-arcpy/idc-p/968117#M8756</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;
	Already possible:&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="font-family: consolas;"&gt;new_layer_name = "mynewlyr"&lt;BR /&gt;	new_layer_file = r"c:\my_new_layer.lyr"&lt;BR /&gt;	arcpy.management.MakeFeatureLayer(r"c:\my.shp", new_layer_name)&lt;BR /&gt;	lyr = arcpy.mapping.Layer(new_layer_name)&lt;BR /&gt;	lyr.saveACopy(new_layer_file)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-family: consolas;"&gt;arcpy.management.Delete(new_layer_name)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;	You might want to have some &lt;SPAN style="font-family: consolas;"&gt;.lyr&lt;/SPAN&gt; sitting around with your desired symbology to apply to it, but this small code snippet will do what you want. Another idea is to have a &lt;SPAN style="font-family: consolas;"&gt;.lyr&lt;/SPAN&gt; with your symbology set and use &lt;SPAN style="font-family: consolas;"&gt;replaceDataSource&lt;/SPAN&gt; to point it to a new feature class, then &lt;SPAN style="font-family: consolas;"&gt;saveACopy&lt;/SPAN&gt; it.&lt;/P&gt;

&lt;!-- content transformation source ID: 00aE000000326Ur --&gt;

&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Sep 2013 17:37:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-ideas/support-creation-of-new-layer-files-in-arcpy/idc-p/968117#M8756</guid>
      <dc:creator>JasonScheirer</dc:creator>
      <dc:date>2013-09-17T17:37:47Z</dc:date>
    </item>
    <item>
      <title>Re: Support creation of NEW layer files in arcpy - Status changed to: Implemented</title>
      <link>https://community.esri.com/t5/arcgis-pro-ideas/support-creation-of-new-layer-files-in-arcpy/idc-p/1517752#M31500</link>
      <description>&lt;P&gt;This has been hanging around for some time now but this has been possible for many releases with Layer.saveACopy().&lt;/P&gt;&lt;P&gt;Jeff - Layout and arcpy.mp teams&lt;/P&gt;</description>
      <pubDate>Fri, 09 Aug 2024 21:51:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-ideas/support-creation-of-new-layer-files-in-arcpy/idc-p/1517752#M31500</guid>
      <dc:creator>JeffBarrette</dc:creator>
      <dc:date>2024-08-09T21:51:12Z</dc:date>
    </item>
  </channel>
</rss>

